diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-06-08 22:58:26 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2010-06-08 22:58:26 -0400 |
commit | e7d67e73b2bd68701d2972dd1ba181a78a974e8f (patch) | |
tree | 01dc80ba45a5287eb0948c78878018dec5c68db6 /lisp/emacs-lisp | |
parent | 0e4966fb65bb4374d334d127ad1de1f55f5c86c8 (diff) | |
download | emacs-e7d67e73b2bd68701d2972dd1ba181a78a974e8f.tar.gz emacs-e7d67e73b2bd68701d2972dd1ba181a78a974e8f.tar.bz2 emacs-e7d67e73b2bd68701d2972dd1ba181a78a974e8f.zip |
* lisp/emacs-lisp/smie.el (smie-indent-keyword): Remove special case that
can be handled with a ((:before "fn") (:prev "=>" parent)) rule.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/smie.el | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index 0dc58ef7a28..687a43df966 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -45,7 +45,7 @@ ;; the parser's state; ;; - because of that locality, indentation also works just fine when earlier ;; parts of the buffer are syntactically incorrect since the indentation -;; looks at "as little as possible" of the buffer make an indentation +;; looks at "as little as possible" of the buffer to make an indentation ;; decision. ;; - they typically have no error handling and can't even detect a parsing ;; error, so we don't have to worry about what to do in case of a syntax @@ -58,8 +58,10 @@ ;; and Ceriel Jacobs (BookBody.pdf available at ;; http://www.cs.vu.nl/~dick/PTAPG.html). ;; -;; OTOH we had to kill many chickens, read many coffee grounds, and practiced -;; untold numbers of black magic spells. +;; OTOH we had to kill many chickens, read many coffee grounds, and practice +;; untold numbers of black magic spells, to come up with the indentation code. +;; Since then, some of that code has been beaten into submission, but the +;; smie-indent-keyword is still pretty obscure. ;;; Code: @@ -700,12 +702,6 @@ in order to figure out the indentation of some other (further down) point." ;; -> d ;; So as to align with the earliest appropriate place. (smie-indent-virtual)) - ((equal token (save-excursion - (funcall smie-backward-token-function))) - ;; in cases such as "fn x => fn y => fn z =>", - ;; jump back to the very first fn. - ;; FIXME: should we only do that for special tokens like "=>"? - (smie-indent-virtual)) ((setq tmp (assoc (cons (caddr res) token) smie-indent-rules)) (goto-char (cadr res)) |