Index: lisp-mode.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/lisp-mode.el,v retrieving revision 1.228 diff -c -r1.228 lisp-mode.el *** lisp-mode.el 23 Sep 2008 17:59:28 -0000 1.228 --- lisp-mode.el 1 Oct 2008 19:10:51 -0000 *************** *** 1014,1055 **** (not retry) (funcall lisp-indent-function indent-point state)) ;; If the function has no special alignment ! ;; or it does not apply to this argument, ! ;; try to align a constant-symbol under the last ! ;; preceding constant symbol, if there is such one of ! ;; the last 2 preceding symbols, in the previous ! ;; uncommented line. (and (save-excursion (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) ! ;; Handle prefix characters and whitespace ! ;; following an open paren. (Bug#1012) ! (backward-prefix-chars) ! (while (and (not (looking-back "^[ \t]*\\|([ \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)) ! (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) ! (point))) (let ((parse-sexp-ignore-comments t) indent) ! (goto-char calculate-lisp-indent-last-sexp) ! (or (and (looking-at ":") ! (setq indent (current-column))) ! (and (< (save-excursion (beginning-of-line) (point)) ! (prog2 (backward-sexp) (point))) ! (looking-at ":") ! (setq indent (current-column)))) indent)) ;; another symbols or constants not preceded by a constant ;; as defined above. --- 1014,1046 ---- (not retry) (funcall lisp-indent-function indent-point state)) ;; If the function has no special alignment ! ;; or it does not apply to this argument, ! ;; try to treat a constant symbol in a special way. (and (save-excursion (goto-char indent-point) (skip-chars-forward " \t") (looking-at ":")) ! ;; Treat it only special, if the sexp preceding it begins ! ;; in the same line as the containing sexp ! (< calculate-lisp-indent-last-sexp ! (save-excursion (goto-char containing-sexp) ! (end-of-line) (point))) ! ;; Don't treat it special, if the containing sexp is a ! ;; vector ! (save-excursion (goto-char containing-sexp) ! (not (looking-at "\\["))) ! ;; Align it under the first constant symbol, if any, ! ;; between the beginning of the containing sexp and ! ;; the preceding sexp (let ((parse-sexp-ignore-comments t) indent) ! (goto-char (1+ containing-sexp)) ! (while (and (<= (point) calculate-lisp-indent-last-sexp) ! (not indent)) ! (skip-syntax-forward "-") ! (if (looking-at ":") ! (setq indent (current-column)) ! (forward-sexp))) indent)) ;; another symbols or constants not preceded by a constant ;; as defined above.