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