1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

ruby-additional.el: track by marker

* misc/ruby-additional.el (ruby-encode-unicode): use marker
  instead of offset to track insertion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-07-29 07:41:35 +00:00
parent 360a865246
commit c82b44e1b4

View file

@ -111,6 +111,7 @@ Emacs to Ruby."
(defun ruby-encode-unicode (beg end)
"Convert non-ascii string in the given region to \\u{} form."
(interactive "r")
(setq end (set-marker (make-marker) end))
(goto-char beg)
(while (and (< (point) end)
(re-search-forward "\\Ca+" end t))