aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThien-Thi Nguyen2007-07-16 14:59:10 +0000
committerThien-Thi Nguyen2007-07-16 14:59:10 +0000
commit1499cfbada1d9e6c0f23bc24649e23cd66fa4c78 (patch)
treec1ca4af5db4f4e5eb0fc8a42e0d3ad3866f74bd2
parent413a79ad664be5cf43a3b1b1136f5625bf14bc8f (diff)
downloademacs-1499cfbada1d9e6c0f23bc24649e23cd66fa4c78.tar.gz
emacs-1499cfbada1d9e6c0f23bc24649e23cd66fa4c78.zip
(calculate-lisp-indent): In the case of alignment under a constant symbol,
find and consider the sexp actually at indentation to be the "last sexp".
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/emacs-lisp/lisp-mode.el10
2 files changed, 16 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 613fb8063c6..c2a6b6525a2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12007-07-16 Thien-Thi Nguyen <ttn@gnuvola.org>
2
3 * emacs-lisp/lisp-mode.el (calculate-lisp-indent): In the
4 case of alignment under a constant symbol, find and consider
5 the sexp actually at indentation to be the "last sexp".
6
12007-07-13 Drew Adams <drew.adams@oracle.com> 72007-07-13 Drew Adams <drew.adams@oracle.com>
2 8
3 * mouse.el (mouse-yank-secondary): Better error message if no 9 * mouse.el (mouse-yank-secondary): Better error message if no
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 374d3ae2327..3160af5d80d 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -932,6 +932,16 @@ is the buffer position of the start of the containing expression."
932 (goto-char indent-point) 932 (goto-char indent-point)
933 (skip-chars-forward " \t") 933 (skip-chars-forward " \t")
934 (looking-at ":")) 934 (looking-at ":"))
935 ;; The last sexp may not be at the indentation
936 ;; where it begins, so find that one, instead.
937 (save-excursion
938 (goto-char calculate-lisp-indent-last-sexp)
939 (while (and (not (looking-back "^[ \t]*"))
940 (or (not containing-sexp)
941 (< (1+ containing-sexp) (point))))
942 (forward-sexp -1)
943 (backward-prefix-chars))
944 (setq calculate-lisp-indent-last-sexp (point)))
935 (> calculate-lisp-indent-last-sexp 945 (> calculate-lisp-indent-last-sexp
936 (save-excursion 946 (save-excursion
937 (goto-char (1+ containing-sexp)) 947 (goto-char (1+ containing-sexp))