* lisp/progmodes/ruby-mode.el (ruby-smie--forward-token)

(ruby-smie--backward-token): Only consider full-string matches.
This commit is contained in:
Dmitry Gutov 2013-11-08 23:23:11 +02:00
parent 5b97b4c0df
commit ffa2df72a8
2 changed files with 7 additions and 2 deletions

View file

@ -438,7 +438,7 @@ explicitly declared in magic comment."
((member tok '("unless" "if" "while" "until"))
(if (save-excursion (forward-word -1) (ruby-smie--bosp))
tok "iuwu-mod"))
((string-match "|[*&]?" tok)
((string-match-p "\\`|[*&]?\\'" tok)
(forward-char (- 1 (length tok)))
(setq tok "|")
(if (ruby-smie--opening-pipe-p) "opening-|" tok))
@ -482,7 +482,7 @@ explicitly declared in magic comment."
tok "iuwu-mod"))
((equal tok "|")
(if (ruby-smie--opening-pipe-p) "opening-|" tok))
((string-match-p "|[*&]" tok)
((string-match-p "\\`|[*&]\\'" tok)
(forward-char 1)
(substring tok 1))
((and (equal tok "") (eq ?\\ (char-before)) (looking-at "\n"))