emacs-devel
[Top][All Lists]
Advanced

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

Re: Bug in lisp indentation


From: Thien-Thi Nguyen
Subject: Re: Bug in lisp indentation
Date: Sat, 14 Jul 2007 22:06:40 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.97 (gnu/linux)

oops, upon further testing i see the first try was buggy.
below is try #2.  please discard try #1.

thi

____________________________________________
diff -c -r1.202 lisp-mode.el
*** lisp-mode.el        6 Jul 2007 17:26:29 -0000       1.202
--- lisp-mode.el        14 Jul 2007 20:03:25 -0000
***************
*** 855,860 ****
--- 855,869 ----
          (setq retry nil)
          (setq calculate-lisp-indent-last-sexp (elt state 2))
          (setq containing-sexp (elt state 1))
+         ;; The last sexp may not be the first sexp on the line
+         ;; where it begins, so find that one, instead.
+         (when calculate-lisp-indent-last-sexp
+           (goto-char calculate-lisp-indent-last-sexp)
+           (when (and containing-sexp
+                      (< containing-sexp (line-beginning-position)))
+             (beginning-of-line)
+             (skip-chars-forward " \t")
+             (setq calculate-lisp-indent-last-sexp (point))))
          ;; Position following last unclosed open.
          (goto-char (1+ containing-sexp))
          ;; Is there a complete sexp since then?




reply via email to

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