From 2b9170195ba8e195e47405054d493523ba2f764d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 3 Feb 2007 17:25:35 +0000 Subject: define-global-minor-mode changed to define-globalized-minor-mode. --- lisp/emacs-lisp/lisp-mode.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp/emacs-lisp/lisp-mode.el') diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 5aa656bd2b5..abc795481a4 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -97,6 +97,7 @@ '("defun" "defun*" "defsubst" "defmacro" "defadvice" "define-skeleton" "define-minor-mode" "define-global-minor-mode" + "define-globalized-minor-mode" "define-derived-mode" "define-generic-mode" "define-compiler-macro" "define-modify-macro" "defsetf" "define-setf-expander" @@ -143,6 +144,7 @@ (put 'define-minor-mode 'doc-string-elt 2) (put 'easy-mmode-define-global-mode 'doc-string-elt 2) (put 'define-global-minor-mode 'doc-string-elt 2) +(put 'define-globalized-minor-mode 'doc-string-elt 2) (put 'define-generic-mode 'doc-string-elt 7) (put 'define-ibuffer-filter 'doc-string-elt 2) (put 'define-ibuffer-op 'doc-string-elt 3) -- cgit v1.2.1 From 9f25c0d219dc1a51761ae397759613894306f0e2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 11 Feb 2007 11:12:20 +0000 Subject: (indent-sexp): Clean up termination condition -- don't fail to stop at endpos. --- lisp/emacs-lisp/lisp-mode.el | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'lisp/emacs-lisp/lisp-mode.el') diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index abc795481a4..8c1cf918b36 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -1130,19 +1130,25 @@ ENDPOS is encountered." (make-list (- next-depth) nil)) last-depth (- last-depth next-depth) next-depth 0))) - (or outer-loop-done endpos - (setq outer-loop-done (<= next-depth 0))) - (if outer-loop-done - (forward-line 1) + (forward-line 1) + ;; Decide whether to exit. + (if endpos + ;; If we have already reached the specified end, + ;; give up and do not reindent this line. + (if (<= endpos (point)) + (setq outer-loop-done t)) + ;; If no specified end, we are done if we have finished one sexp. + (if (<= next-depth 0) + (setq outer-loop-done t))) + (unless outer-loop-done (while (> last-depth next-depth) (setq indent-stack (cdr indent-stack) last-depth (1- last-depth))) (while (< last-depth next-depth) (setq indent-stack (cons nil indent-stack) last-depth (1+ last-depth))) - ;; Now go to the next line and indent it according + ;; Now indent the next line according ;; to what we learned from parsing the previous one. - (forward-line 1) (setq bol (point)) (skip-chars-forward " \t") ;; But not if the line is blank, or just a comment -- cgit v1.2.1 From 8e1ac0634abc10422d0739b078a096e381447786 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 17 Feb 2007 11:35:22 +0000 Subject: (calculate-lisp-indent): Added indentation for the constants of Lisp. --- lisp/emacs-lisp/lisp-mode.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lisp/emacs-lisp/lisp-mode.el') diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 8c1cf918b36..5576a4882b0 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -909,6 +909,24 @@ is the buffer position of the start of the containing expression." (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) -- cgit v1.2.1