summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2013-01-26 16:13:09 +0100
committerAndreas Schwab <schwab@linux-m68k.org>2013-01-26 16:13:09 +0100
commitcc17363fc3f5c5bc9d5b8a625721f5eb48fb7f44 (patch)
tree90a16e0eb703c9d2b07ab72efc1699b9b1ee07f1 /lisp/emacs-lisp/lisp-mode.el
parentb7aea0ffb633e0787654d2c570a8a2fa63703f18 (diff)
downloademacs-cc17363fc3f5c5bc9d5b8a625721f5eb48fb7f44.tar.gz
emacs-cc17363fc3f5c5bc9d5b8a625721f5eb48fb7f44.tar.bz2
emacs-cc17363fc3f5c5bc9d5b8a625721f5eb48fb7f44.zip
Fixes: debbugs:13556
* emacs-lisp/lisp-mode.el (lisp-mode-variables): Add optional parameter BAR-NOT-SYMBOL to control syntax of | for font-lock. (lisp-mode): Pass t for it.
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 3d13dc451b2..cd60d80b056 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -187,12 +187,14 @@ 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)
+(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive
+ bar-not-symbol)
"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."
+font-lock keywords will not be case sensitive. BAR-NOT-SYMBOL
+non-nil means that | is not a symbol character."
(when lisp-syntax
(set-syntax-table lisp-mode-syntax-table))
(setq-local paragraph-ignore-fill-prefix t)
@@ -226,7 +228,9 @@ font-lock keywords will not be case sensitive."
(setq font-lock-defaults
`((lisp-font-lock-keywords
lisp-font-lock-keywords-1 lisp-font-lock-keywords-2)
- nil ,keywords-case-insensitive (("+-*/.<>=!?$%_&~^:@" . "w")) nil
+ nil ,keywords-case-insensitive
+ ((,(concat "+-*/.<>=!?$%_&~^:@" (if bar-not-symbol "" "|")) . "w"))
+ nil
(font-lock-mark-block-function . mark-defun)
(font-lock-syntactic-face-function
. lisp-font-lock-syntactic-face-function))))
@@ -549,7 +553,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)
+ (lisp-mode-variables nil t t)
(setq-local find-tag-default-function 'lisp-find-tag-default)
(setq-local comment-start-skip
"\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")