aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2019-06-13 10:06:33 +0000
committerAlan Mackenzie2019-06-13 10:06:33 +0000
commit25b13765167746529e4ecbdcbb7bcfc8cc647cd3 (patch)
tree0eb135453983e46768c33effce429f799bc9437d
parent2f4b4c8571d61892ab03015147b9665d32bfc0c7 (diff)
downloademacs-25b13765167746529e4ecbdcbb7bcfc8cc647cd3.tar.gz
emacs-25b13765167746529e4ecbdcbb7bcfc8cc647cd3.zip
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.
-rw-r--r--lisp/progmodes/cc-engine.el26
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 1ded3f081d8..b121529086a 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -2494,18 +2494,6 @@ comment at the start of cc-engine.el for more info."
2494;; 2494;;
2495;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2495;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2496 2496
2497(defvar c-semi-lit-near-cache nil)
2498(make-variable-buffer-local 'c-semi-lit-near-cache)
2499;; A list of up to six recent results from `c-semi-pp-to-literal'. Each
2500;; element is a cons of the buffer position and the `parse-partial-sexp' state
2501;; at that position.
2502
2503(defvar c-semi-near-cache-limit 1)
2504(make-variable-buffer-local 'c-semi-near-cache-limit)
2505;; An upper limit on valid entries in `c-semi-lit-near-cache'. This is
2506;; reduced by buffer changes, and increased by invocations of
2507;; `c-semi-pp-to-literal'.
2508
2509(defvar c-lit-pos-cache nil) 2497(defvar c-lit-pos-cache nil)
2510(make-variable-buffer-local 'c-lit-pos-cache) 2498(make-variable-buffer-local 'c-lit-pos-cache)
2511;; A list of elements in descending order of POS of one of the forms: 2499;; 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."
2709 2697
2710 (cons (point) state))))) 2698 (cons (point) state)))))
2711 2699
2700(defvar c-semi-lit-near-cache nil)
2701(make-variable-buffer-local 'c-semi-lit-near-cache)
2702;; A list of up to six recent results from `c-semi-pp-to-literal'. Each
2703;; element is a cons of the buffer position and the `parse-partial-sexp' state
2704;; at that position.
2705
2706(defvar c-semi-near-cache-limit 1)
2707(make-variable-buffer-local 'c-semi-near-cache-limit)
2708;; An upper limit on valid entries in `c-semi-lit-near-cache'. This is
2709;; reduced by buffer changes, and increased by invocations of
2710;; `c-semi-pp-to-literal'.
2711
2712(defun c-semi-trim-near-cache () 2712(defun c-semi-trim-near-cache ()
2713 ;; Remove stale entries in `c-semi-lit-near-cache', i.e. those 2713 ;; Remove stale entries in `c-semi-lit-near-cache', i.e. those
2714 ;; whose positions are above `c-lit-pos-cache-limit'. 2714 ;; whose positions are above `c-lit-pos-cache-limit'.
@@ -7354,7 +7354,7 @@ comment at the start of cc-engine.el for more info."
7354 (goto-char (cadr c-old-beg-rs)) 7354 (goto-char (cadr c-old-beg-rs))
7355 (when (looking-at c-c++-raw-string-opener-1-re) 7355 (when (looking-at c-c++-raw-string-opener-1-re)
7356 (setq id (match-string-no-properties 1)) 7356 (setq id (match-string-no-properties 1))
7357 (when (re-search-forward (concat ")" id "\"") nil t) ; No bound. 7357 (when (search-forward (concat ")" id "\"") nil t) ; No bound.
7358 (setq c-new-END (point-max)) 7358 (setq c-new-END (point-max))
7359 (c-clear-char-properties (cadr c-old-beg-rs) c-new-END 7359 (c-clear-char-properties (cadr c-old-beg-rs) c-new-END
7360 'syntax-table) 7360 'syntax-table)