[前][次][番号順一覧][スレッド一覧]

ruby-changes:41320

From: nobu <ko1@a...>
Date: Thu, 31 Dec 2015 09:39:22 +0900 (JST)
Subject: [ruby-changes:41320] nobu:r53392 (trunk): ruby-additional.el: encode non-ASCII code only

nobu	2015-12-31 09:39:03 +0900 (Thu, 31 Dec 2015)

  New Revision: 53392

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53392

  Log:
    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.

  Modified files:
    trunk/misc/ruby-additional.el
Index: misc/ruby-additional.el
===================================================================
--- misc/ruby-additional.el	(revision 53391)
+++ misc/ruby-additional.el	(revision 53392)
@@ -114,7 +114,7 @@ Emacs to Ruby." https://github.com/ruby/ruby/blob/trunk/misc/ruby-additional.el#L114
        (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 "}"))

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]