From: Andreas Schwab Date: Sat, 26 Jan 2013 15:13:09 +0000 (+0100) Subject: Fixes: debbugs:13556 X-Git-Tag: emacs-24.3.90~173^2~7^2~214 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cc17363fc3f5c5bc9d5b8a625721f5eb48fb7f44;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eb9f254a5a8..7c510771264 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-01-26 Andreas Schwab + + * 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. (Bug#13556) + 2013-01-25 Alan Mackenzie 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." 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]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")