Now on revision 111608. ------------------------------------------------------------ revno: 111608 committer: Andreas Schwab branch nick: emacs timestamp: Sat 2013-01-26 16:13:09 +0100 message: 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: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-25 18:18:14 +0000 +++ lisp/ChangeLog 2013-01-26 15:13:09 +0000 @@ -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. === modified file 'lisp/emacs-lisp/lisp-mode.el' --- lisp/emacs-lisp/lisp-mode.el 2013-01-20 02:40:49 +0000 +++ lisp/emacs-lisp/lisp-mode.el 2013-01-26 15:13:09 +0000 @@ -187,12 +187,14 @@ 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 @@ (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 @@ 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]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") ------------------------------------------------------------ revno: 111607 committer: Alan Mackenzie branch nick: trunk timestamp: Fri 2013-01-25 18:18:14 +0000 message: AWK Mode: Fix indentation bug at top level. Bug #12274. progmodes/cc-engine.el (c-guess-basic-syntax): Move CASE 5P to just before CASE 5D. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-25 15:48:35 +0000 +++ lisp/ChangeLog 2013-01-25 18:18:14 +0000 @@ -1,3 +1,10 @@ +2013-01-25 Alan Mackenzie + + AWK Mode: Fix indentation bug at top level. Bug #12274. + + * progmodes/cc-engine.el (c-guess-basic-syntax): Move CASE 5P to + just before CASE 5D. + 2013-01-25 Dmitry Antipov * net/socks.el (socks-nslookup-host): Use string-to-number. === modified file 'lisp/progmodes/cc-engine.el' --- lisp/progmodes/cc-engine.el 2013-01-23 18:58:11 +0000 +++ lisp/progmodes/cc-engine.el 2013-01-25 18:18:14 +0000 @@ -9842,6 +9842,18 @@ ;; contains any class offset ))) + ;; CASE 5P: AWK pattern or function or continuation + ;; thereof. + ((c-major-mode-is 'awk-mode) + (setq placeholder (point)) + (c-add-stmt-syntax + (if (and (eq (c-beginning-of-statement-1) 'same) + (/= (point) placeholder)) + 'topmost-intro-cont + 'topmost-intro) + nil nil + containing-sexp paren-state)) + ;; CASE 5D: this could be a top-level initialization, a ;; member init list continuation, or a template argument ;; list continuation. @@ -10001,18 +10013,6 @@ (goto-char (point-min))) (c-add-syntax 'objc-method-intro (c-point 'boi))) - ;; CASE 5P: AWK pattern or function or continuation - ;; thereof. - ((c-major-mode-is 'awk-mode) - (setq placeholder (point)) - (c-add-stmt-syntax - (if (and (eq (c-beginning-of-statement-1) 'same) - (/= (point) placeholder)) - 'topmost-intro-cont - 'topmost-intro) - nil nil - containing-sexp paren-state)) - ;; CASE 5N: At a variable declaration that follows a class ;; definition or some other block declaration that doesn't ;; end at the closing '}'. C.f. case 5D.5.