mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-02-05 20:43:08 +00:00
(c-forward-syntactic-ws): Fixed a bug that could cause an infinite
loop if something that looks like a macro begins in the middle of a line. (c-parse-state): Fixed a bug that could cause `c-state-cache' to contain two conses in sequence when there's an unbalanced open paren in a macro.
This commit is contained in:
parent
23d468dadd
commit
0e35704fe3
@ -1,3 +1,13 @@
|
||||
2002-08-20 Martin Stjernholm <bug-cc-mode@gnu.org>
|
||||
|
||||
* progmodes/cc-engine.el (c-forward-syntactic-ws): Fixed a bug
|
||||
that could cause an infinite loop if something that looks like
|
||||
a macro begins in the middle of a line.
|
||||
|
||||
* progmodes/cc-engine.el (c-parse-state): Fixed a bug that
|
||||
could cause `c-state-cache' to contain two conses in sequence
|
||||
when there's an unbalanced open paren in a macro.
|
||||
|
||||
2002-08-20 Glenn Morris <gmorris@ast.cam.ac.uk>
|
||||
|
||||
* progmodes/fortran.el (fortran-current-defun): Use save-excursion.
|
||||
|
@ -642,8 +642,9 @@ specified."
|
||||
(forward-char))
|
||||
;; Skip preprocessor directives.
|
||||
((and (looking-at "#[ \t]*[a-zA-Z0-9!]")
|
||||
(progn (skip-chars-backward " \t")
|
||||
(bolp)))
|
||||
(save-excursion
|
||||
(skip-chars-backward " \t")
|
||||
(bolp)))
|
||||
(end-of-line)
|
||||
(while (and (<= (point) lim)
|
||||
(eq (char-before) ?\\)
|
||||
@ -1245,6 +1246,11 @@ you need both the type of a literal and its limits."
|
||||
(setq c-state-cache (cdr c-state-cache)))
|
||||
(setq pairs (car pairs))
|
||||
(setcar pairs (1- (car pairs)))
|
||||
(when (consp (car-safe c-state-cache))
|
||||
;; There could already be a cons first in `c-state-cache'
|
||||
;; if we've jumped over an unbalanced open paren in a
|
||||
;; macro below.
|
||||
(setq c-state-cache (cdr c-state-cache)))
|
||||
(setq c-state-cache (cons pairs c-state-cache)))
|
||||
(if last-pos
|
||||
;; Prepare to loop, but record the open paren only if it's
|
||||
|
Loading…
x
Reference in New Issue
Block a user