diff options
| author | Tassilo Horn | 2015-03-20 23:35:22 +0100 |
|---|---|---|
| committer | Tassilo Horn | 2015-03-20 23:35:22 +0100 |
| commit | 73b8237c19200e7d8d3739b99ef1e4dc86f51873 (patch) | |
| tree | dba9092296de2e8adfc38dc96afea92396a98bd5 | |
| parent | c9998fcbf40c533004533dee96f2eb67349d55ae (diff) | |
| download | emacs-73b8237c19200e7d8d3739b99ef1e4dc86f51873.tar.gz emacs-73b8237c19200e7d8d3739b99ef1e4dc86f51873.zip | |
Fix CL function name font-lock bug.
* emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-1): Fix
false positive in function name font-locking.
| -rw-r--r-- | lisp/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 11 |
2 files changed, 8 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85e62be80c2..025941f809c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | * emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-1): Fix | 3 | * emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-1): Fix |
| 4 | false positive in function name font-locking. | 4 | false positive in function name font-locking. |
| 5 | (lisp-cl-font-lock-keywords-1): Ditto. | ||
| 5 | 6 | ||
| 6 | 2015-03-20 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2015-03-20 Stefan Monnier <monnier@iro.umontreal.ca> |
| 7 | 8 | ||
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index d8901ac017d..a3bb1a709f6 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -341,13 +341,16 @@ | |||
| 341 | `( ;; Definitions. | 341 | `( ;; Definitions. |
| 342 | (,(concat "(" cl-defs-re "\\_>" | 342 | (,(concat "(" cl-defs-re "\\_>" |
| 343 | ;; Any whitespace and defined object. | 343 | ;; Any whitespace and defined object. |
| 344 | "[ \t'\(]*" | 344 | "[ \t']*" |
| 345 | "\\(setf[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?") | 345 | "\\(([ \t']*\\)?" ;; An opening paren. |
| 346 | "\\(\\(setf\\)[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?") | ||
| 346 | (1 font-lock-keyword-face) | 347 | (1 font-lock-keyword-face) |
| 347 | (2 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type))) | 348 | (3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type))) |
| 348 | (cond ((eq type 'var) font-lock-variable-name-face) | 349 | (cond ((eq type 'var) font-lock-variable-name-face) |
| 349 | ((eq type 'type) font-lock-type-face) | 350 | ((eq type 'type) font-lock-type-face) |
| 350 | (t font-lock-function-name-face))) | 351 | ((or (not (match-string 2)) ;; Normal defun. |
| 352 | (and (match-string 2) ;; Setf-expander. | ||
| 353 | (match-string 4))) font-lock-function-name-face))) | ||
| 351 | nil t))) | 354 | nil t))) |
| 352 | "Subdued level highlighting for Lisp modes.") | 355 | "Subdued level highlighting for Lisp modes.") |
| 353 | 356 | ||