From 34167345aca4d869b45de9d43a93d8a4956e0313 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 31 Dec 2015 00:39:03 +0000 Subject: 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 --- misc/ruby-additional.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc/ruby-additional.el') diff --git a/misc/ruby-additional.el b/misc/ruby-additional.el index 46c3cd23f2..e3f6a02f4d 100644 --- a/misc/ruby-additional.el +++ b/misc/ruby-additional.el @@ -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 "}")) -- cgit v1.2.3