diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/smie.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 3 |
3 files changed, 12 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 972eb2fe2d7..64fedd32191 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2013-10-07 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2013-10-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * progmodes/ruby-mode.el (ruby-smie-rules): Tweak handling of | ||
| 4 | open braces. | ||
| 5 | |||
| 6 | * emacs-lisp/smie.el (smie-next-sexp): Refine last fix. | ||
| 7 | |||
| 3 | * textmodes/css-mode.el (css-smie-rules): Fix indentation (bug#15467). | 8 | * textmodes/css-mode.el (css-smie-rules): Fix indentation (bug#15467). |
| 4 | (css-mode): Use electric-indent-chars. | 9 | (css-mode): Use electric-indent-chars. |
| 5 | 10 | ||
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index e35cb4a8fc2..32dcb2ed744 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el | |||
| @@ -709,11 +709,13 @@ Possible return values: | |||
| 709 | (condition-case err | 709 | (condition-case err |
| 710 | (progn (funcall next-sexp 1) nil) | 710 | (progn (funcall next-sexp 1) nil) |
| 711 | (scan-error | 711 | (scan-error |
| 712 | (let ((pos (nth 2 err))) | 712 | (let ((epos (nth 2 err))) |
| 713 | (goto-char pos) | ||
| 713 | (throw 'return | 714 | (throw 'return |
| 714 | (list t pos | 715 | (list t epos |
| 715 | (buffer-substring-no-properties | 716 | (buffer-substring-no-properties |
| 716 | pos (+ pos (if (< (point) pos) -1 1)))))))) | 717 | epos |
| 718 | (+ epos (if (< (point) epos) -1 1)))))))) | ||
| 717 | (if (eq pos (point)) | 719 | (if (eq pos (point)) |
| 718 | ;; We did not move, so let's abort the loop. | 720 | ;; We did not move, so let's abort the loop. |
| 719 | (throw 'return (list t (point)))))) | 721 | (throw 'return (list t (point)))))) |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index b8c24e8a690..6497fb6b7d0 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -414,7 +414,8 @@ Also ignores spaces after parenthesis when 'space." | |||
| 414 | (`(:before . ,(or `"(" `"[" `"{")) | 414 | (`(:before . ,(or `"(" `"[" `"{")) |
| 415 | ;; Treat purely syntactic block-constructs as being part of their parent, | 415 | ;; Treat purely syntactic block-constructs as being part of their parent, |
| 416 | ;; when the opening statement is hanging. | 416 | ;; when the opening statement is hanging. |
| 417 | (if (smie-rule-hanging-p) (smie-rule-parent))) | 417 | (when (smie-rule-hanging-p) |
| 418 | (smie-backward-sexp 'halfsexp) (smie-indent-virtual))) | ||
| 418 | (`(:after . "=") 2) | 419 | (`(:after . "=") 2) |
| 419 | (`(:before . "do") | 420 | (`(:before . "do") |
| 420 | (when (or (smie-rule-hanging-p) | 421 | (when (or (smie-rule-hanging-p) |