comparison lisp/emacs-lisp/lisp-mode.el @ 98310:49fd9d409f65

(calculate-lisp-indent): Fix indentation problem with keyword symbols when a list starts with ,@ or spaces. (Bug#1012)
author Martin Rudalics <rudalics@gmx.at>
date Tue, 23 Sep 2008 07:05:41 +0000
parents 7e4e0f0026f6
children 8ecc08b621cb
comparison
equal deleted inserted replaced
98309:01cf1247cab6 98310:49fd9d409f65
1025 (looking-at ":")) 1025 (looking-at ":"))
1026 ;; The last sexp may not be at the indentation 1026 ;; The last sexp may not be at the indentation
1027 ;; where it begins, so find that one, instead. 1027 ;; where it begins, so find that one, instead.
1028 (save-excursion 1028 (save-excursion
1029 (goto-char calculate-lisp-indent-last-sexp) 1029 (goto-char calculate-lisp-indent-last-sexp)
1030 (while (and (not (looking-back "^[ \t]*")) 1030 ;; Handle prefix characters and whitespace
1031 ;; following an open paren. (Bug#1012)
1032 (backward-prefix-chars)
1033 (while (and (not (looking-back "^[ \t]*\\|([ \t]+"))
1031 (or (not containing-sexp) 1034 (or (not containing-sexp)
1032 (< (1+ containing-sexp) (point)))) 1035 (< (1+ containing-sexp) (point))))
1033 (forward-sexp -1) 1036 (forward-sexp -1)
1034 (backward-prefix-chars)) 1037 (backward-prefix-chars))
1035 (setq calculate-lisp-indent-last-sexp (point))) 1038 (setq calculate-lisp-indent-last-sexp (point)))