emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100547: * lisp/emacs-lisp/smie.el (s


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100547: * lisp/emacs-lisp/smie.el (smie-indent-keyword): Remove special case that
Date: Tue, 08 Jun 2010 22:58:26 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100547
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Tue 2010-06-08 22:58:26 -0400
message:
  * lisp/emacs-lisp/smie.el (smie-indent-keyword): Remove special case that
  can be handled with a ((:before "fn") (:prev "=>" parent)) rule.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/smie.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-06-07 21:01:23 +0000
+++ b/lisp/ChangeLog    2010-06-09 02:58:26 +0000
@@ -1,3 +1,8 @@
+2010-06-09  Stefan Monnier  <address@hidden>
+
+       * 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  <address@hidden>
 
        * iimage.el: Remove images as soon as the underlying text is modified.

=== modified file 'lisp/emacs-lisp/smie.el'
--- a/lisp/emacs-lisp/smie.el   2010-06-07 19:37:50 +0000
+++ b/lisp/emacs-lisp/smie.el   2010-06-09 02:58:26 +0000
@@ -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 @@
             ;;    -> 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))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]