From c400c4d7987bf919d83a230f83c8b6ff64764fc3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 18 Nov 2011 10:06:20 -0500 Subject: [PATCH] * lisp/progmodes/cc-engine.el (c-remove-stale-state-cache-backwards): Don't hardcode point-min==1. --- lisp/ChangeLog | 3 +++ lisp/progmodes/cc-engine.el | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 654e886a3a4..15646c6cde3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-11-18 Stefan Monnier + * progmodes/cc-engine.el (c-remove-stale-state-cache-backwards): + Don't hardcode point-min==1. + * eshell/esh-cmd.el (eshell-do-eval): Handle `setq' (bug#9907). (eshell-rewrite-for-command): Remove workaround. (eshell-do-pipelines, eshell-do-pipelines-synchronously) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 31a58e48f50..8ac38c253fb 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -2820,7 +2820,7 @@ comment at the start of cc-engine.el for more info." ; or `here' itself. here- here+ ; start/end of macro around HERE, or HERE (here-bol (c-point 'bol here)) - (too-far-back (max (- here c-state-cache-too-far) 1))) + (too-far-back (max (- here c-state-cache-too-far) (point-min)))) ;; Remove completely irrelevant entries from `c-state-cache'. (while (and c-state-cache @@ -2964,9 +2964,9 @@ comment at the start of cc-engine.el for more info." c-state-cache-good-pos nil c-state-min-scan-pos nil) -;;; Truncate `c-state-cache' and set `c-state-cache-good-pos' to a value below -;;; `here'. To maintain its consistency, we may need to insert a new brace -;;; pair. + ;; Truncate `c-state-cache' and set `c-state-cache-good-pos' to a value + ;; below `here'. To maintain its consistency, we may need to insert a new + ;; brace pair. (let ((here-bol (c-point 'bol here)) too-high-pa ; recorded {/(/[ next above here, or nil. dropped-cons ; was the last removed element a brace pair? -- 2.39.2