comparison lisp/emacs-lisp/lisp-mode.el @ 90776:dd7c098af727

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 638-652) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 202) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-177
author Miles Bader <miles@gnu.org>
date Mon, 26 Feb 2007 23:03:45 +0000
parents 52a7f3f50b89 2e16068bd4fb
children 91bf6e05918b
comparison
equal deleted inserted replaced
90775:7d8921cab8aa 90776:dd7c098af727
907 ;; or if the desired indentation has already been computed. 907 ;; or if the desired indentation has already been computed.
908 (let ((normal-indent (current-column))) 908 (let ((normal-indent (current-column)))
909 (cond ((elt state 3) 909 (cond ((elt state 3)
910 ;; Inside a string, don't change indentation. 910 ;; Inside a string, don't change indentation.
911 nil) 911 nil)
912 ((save-excursion
913 ;; test whether current line begins with a constant
914 (goto-char indent-point)
915 (skip-chars-forward " \t")
916 (looking-at ":"))
917 (let ((desired-indent
918 (save-excursion
919 (goto-char (1+ containing-sexp))
920 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
921 (point)))
922 (parse-sexp-ignore-comments t))
923 ;; Align a constant symbol under the last constant symbol
924 (goto-char calculate-lisp-indent-last-sexp)
925 (while (> (point) desired-indent)
926 (if (looking-at ":")
927 (setq desired-indent (point))
928 (backward-sexp 1))))
929 (current-column))
912 ((and (integerp lisp-indent-offset) containing-sexp) 930 ((and (integerp lisp-indent-offset) containing-sexp)
913 ;; Indent by constant offset 931 ;; Indent by constant offset
914 (goto-char containing-sexp) 932 (goto-char containing-sexp)
915 (+ (current-column) lisp-indent-offset)) 933 (+ (current-column) lisp-indent-offset))
916 (desired-indent) 934 (desired-indent)