Mercurial > emacs
diff lisp/emacs-lisp/lisp-mode.el @ 90751:52a7f3f50b89
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 624-636)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 200-201)
- Merge from emacs--devo--0
- Update from CVS: lisp/nnweb.el (nnweb-google-parse-1): Update parser.
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-171
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 13 Feb 2007 12:14:16 +0000 |
parents | 95d0cdf160ea 8496bd7b062a |
children | dd7c098af727 |
line wrap: on
line diff
--- a/lisp/emacs-lisp/lisp-mode.el Mon Feb 12 02:58:27 2007 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Tue Feb 13 12:14:16 2007 +0000 @@ -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) @@ -1128,19 +1130,25 @@ (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