From: Alan Mackenzie Date: Fri, 2 Aug 2019 12:57:40 +0000 (+0000) Subject: CC Mode: Fix spurious recognition of operators beginning with, e.g. "or" X-Git-Tag: emacs-27.0.90~1758 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=87ec668e95084af45bec010de36493fb90a26461;p=emacs.git CC Mode: Fix spurious recognition of operators beginning with, e.g. "or" This fixes bug #36801. * lisp/progmodes/cc-langs.el (c-pre-lambda-tokens-re): Use c-make-keywords-re rather than regexp-opt to make an optimised regexp out of a list of tokens. --- diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index f3dd0c6c4c9..9d36f8f9e49 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1542,7 +1542,7 @@ Currently (2016-08) only used in C++ mode." (c-lang-defconst c-pre-lambda-tokens-re ;; Regexp matching any token in the list `c-pre-lambda-tokens'. - t (regexp-opt (c-lang-const c-pre-lambda-tokens))) + t (c-make-keywords-re t (c-lang-const c-pre-lambda-tokens))) (c-lang-defvar c-pre-lambda-tokens-re (c-lang-const c-pre-lambda-tokens-re)) ;;; Syntactic whitespace.