mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-01 08:17:38 +00:00
(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".
This commit is contained in:
parent
413a79ad66
commit
1499cfbada
@ -1,3 +1,9 @@
|
||||
2007-07-16 Thien-Thi Nguyen <ttn@gnuvola.org>
|
||||
|
||||
* emacs-lisp/lisp-mode.el (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".
|
||||
|
||||
2007-07-13 Drew Adams <drew.adams@oracle.com>
|
||||
|
||||
* mouse.el (mouse-yank-secondary): Better error message if no
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user