* lisp/emacs-lisp/smie.el (smie-next-sexp): Refine last fix.
* lisp/progmodes/ruby-mode.el (ruby-smie-rules): Tweak handling of open braces.
This commit is contained in:
parent
bdc6b4c8f6
commit
d2e0e79548
3 changed files with 12 additions and 4 deletions
|
@ -1,5 +1,10 @@
|
|||
2013-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* progmodes/ruby-mode.el (ruby-smie-rules): Tweak handling of
|
||||
open braces.
|
||||
|
||||
* emacs-lisp/smie.el (smie-next-sexp): Refine last fix.
|
||||
|
||||
* textmodes/css-mode.el (css-smie-rules): Fix indentation (bug#15467).
|
||||
(css-mode): Use electric-indent-chars.
|
||||
|
||||
|
|
|
@ -709,11 +709,13 @@ Possible return values:
|
|||
(condition-case err
|
||||
(progn (funcall next-sexp 1) nil)
|
||||
(scan-error
|
||||
(let ((pos (nth 2 err)))
|
||||
(let ((epos (nth 2 err)))
|
||||
(goto-char pos)
|
||||
(throw 'return
|
||||
(list t pos
|
||||
(list t epos
|
||||
(buffer-substring-no-properties
|
||||
pos (+ pos (if (< (point) pos) -1 1))))))))
|
||||
epos
|
||||
(+ epos (if (< (point) epos) -1 1))))))))
|
||||
(if (eq pos (point))
|
||||
;; We did not move, so let's abort the loop.
|
||||
(throw 'return (list t (point))))))
|
||||
|
|
|
@ -414,7 +414,8 @@ Also ignores spaces after parenthesis when 'space."
|
|||
(`(:before . ,(or `"(" `"[" `"{"))
|
||||
;; Treat purely syntactic block-constructs as being part of their parent,
|
||||
;; when the opening statement is hanging.
|
||||
(if (smie-rule-hanging-p) (smie-rule-parent)))
|
||||
(when (smie-rule-hanging-p)
|
||||
(smie-backward-sexp 'halfsexp) (smie-indent-virtual)))
|
||||
(`(:after . "=") 2)
|
||||
(`(:before . "do")
|
||||
(when (or (smie-rule-hanging-p)
|
||||
|
|
Loading…
Add table
Reference in a new issue