diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2013-05-19 10:52:22 +0400 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2013-05-19 10:52:22 +0400 |
commit | 462388b67387b91b6b42300b861df270491ed1cb (patch) | |
tree | b79c93ad587c9f0eaeeb2b903f1817ea66d1a7da | |
parent | 1a0a0a8a6a7c4cb47bb0d9bb5d3efa281cb70546 (diff) | |
download | emacs-462388b67387b91b6b42300b861df270491ed1cb.tar.gz |
* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize-heredoc): Leave
point at bol following the heredoc openers.
(ruby-syntax-propertize-expansions): Remove.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/progmodes/ruby-mode.el | 10 |
2 files changed, 7 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 903dc74fc7d..8cc4a8876de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 <juri@jurta.org> diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 1732e0ba918..629d5206331 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -1435,7 +1435,7 @@ It will be properly highlighted even when the call omits parens.") (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 @@ It will be properly highlighted even when the call omits parens.") (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)) |