aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorDmitry Gutov2014-02-23 10:26:40 +0200
committerDmitry Gutov2014-02-23 10:26:40 +0200
commitdfdb365c4ce062e3506d350e185bc71c0bcc8b10 (patch)
tree6f79688a3bfb5d7986806e8bd00e5d2e38c015a8 /lisp
parent62f9502226a8b910df0abe62b9f9fc7104647c62 (diff)
downloademacs-dfdb365c4ce062e3506d350e185bc71c0bcc8b10.tar.gz
emacs-dfdb365c4ce062e3506d350e185bc71c0bcc8b10.zip
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Handle the
inconsistent second element of the list returned by `smie-indent--parent'. (ruby-font-lock-keywords): Disqualify any identifier before `=' as method call.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/progmodes/ruby-mode.el10
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bcb09e177c6..40f5d7defc1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,10 @@
2 2
3 * progmodes/ruby-mode.el (ruby-smie-rules): Don't indent specially 3 * progmodes/ruby-mode.el (ruby-smie-rules): Don't indent specially
4 after `=>' (bug#16811). 4 after `=>' (bug#16811).
5 (ruby-smie-rules): Handle the inconsistent second element of the
6 list returned by `smie-indent--parent'.
7 (ruby-font-lock-keywords): Disqualify any identifier before `=' as
8 method call.
5 9
62014-02-23 Juanma Barranquero <lekktu@gmail.com> 102014-02-23 Juanma Barranquero <lekktu@gmail.com>
7 11
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 709bc67451d..5cd054a22a8 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -630,9 +630,11 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'."
630 (save-excursion 630 (save-excursion
631 ;; Traverse up the parents until the parent is "." at 631 ;; Traverse up the parents until the parent is "." at
632 ;; indentation, or any other token. 632 ;; indentation, or any other token.
633 (while (and (progn 633 (while (and (let ((parent (smie-indent--parent)))
634 (goto-char (1- (cadr (smie-indent--parent)))) 634 (goto-char (cadr parent))
635 (not (ruby-smie--bosp))) 635 (save-excursion
636 (unless (integerp (car parent)) (forward-char -1))
637 (not (ruby-smie--bosp))))
636 (progn 638 (progn
637 (setq smie--parent nil) 639 (setq smie--parent nil)
638 (smie-rule-parent-p ".")))) 640 (smie-rule-parent-p "."))))
@@ -2061,7 +2063,7 @@ See `font-lock-syntax-table'.")
2061 "refine" 2063 "refine"
2062 "using") 2064 "using")
2063 'symbols)) 2065 'symbols))
2064 (1 (unless (looking-at " *\\(?:[]|,.)}]\\|$\\)") 2066 (1 (unless (looking-at " *\\(?:[]|,.)}=]\\|$\\)")
2065 font-lock-builtin-face))) 2067 font-lock-builtin-face)))
2066 ;; Kernel methods that have no required arguments. 2068 ;; Kernel methods that have no required arguments.
2067 (,(concat 2069 (,(concat