ruby-additional.el: encode non-ASCII code only

* misc/ruby-additional.el (ruby-encode-unicode): encode non-ASCII
  code only, excluding ASCII control code, e.g. \t, \n, etc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-12-31 00:39:03 +00:00
Родитель 2fad016810
Коммит 34167345ac
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -114,7 +114,7 @@ Emacs to Ruby."
(setq end (set-marker (make-marker) end))
(goto-char beg)
(while (and (< (point) end)
(re-search-forward "\\Ca+" end t))
(re-search-forward "[^\C-@-~]+" end t))
(let ((u (mapconcat (lambda (c) (format "%x" c)) (match-string-no-properties 0) " ")))
(delete-region (match-beginning 0) (match-end 0))
(insert "\\u{" u "}"))