aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2013-11-08 23:23:11 +0200
committerDmitry Gutov2013-11-08 23:23:11 +0200
commitffa2df72a8142426b5f173439a257968e44b69fd (patch)
treeba40bbfb5df63f241d0e51f42398ddd597ef605b
parent5b97b4c0dff8ea6b77040fa11b3e28e4a1289ac5 (diff)
downloademacs-ffa2df72a8142426b5f173439a257968e44b69fd.tar.gz
emacs-ffa2df72a8142426b5f173439a257968e44b69fd.zip
* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token)
(ruby-smie--backward-token): Only consider full-string matches.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/ruby-mode.el4
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0781971c38f..e2aa935d347 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-11-08 Dmitry Gutov <dgutov@yandex.ru>
2
3 * progmodes/ruby-mode.el (ruby-smie--forward-token)
4 (ruby-smie--backward-token): Only consider full-string matches.
5
12013-11-08 Jan Djärv <jan.h.d@swipnet.se> 62013-11-08 Jan Djärv <jan.h.d@swipnet.se>
2 7
3 * faces.el (describe-face): Add distant-foreground. 8 * faces.el (describe-face): Add distant-foreground.
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 1602848c712..7b40bf536f8 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -438,7 +438,7 @@ explicitly declared in magic comment."
438 ((member tok '("unless" "if" "while" "until")) 438 ((member tok '("unless" "if" "while" "until"))
439 (if (save-excursion (forward-word -1) (ruby-smie--bosp)) 439 (if (save-excursion (forward-word -1) (ruby-smie--bosp))
440 tok "iuwu-mod")) 440 tok "iuwu-mod"))
441 ((string-match "|[*&]?" tok) 441 ((string-match-p "\\`|[*&]?\\'" tok)
442 (forward-char (- 1 (length tok))) 442 (forward-char (- 1 (length tok)))
443 (setq tok "|") 443 (setq tok "|")
444 (if (ruby-smie--opening-pipe-p) "opening-|" tok)) 444 (if (ruby-smie--opening-pipe-p) "opening-|" tok))
@@ -482,7 +482,7 @@ explicitly declared in magic comment."
482 tok "iuwu-mod")) 482 tok "iuwu-mod"))
483 ((equal tok "|") 483 ((equal tok "|")
484 (if (ruby-smie--opening-pipe-p) "opening-|" tok)) 484 (if (ruby-smie--opening-pipe-p) "opening-|" tok))
485 ((string-match-p "|[*&]" tok) 485 ((string-match-p "\\`|[*&]\\'" tok)
486 (forward-char 1) 486 (forward-char 1)
487 (substring tok 1)) 487 (substring tok 1))
488 ((and (equal tok "") (eq ?\\ (char-before)) (looking-at "\n")) 488 ((and (equal tok "") (eq ?\\ (char-before)) (looking-at "\n"))