[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lisp-mode.el,v
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/lisp-mode.el,v |
Date: |
Sat, 17 Feb 2007 11:34:22 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 07/02/17 11:34:22
Index: lisp-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/lisp-mode.el,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -b -r1.198 -r1.199
--- lisp-mode.el 11 Feb 2007 11:11:54 -0000 1.198
+++ lisp-mode.el 17 Feb 2007 11:34:22 -0000 1.199
@@ -909,6 +909,24 @@
(cond ((elt state 3)
;; Inside a string, don't change indentation.
nil)
+ ((save-excursion
+ ;; test whether current line begins with a constant
+ (goto-char indent-point)
+ (skip-chars-forward " \t")
+ (looking-at ":"))
+ (let ((desired-indent
+ (save-excursion
+ (goto-char (1+ containing-sexp))
+ (parse-partial-sexp (point)
calculate-lisp-indent-last-sexp 0 t)
+ (point)))
+ (parse-sexp-ignore-comments t))
+ ;; Align a constant symbol under the last constant symbol
+ (goto-char calculate-lisp-indent-last-sexp)
+ (while (> (point) desired-indent)
+ (if (looking-at ":")
+ (setq desired-indent (point))
+ (backward-sexp 1))))
+ (current-column))
((and (integerp lisp-indent-offset) containing-sexp)
;; Indent by constant offset
(goto-char containing-sexp)