# HG changeset patch # User Thien-Thi Nguyen # Date 1184597851 0 # Node ID d330cbad60ac831d9df319882a7a1d989237e6e1 # Parent e9d6a41a04c6e5ab2f9feeef6b6726b638c8d3aa (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". diff -r e9d6a41a04c6 -r d330cbad60ac lisp/emacs-lisp/lisp-mode.el --- a/lisp/emacs-lisp/lisp-mode.el Mon Jul 16 13:22:13 2007 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Mon Jul 16 14:57:31 2007 +0000 @@ -932,6 +932,16 @@ (goto-char indent-point) (skip-chars-forward " \t") (looking-at ":")) + ;; The last sexp may not be at the indentation + ;; where it begins, so find that one, instead. + (save-excursion + (goto-char calculate-lisp-indent-last-sexp) + (while (and (not (looking-back "^[ \t]*")) + (or (not containing-sexp) + (< (1+ containing-sexp) (point)))) + (forward-sexp -1) + (backward-prefix-chars)) + (setq calculate-lisp-indent-last-sexp (point))) (> calculate-lisp-indent-last-sexp (save-excursion (goto-char (1+ containing-sexp))