aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2013-01-26 16:13:09 +0100
committerAndreas Schwab2013-01-26 16:13:09 +0100
commitcc17363fc3f5c5bc9d5b8a625721f5eb48fb7f44 (patch)
tree90a16e0eb703c9d2b07ab72efc1699b9b1ee07f1
parentb7aea0ffb633e0787654d2c570a8a2fa63703f18 (diff)
downloademacs-cc17363fc3f5c5bc9d5b8a625721f5eb48fb7f44.tar.gz
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.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/emacs-lisp/lisp-mode.el12
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index eb9f254a5a8..7c510771264 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12013-01-26 Andreas Schwab <schwab@linux-m68k.org>
2
3 * emacs-lisp/lisp-mode.el (lisp-mode-variables): Add optional
4 parameter BAR-NOT-SYMBOL to control syntax of | for font-lock.
5 (lisp-mode): Pass t for it. (Bug#13556)
6
12013-01-25 Alan Mackenzie <acm@muc.de> 72013-01-25 Alan Mackenzie <acm@muc.de>
2 8
3 AWK Mode: Fix indentation bug at top level. Bug #12274. 9 AWK Mode: Fix indentation bug at top level. Bug #12274.
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."
187 font-lock-string-face)))) 187 font-lock-string-face))))
188 font-lock-comment-face)) 188 font-lock-comment-face))
189 189
190(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive) 190(defun lisp-mode-variables (&optional lisp-syntax keywords-case-insensitive
191 bar-not-symbol)
191 "Common initialization routine for lisp modes. 192 "Common initialization routine for lisp modes.
192The LISP-SYNTAX argument is used by code in inf-lisp.el and is 193The LISP-SYNTAX argument is used by code in inf-lisp.el and is
193\(uselessly) passed from pp.el, chistory.el, gnus-kill.el and 194\(uselessly) passed from pp.el, chistory.el, gnus-kill.el and
194score-mode.el. KEYWORDS-CASE-INSENSITIVE non-nil means that for 195score-mode.el. KEYWORDS-CASE-INSENSITIVE non-nil means that for
195font-lock keywords will not be case sensitive." 196font-lock keywords will not be case sensitive. BAR-NOT-SYMBOL
197non-nil means that | is not a symbol character."
196 (when lisp-syntax 198 (when lisp-syntax
197 (set-syntax-table lisp-mode-syntax-table)) 199 (set-syntax-table lisp-mode-syntax-table))
198 (setq-local paragraph-ignore-fill-prefix t) 200 (setq-local paragraph-ignore-fill-prefix t)
@@ -226,7 +228,9 @@ font-lock keywords will not be case sensitive."
226 (setq font-lock-defaults 228 (setq font-lock-defaults
227 `((lisp-font-lock-keywords 229 `((lisp-font-lock-keywords
228 lisp-font-lock-keywords-1 lisp-font-lock-keywords-2) 230 lisp-font-lock-keywords-1 lisp-font-lock-keywords-2)
229 nil ,keywords-case-insensitive (("+-*/.<>=!?$%_&~^:@" . "w")) nil 231 nil ,keywords-case-insensitive
232 ((,(concat "+-*/.<>=!?$%_&~^:@" (if bar-not-symbol "" "|")) . "w"))
233 nil
230 (font-lock-mark-block-function . mark-defun) 234 (font-lock-mark-block-function . mark-defun)
231 (font-lock-syntactic-face-function 235 (font-lock-syntactic-face-function
232 . lisp-font-lock-syntactic-face-function)))) 236 . lisp-font-lock-syntactic-face-function))))
@@ -549,7 +553,7 @@ or to switch back to an existing one.
549 553
550Entry to this mode calls the value of `lisp-mode-hook' 554Entry to this mode calls the value of `lisp-mode-hook'
551if that value is non-nil." 555if that value is non-nil."
552 (lisp-mode-variables nil t) 556 (lisp-mode-variables nil t t)
553 (setq-local find-tag-default-function 'lisp-find-tag-default) 557 (setq-local find-tag-default-function 'lisp-find-tag-default)
554 (setq-local comment-start-skip 558 (setq-local comment-start-skip
555 "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") 559 "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")