summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-07-18 22:15:15 +0000
committerMiles Bader <miles@gnu.org>2007-07-18 22:15:15 +0000
commit56df6d7756bd89ebf109c3cc4eb18fd734d9f202 (patch)
treeabc51c98d5e9268c0f683f8ad097029abf2e2be7 /lisp/emacs-lisp/lisp-mode.el
parent5ae536e4c0e32e5f030168aa545962b9e20224de (diff)
parent52a96dbe4f5ff17269df881d19e88a9481cd5e6a (diff)
downloademacs-56df6d7756bd89ebf109c3cc4eb18fd734d9f202.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 814-815) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-232
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el10
1 files changed, 10 insertions, 0 deletions
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."
(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))