Don't use font-lock-syntax-table in lisp modes.

* lisp/font-lock.el (lisp-font-lock-keywords-1, lisp-font-lock-keywords-2):
Don't assume all identifier chars have syntax word.
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-variables):
Remove bar-not-symbol.  Adjust callers.
(lisp-mode-variables): Don't set a font-lock-syntax-table.
This commit is contained in:
Stefan Monnier 2013-02-17 11:58:12 -05:00
parent 2f73da9c57
commit 913274cbdc
3 changed files with 30 additions and 24 deletions

View file

@ -187,14 +187,12 @@ It has `lisp-mode-abbrev-table' as its parent."
font-lock-string-face))))
font-lock-comment-face))
(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive
bar-not-symbol)
(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive)
"Common initialization routine for lisp modes.
The LISP-SYNTAX argument is used by code in inf-lisp.el and is
\(uselessly) passed from pp.el, chistory.el, gnus-kill.el and
score-mode.el. KEYWORDS-CASE-INSENSITIVE non-nil means that for
font-lock keywords will not be case sensitive. BAR-NOT-SYMBOL
non-nil means that | is not a symbol character."
font-lock keywords will not be case sensitive."
(when lisp-syntax
(set-syntax-table lisp-mode-syntax-table))
(setq-local paragraph-ignore-fill-prefix t)
@ -228,9 +226,7 @@ non-nil means that | is not a symbol character."
(setq font-lock-defaults
`((lisp-font-lock-keywords
lisp-font-lock-keywords-1 lisp-font-lock-keywords-2)
nil ,keywords-case-insensitive
((,(concat "+-*/.<>=!?$%_&~^:@" (if bar-not-symbol "" "|")) . "w"))
nil
nil ,keywords-case-insensitive nil nil
(font-lock-mark-block-function . mark-defun)
(font-lock-syntactic-face-function
. lisp-font-lock-syntactic-face-function))))
@ -553,7 +549,7 @@ or to switch back to an existing one.
Entry to this mode calls the value of `lisp-mode-hook'
if that value is non-nil."
(lisp-mode-variables nil t t)
(lisp-mode-variables nil t)
(setq-local find-tag-default-function 'lisp-find-tag-default)
(setq-local comment-start-skip
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")