Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
90750:f8cc067aba62 | 90751:52a7f3f50b89 |
---|---|
95 (eval-when-compile | 95 (eval-when-compile |
96 (regexp-opt | 96 (regexp-opt |
97 '("defun" "defun*" "defsubst" "defmacro" | 97 '("defun" "defun*" "defsubst" "defmacro" |
98 "defadvice" "define-skeleton" | 98 "defadvice" "define-skeleton" |
99 "define-minor-mode" "define-global-minor-mode" | 99 "define-minor-mode" "define-global-minor-mode" |
100 "define-globalized-minor-mode" | |
100 "define-derived-mode" "define-generic-mode" | 101 "define-derived-mode" "define-generic-mode" |
101 "define-compiler-macro" "define-modify-macro" | 102 "define-compiler-macro" "define-modify-macro" |
102 "defsetf" "define-setf-expander" | 103 "defsetf" "define-setf-expander" |
103 "define-method-combination" | 104 "define-method-combination" |
104 "defgeneric" "defmethod") t)) | 105 "defgeneric" "defmethod") t)) |
141 (put 'define-compilation-mode 'doc-string-elt 3) | 142 (put 'define-compilation-mode 'doc-string-elt 3) |
142 (put 'easy-mmode-define-minor-mode 'doc-string-elt 2) | 143 (put 'easy-mmode-define-minor-mode 'doc-string-elt 2) |
143 (put 'define-minor-mode 'doc-string-elt 2) | 144 (put 'define-minor-mode 'doc-string-elt 2) |
144 (put 'easy-mmode-define-global-mode 'doc-string-elt 2) | 145 (put 'easy-mmode-define-global-mode 'doc-string-elt 2) |
145 (put 'define-global-minor-mode 'doc-string-elt 2) | 146 (put 'define-global-minor-mode 'doc-string-elt 2) |
147 (put 'define-globalized-minor-mode 'doc-string-elt 2) | |
146 (put 'define-generic-mode 'doc-string-elt 7) | 148 (put 'define-generic-mode 'doc-string-elt 7) |
147 (put 'define-ibuffer-filter 'doc-string-elt 2) | 149 (put 'define-ibuffer-filter 'doc-string-elt 2) |
148 (put 'define-ibuffer-op 'doc-string-elt 3) | 150 (put 'define-ibuffer-op 'doc-string-elt 3) |
149 (put 'define-ibuffer-sorter 'doc-string-elt 2) | 151 (put 'define-ibuffer-sorter 'doc-string-elt 2) |
150 (put 'lambda 'doc-string-elt 2) | 152 (put 'lambda 'doc-string-elt 2) |
1126 (progn | 1128 (progn |
1127 (setq indent-stack (nconc indent-stack | 1129 (setq indent-stack (nconc indent-stack |
1128 (make-list (- next-depth) nil)) | 1130 (make-list (- next-depth) nil)) |
1129 last-depth (- last-depth next-depth) | 1131 last-depth (- last-depth next-depth) |
1130 next-depth 0))) | 1132 next-depth 0))) |
1131 (or outer-loop-done endpos | 1133 (forward-line 1) |
1132 (setq outer-loop-done (<= next-depth 0))) | 1134 ;; Decide whether to exit. |
1133 (if outer-loop-done | 1135 (if endpos |
1134 (forward-line 1) | 1136 ;; If we have already reached the specified end, |
1137 ;; give up and do not reindent this line. | |
1138 (if (<= endpos (point)) | |
1139 (setq outer-loop-done t)) | |
1140 ;; If no specified end, we are done if we have finished one sexp. | |
1141 (if (<= next-depth 0) | |
1142 (setq outer-loop-done t))) | |
1143 (unless outer-loop-done | |
1135 (while (> last-depth next-depth) | 1144 (while (> last-depth next-depth) |
1136 (setq indent-stack (cdr indent-stack) | 1145 (setq indent-stack (cdr indent-stack) |
1137 last-depth (1- last-depth))) | 1146 last-depth (1- last-depth))) |
1138 (while (< last-depth next-depth) | 1147 (while (< last-depth next-depth) |
1139 (setq indent-stack (cons nil indent-stack) | 1148 (setq indent-stack (cons nil indent-stack) |
1140 last-depth (1+ last-depth))) | 1149 last-depth (1+ last-depth))) |
1141 ;; Now go to the next line and indent it according | 1150 ;; Now indent the next line according |
1142 ;; to what we learned from parsing the previous one. | 1151 ;; to what we learned from parsing the previous one. |
1143 (forward-line 1) | |
1144 (setq bol (point)) | 1152 (setq bol (point)) |
1145 (skip-chars-forward " \t") | 1153 (skip-chars-forward " \t") |
1146 ;; But not if the line is blank, or just a comment | 1154 ;; But not if the line is blank, or just a comment |
1147 ;; (except for double-semi comments; indent them as usual). | 1155 ;; (except for double-semi comments; indent them as usual). |
1148 (if (or (eobp) (looking-at "\\s<\\|\n")) | 1156 (if (or (eobp) (looking-at "\\s<\\|\n")) |