Mercurial > emacs
comparison lisp/emacs-lisp/lisp-mode.el @ 90261:7beb78bc1f8e
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-97
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 616-696)
- Add lisp/mh-e/.arch-inventory
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords.
- lisp/gnus/ChangeLog: Remove duplicate entry
* gnus--rel--5.10 (patch 147-181)
- Update from CVS
- Merge from emacs--cvs-trunk--0
- Update from CVS: lisp/mml.el (mml-preview): Doc fix.
- Update from CVS: texi/message.texi: Fix default values.
- Update from CVS: texi/gnus.texi (RSS): Addition.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 16 Jan 2006 08:37:27 +0000 |
parents | aa89c814f853 df35219b6508 |
children | c5406394f567 |
comparison
equal
deleted
inserted
replaced
90260:0ca0d9181b5e | 90261:7beb78bc1f8e |
---|---|
94 (purecopy (concat "^\\s-*(" | 94 (purecopy (concat "^\\s-*(" |
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-derived-mode" | 99 "define-minor-mode" "define-global-minor-mode" |
100 "define-generic-mode" | 100 "define-derived-mode" "define-generic-mode" |
101 "define-compiler-macro" "define-modify-macro" | 101 "define-compiler-macro" "define-modify-macro" |
102 "defsetf" "define-setf-expander" | 102 "defsetf" "define-setf-expander" |
103 "define-method-combination" | 103 "define-method-combination" |
104 "defgeneric" "defmethod") t)) | 104 "defgeneric" "defmethod") t)) |
105 "\\s-+\\(\\sw\\(\\sw\\|\\s_\\)+\\)")) | 105 "\\s-+\\(\\(\\sw\\|\\s_\\)+\\)")) |
106 2) | 106 2) |
107 (list (purecopy "Variables") | 107 (list (purecopy "Variables") |
108 (purecopy (concat "^\\s-*(" | 108 (purecopy (concat "^\\s-*(" |
109 (eval-when-compile | 109 (eval-when-compile |
110 (regexp-opt | 110 (regexp-opt |
111 '("defvar" "defconst" "defconstant" "defcustom" | 111 '("defvar" "defconst" "defconstant" "defcustom" |
112 "defparameter" "define-symbol-macro") t)) | 112 "defparameter" "define-symbol-macro") t)) |
113 "\\s-+\\(\\sw\\(\\sw\\|\\s_\\)+\\)")) | 113 "\\s-+\\(\\(\\sw\\|\\s_\\)+\\)")) |
114 2) | 114 2) |
115 (list (purecopy "Types") | 115 (list (purecopy "Types") |
116 (purecopy (concat "^\\s-*(" | 116 (purecopy (concat "^\\s-*(" |
117 (eval-when-compile | 117 (eval-when-compile |
118 (regexp-opt | 118 (regexp-opt |
119 '("defgroup" "deftheme" "deftype" "defstruct" | 119 '("defgroup" "deftheme" "deftype" "defstruct" |
120 "defclass" "define-condition" "define-widget" | 120 "defclass" "define-condition" "define-widget" |
121 "defface" "defpackage") t)) | 121 "defface" "defpackage") t)) |
122 "\\s-+'?\\(\\sw\\(\\sw\\|\\s_\\)+\\)")) | 122 "\\s-+'?\\(\\(\\sw\\|\\s_\\)+\\)")) |
123 2)) | 123 2)) |
124 | 124 |
125 "Imenu generic expression for Lisp mode. See `imenu-generic-expression'.") | 125 "Imenu generic expression for Lisp mode. See `imenu-generic-expression'.") |
126 | 126 |
127 ;; This was originally in autoload.el and is still used there. | 127 ;; This was originally in autoload.el and is still used there. |
139 (put 'define-skeleton 'doc-string-elt 2) | 139 (put 'define-skeleton 'doc-string-elt 2) |
140 (put 'define-derived-mode 'doc-string-elt 4) | 140 (put 'define-derived-mode 'doc-string-elt 4) |
141 (put 'define-compilation-mode 'doc-string-elt 3) | 141 (put 'define-compilation-mode 'doc-string-elt 3) |
142 (put 'easy-mmode-define-minor-mode 'doc-string-elt 2) | 142 (put 'easy-mmode-define-minor-mode 'doc-string-elt 2) |
143 (put 'define-minor-mode 'doc-string-elt 2) | 143 (put 'define-minor-mode 'doc-string-elt 2) |
144 (put 'easy-mmode-define-global-mode 'doc-string-elt 2) | |
145 (put 'define-global-minor-mode 'doc-string-elt 2) | |
144 (put 'define-generic-mode 'doc-string-elt 7) | 146 (put 'define-generic-mode 'doc-string-elt 7) |
145 ;; define-global-mode has no explicit docstring. | |
146 (put 'easy-mmode-define-global-mode 'doc-string-elt 0) | |
147 (put 'define-ibuffer-filter 'doc-string-elt 2) | 147 (put 'define-ibuffer-filter 'doc-string-elt 2) |
148 (put 'define-ibuffer-op 'doc-string-elt 3) | 148 (put 'define-ibuffer-op 'doc-string-elt 3) |
149 (put 'define-ibuffer-sorter 'doc-string-elt 2) | 149 (put 'define-ibuffer-sorter 'doc-string-elt 2) |
150 (put 'lambda 'doc-string-elt 2) | 150 (put 'lambda 'doc-string-elt 2) |
151 (put 'defalias 'doc-string-elt 3) | |
152 (put 'defvaralias 'doc-string-elt 3) | |
153 (put 'define-category 'doc-string-elt 2) | |
151 | 154 |
152 (defvar lisp-doc-string-elt-property 'doc-string-elt | 155 (defvar lisp-doc-string-elt-property 'doc-string-elt |
153 "The symbol property that holds the docstring position info.") | 156 "The symbol property that holds the docstring position info.") |
154 | 157 |
155 (defun lisp-font-lock-syntactic-face-function (state) | 158 (defun lisp-font-lock-syntactic-face-function (state) |
230 (setq comment-add 1) ;default to `;;' in comment-region | 233 (setq comment-add 1) ;default to `;;' in comment-region |
231 (make-local-variable 'comment-column) | 234 (make-local-variable 'comment-column) |
232 (setq comment-column 40) | 235 (setq comment-column 40) |
233 ;; Don't get confused by `;' in doc strings when paragraph-filling. | 236 ;; Don't get confused by `;' in doc strings when paragraph-filling. |
234 (set (make-local-variable 'comment-use-global-state) t) | 237 (set (make-local-variable 'comment-use-global-state) t) |
235 (make-local-variable 'comment-indent-function) | |
236 (setq comment-indent-function 'lisp-comment-indent) | |
237 (make-local-variable 'imenu-generic-expression) | 238 (make-local-variable 'imenu-generic-expression) |
238 (setq imenu-generic-expression lisp-imenu-generic-expression) | 239 (setq imenu-generic-expression lisp-imenu-generic-expression) |
239 (make-local-variable 'multibyte-syntax-as-symbol) | 240 (make-local-variable 'multibyte-syntax-as-symbol) |
240 (setq multibyte-syntax-as-symbol t) | 241 (setq multibyte-syntax-as-symbol t) |
241 (set (make-local-variable 'syntax-begin-function) 'beginning-of-defun) | 242 (set (make-local-variable 'syntax-begin-function) 'beginning-of-defun) |
743 (setq value (eval-defun-2)) | 744 (setq value (eval-defun-2)) |
744 (setq new-value debug-on-error)) | 745 (setq new-value debug-on-error)) |
745 (unless (eq old-value new-value) | 746 (unless (eq old-value new-value) |
746 (setq debug-on-error new-value)) | 747 (setq debug-on-error new-value)) |
747 value))))) | 748 value))))) |
748 | 749 |
749 ;; Used for comment-indent-function in Lisp modes. | 750 ;; May still be used by some external Lisp-mode variant. |
750 (defun lisp-comment-indent () | 751 (define-obsolete-function-alias 'lisp-comment-indent 'comment-indent-default) |
751 (if (looking-at "\\s<\\s<\\s<") | |
752 (current-column) | |
753 (if (looking-at "\\s<\\s<") | |
754 (let ((tem (or (calculate-lisp-indent) (current-column)))) | |
755 (if (listp tem) (car tem) tem)) | |
756 (skip-chars-backward " \t") | |
757 (max (if (bolp) 0 (1+ (current-column))) | |
758 comment-column)))) | |
759 | 752 |
760 ;; This function just forces a more costly detection of comments (using | 753 ;; This function just forces a more costly detection of comments (using |
761 ;; parse-partial-sexp from beginning-of-defun). I.e. It avoids the problem of | 754 ;; parse-partial-sexp from beginning-of-defun). I.e. It avoids the problem of |
762 ;; taking a `;' inside a string started on another line for a comment starter. | 755 ;; taking a `;' inside a string started on another line for a comment starter. |
763 ;; Note: `newcomment' gets it right now since we set comment-use-global-state | 756 ;; Note: `newcomment' gets it right now since we set comment-use-global-state |