Mercurial > emacs
comparison lisp/emacs-lisp/lisp-mode.el @ 78180:b22beb3e496f
(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".
author | Thien-Thi Nguyen <ttn@gnuvola.org> |
---|---|
date | Sat, 21 Jul 2007 09:05:21 +0000 |
parents | 8e308ce2d884 |
children | 935157c0b596 a1be62cbd32a |
comparison
equal
deleted
inserted
replaced
78179:d01bc1c34d89 | 78180:b22beb3e496f |
---|---|
930 ;; uncommented line. | 930 ;; uncommented line. |
931 (and (save-excursion | 931 (and (save-excursion |
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)) |
938 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) | 948 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) |
939 (point))) | 949 (point))) |