Commit 25b13765 authored by Alan Mackenzie's avatar Alan Mackenzie

CC Mode: replace an erroneous re-search-forward with search-forward

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.
parent 2f4b4c85
Pipeline #2029 failed with stage
in 53 minutes and 2 seconds
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment