emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r112638: * lisp/progmodes/ruby-mode.e


From: Dmitry Gutov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112638: * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-heredoc): Leave
Date: Sun, 19 May 2013 10:52:22 +0400
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112638
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Sun 2013-05-19 10:52:22 +0400
message:
  * lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-heredoc): Leave
  point at bol following the heredoc openers.
  (ruby-syntax-propertize-expansions): Remove.
modified:
  lisp/ChangeLog
  lisp/progmodes/ruby-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-05-19 06:01:23 +0000
+++ b/lisp/ChangeLog    2013-05-19 06:52:22 +0000
@@ -16,11 +16,12 @@
        call to `ruby-syntax-propertize-function'.
        (ruby-syntax-propertize-expansion): Extracted from
        `ruby-syntax-propertize-expansions'.  Handles one expansion.
-       (ruby-syntax-propertize-heredoc): Explicitly call
-       `ruby-syntax-propertize-expansions'.
        (ruby-syntax-propertize-percent-literal): Leave point right after
        the percent symbol, so that the expression expansion rule can
        propertize the contents.
+       (ruby-syntax-propertize-heredoc): Leave point at bol following the
+       heredoc openers.
+       (ruby-syntax-propertize-expansions): Remove.
 
 2013-05-18  Juri Linkov  <address@hidden>
 

=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el       2013-05-19 06:01:23 +0000
+++ b/lisp/progmodes/ruby-mode.el       2013-05-19 06:52:22 +0000
@@ -1435,7 +1435,7 @@
                                         (line-end-position) t)
                 (unless (ruby-singleton-class-p (match-beginning 0))
                   (push (concat (ruby-here-doc-end-match) "\n") res))))
-            (let ((start (point)))
+            (save-excursion
               ;; With multiple openers on the same line, we don't know in which
               ;; part `start' is, so we have to go back to the beginning.
               (when (cdr res)
@@ -1445,11 +1445,9 @@
                 (if (null res)
                     (put-text-property (1- (point)) (point)
                                        'syntax-table (string-to-syntax "\""))))
-              ;; Make extra sure we don't move back, lest we could fall into an
-              ;; inf-loop.
-              (if (< (point) start)
-                  (goto-char start)
-                (ruby-syntax-propertize-expansions start (point)))))))
+              ;; End up at bol following the heredoc openers.
+              ;; Propertize expression expansions from this point forward.
+              ))))
 
       (defun ruby-syntax-enclosing-percent-literal (limit)
         (let ((state (syntax-ppss))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]