Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
6b6481ed
Commit
6b6481ed
authored
Mar 07, 2008
by
Alan Mackenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(c-in-knr-argdecl): Limit number of paren/bracket pairs parsed, to solve
performance problem.
parent
f1bb4ee1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-engine.el
+4
-2
No files found.
lisp/progmodes/cc-engine.el
View file @
6b6481ed
...
...
@@ -6336,7 +6336,8 @@ comment at the start of cc-engine.el for more info."
;; the searchable range.
(
let*
((
macro-start
(
c-query-macro-start
))
(
lim
(
max
(
or
lim
(
point-min
))
(
or
macro-start
(
point-min
))))
before-lparen after-rparen)
before-lparen
after-rparen
(
pp-count-out
20
))
; Max number of paren/brace constructs before we give up
(
narrow-to-region
lim
(
c-point
'eol
))
;; Search backwards for the defun's argument list. We give up if we
...
...
@@ -6358,7 +6359,8 @@ comment at the start of cc-engine.el for more info."
;; {
(
catch
'knr
(while t ; go round one paren/bracket construct each time round.
(
while
(
>
pp-count-out
0
)
; go back one paren/bracket pair each time.
(
setq
pp-count-out
(
1-
pp-count-out
))
(
c-syntactic-skip-backward
"^)]}"
)
(
cond
((
eq
(
char-before
)
?\)
)
(
setq
after-rparen
(
point
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment