]> git.eshelyaron.com Git - emacs.git/commitdiff
CC Mode: replace an erroneous re-search-forward with search-forward
authorAlan Mackenzie <acm@muc.de>
Thu, 13 Jun 2019 10:06:33 +0000 (10:06 +0000)
committerAlan Mackenzie <acm@muc.de>
Thu, 13 Jun 2019 10:06:33 +0000 (10:06 +0000)
Move two declarations to a more suitable point in the cc-engine.el.

* lisp/progmodes/cc-engine.el (c-after-change-unmark-raw-strings): Change an
re-search-forward to search-forward.
(c-semi-lit-near-cache, c-semi-near-cache-limit): Move the declarations.

lisp/progmodes/cc-engine.el

index 1ded3f081d89520cd71027f782e5d8ddf48f9af6..b121529086a00ed38ba38ed6d9d2f999f82f28ae 100644 (file)
@@ -2494,18 +2494,6 @@ comment at the start of cc-engine.el for more info."
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defvar c-semi-lit-near-cache nil)
-(make-variable-buffer-local 'c-semi-lit-near-cache)
-;; A list of up to six recent results from `c-semi-pp-to-literal'.  Each
-;; element is a cons of the buffer position and the `parse-partial-sexp' state
-;; at that position.
-
-(defvar c-semi-near-cache-limit 1)
-(make-variable-buffer-local 'c-semi-near-cache-limit)
-;; An upper limit on valid entries in `c-semi-lit-near-cache'.  This is
-;; reduced by buffer changes, and increased by invocations of
-;; `c-semi-pp-to-literal'.
-
 (defvar c-lit-pos-cache nil)
 (make-variable-buffer-local 'c-lit-pos-cache)
 ;; A list of elements in descending order of POS of one of the forms:
@@ -2709,6 +2697,18 @@ comment at the start of cc-engine.el for more info."
 
        (cons (point) state)))))
 
+(defvar c-semi-lit-near-cache nil)
+(make-variable-buffer-local 'c-semi-lit-near-cache)
+;; A list of up to six recent results from `c-semi-pp-to-literal'.  Each
+;; element is a cons of the buffer position and the `parse-partial-sexp' state
+;; at that position.
+
+(defvar c-semi-near-cache-limit 1)
+(make-variable-buffer-local 'c-semi-near-cache-limit)
+;; An upper limit on valid entries in `c-semi-lit-near-cache'.  This is
+;; reduced by buffer changes, and increased by invocations of
+;; `c-semi-pp-to-literal'.
+
 (defun c-semi-trim-near-cache ()
   ;; Remove stale entries in `c-semi-lit-near-cache', i.e. those
   ;; whose positions are above `c-lit-pos-cache-limit'.
@@ -7354,7 +7354,7 @@ comment at the start of cc-engine.el for more info."
        (goto-char (cadr c-old-beg-rs))
        (when (looking-at c-c++-raw-string-opener-1-re)
          (setq id (match-string-no-properties 1))
-         (when (re-search-forward (concat ")" id "\"") nil t) ; No bound.
+         (when (search-forward (concat ")" id "\"") nil t) ; No bound.
            (setq c-new-END (point-max))
            (c-clear-char-properties (cadr c-old-beg-rs) c-new-END
                                     'syntax-table)