зеркало из https://github.com/github/ruby.git
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:
Родитель
2fad016810
Коммит
34167345ac
|
@ -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 "}"))
|
||||
|
|
Загрузка…
Ссылка в новой задаче