mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 11:50:51 -08:00
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.
This commit is contained in:
parent
c9998fcbf4
commit
73b8237c19
2 changed files with 8 additions and 4 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
* emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-1): Fix
|
* emacs-lisp/lisp-mode.el (lisp-el-font-lock-keywords-1): Fix
|
||||||
false positive in function name font-locking.
|
false positive in function name font-locking.
|
||||||
|
(lisp-cl-font-lock-keywords-1): Ditto.
|
||||||
|
|
||||||
2015-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
|
2015-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -341,13 +341,16 @@
|
||||||
`( ;; Definitions.
|
`( ;; Definitions.
|
||||||
(,(concat "(" cl-defs-re "\\_>"
|
(,(concat "(" cl-defs-re "\\_>"
|
||||||
;; Any whitespace and defined object.
|
;; Any whitespace and defined object.
|
||||||
"[ \t'\(]*"
|
"[ \t']*"
|
||||||
"\\(setf[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?")
|
"\\(([ \t']*\\)?" ;; An opening paren.
|
||||||
|
"\\(\\(setf\\)[ \t]+\\(?:\\sw\\|\\s_\\)+\\|\\(?:\\sw\\|\\s_\\)+\\)?")
|
||||||
(1 font-lock-keyword-face)
|
(1 font-lock-keyword-face)
|
||||||
(2 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type)))
|
(3 (let ((type (get (intern-soft (match-string 1)) 'lisp-define-type)))
|
||||||
(cond ((eq type 'var) font-lock-variable-name-face)
|
(cond ((eq type 'var) font-lock-variable-name-face)
|
||||||
((eq type 'type) font-lock-type-face)
|
((eq type 'type) font-lock-type-face)
|
||||||
(t font-lock-function-name-face)))
|
((or (not (match-string 2)) ;; Normal defun.
|
||||||
|
(and (match-string 2) ;; Setf-expander.
|
||||||
|
(match-string 4))) font-lock-function-name-face)))
|
||||||
nil t)))
|
nil t)))
|
||||||
"Subdued level highlighting for Lisp modes.")
|
"Subdued level highlighting for Lisp modes.")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue