mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-24 06:20:43 -08:00
* lisp/emacs-lisp/smie.el (smie-indent-keyword): Remove special case that
can be handled with a ((:before "fn") (:prev "=>" parent)) rule.
This commit is contained in:
parent
0e4966fb65
commit
e7d67e73b2
2 changed files with 10 additions and 9 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2010-06-09 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
* emacs-lisp/smie.el (smie-indent-keyword): Remove special case that
|
||||||
|
can be handled with a ((:before "fn") (:prev "=>" parent)) rule.
|
||||||
|
|
||||||
2010-06-07 Martin Pohlack <mp26@os.inf.tu-dresden.de>
|
2010-06-07 Martin Pohlack <mp26@os.inf.tu-dresden.de>
|
||||||
|
|
||||||
* iimage.el: Remove images as soon as the underlying text is modified.
|
* iimage.el: Remove images as soon as the underlying text is modified.
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
;; the parser's state;
|
;; the parser's state;
|
||||||
;; - because of that locality, indentation also works just fine when earlier
|
;; - because of that locality, indentation also works just fine when earlier
|
||||||
;; parts of the buffer are syntactically incorrect since the indentation
|
;; 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.
|
;; decision.
|
||||||
;; - they typically have no error handling and can't even detect a parsing
|
;; - 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
|
;; 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
|
;; and Ceriel Jacobs (BookBody.pdf available at
|
||||||
;; http://www.cs.vu.nl/~dick/PTAPG.html).
|
;; http://www.cs.vu.nl/~dick/PTAPG.html).
|
||||||
;;
|
;;
|
||||||
;; OTOH we had to kill many chickens, read many coffee grounds, and practiced
|
;; OTOH we had to kill many chickens, read many coffee grounds, and practice
|
||||||
;; untold numbers of black magic spells.
|
;; 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:
|
;;; Code:
|
||||||
|
|
||||||
|
|
@ -700,12 +702,6 @@ in order to figure out the indentation of some other (further down) point."
|
||||||
;; -> d
|
;; -> d
|
||||||
;; So as to align with the earliest appropriate place.
|
;; So as to align with the earliest appropriate place.
|
||||||
(smie-indent-virtual))
|
(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)
|
((setq tmp (assoc (cons (caddr res) token)
|
||||||
smie-indent-rules))
|
smie-indent-rules))
|
||||||
(goto-char (cadr res))
|
(goto-char (cadr res))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue