aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMichael Albinus2015-04-08 11:52:12 +0200
committerMichael Albinus2015-04-08 11:52:12 +0200
commit74079cd58ba81b3ec81d44b474ad66ea2c99272d (patch)
tree33ca2980fb0d86fddd7325fa2e368bae53819ad4 /lisp/progmodes
parentb3f2874de2b6e31df34a7515aa09e10f01e9b8a6 (diff)
parent1ba357e30518fdcc0b870870152f5434cb2540ba (diff)
downloademacs-74079cd58ba81b3ec81d44b474ad66ea2c99272d.tar.gz
emacs-74079cd58ba81b3ec81d44b474ad66ea2c99272d.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/cc-fonts.el45
1 files changed, 23 insertions, 22 deletions
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 9a1273ddcce..44172b05a56 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -539,28 +539,29 @@ stuff. Used on level 1 and higher."
539 (let* ((re (c-make-keywords-re nil 539 (let* ((re (c-make-keywords-re nil
540 (c-lang-const c-cpp-include-directives))) 540 (c-lang-const c-cpp-include-directives)))
541 (re-depth (regexp-opt-depth re))) 541 (re-depth (regexp-opt-depth re)))
542 `((,(concat noncontinued-line-end 542 ;; We used to use a font-lock "anchored matcher" here for
543 (c-lang-const c-opt-cpp-prefix) 543 ;; the paren syntax. This failed when the ">" was at EOL,
544 re 544 ;; since `font-lock-fontify-anchored-keywords' terminated
545 (c-lang-const c-syntactic-ws) 545 ;; its loop at EOL without executing our lambda form at
546 "\\(<[^>\n\r]*>?\\)") 546 ;; all.
547 (,(+ ncle-depth re-depth sws-depth 1) 547 `((,(c-make-font-lock-search-function
548 font-lock-string-face) 548 (concat noncontinued-line-end
549 549 (c-lang-const c-opt-cpp-prefix)
550 ;; Use an anchored matcher to put paren syntax 550 re
551 ;; on the brackets. 551 (c-lang-const c-syntactic-ws)
552 (,(byte-compile 552 "\\(<[^>\n\r]*>?\\)")
553 `(lambda (limit) 553 `(,(+ ncle-depth re-depth sws-depth 1)
554 (let ((beg (match-beginning 554 font-lock-string-face t)
555 ,(+ ncle-depth re-depth sws-depth 1))) 555 `((let ((beg (match-beginning
556 (end (1- (match-end ,(+ ncle-depth re-depth 556 ,(+ ncle-depth re-depth sws-depth 1)))
557 sws-depth 1))))) 557 (end (1- (match-end ,(+ ncle-depth re-depth
558 (if (eq (char-after end) ?>) 558 sws-depth 1)))))
559 (progn 559 (if (eq (char-after end) ?>)
560 (c-mark-<-as-paren beg) 560 (progn
561 (c-mark->-as-paren end)) 561 (c-mark-<-as-paren beg)
562 (c-unmark-<->-as-paren beg))) 562 (c-mark->-as-paren end))
563 nil))))))) 563 (c-unmark-<->-as-paren beg)))
564 nil))))))
564 565
565 ;; #define. 566 ;; #define.
566 ,@(when (c-lang-const c-opt-cpp-macro-define) 567 ,@(when (c-lang-const c-opt-cpp-macro-define)