* lisp/progmodes/cc-defs.el (c-safe-scan-lists): Evaluate LIMIT just once
This commit is contained in:
parent
31f289625c
commit
f0c5de7839
1 changed files with 10 additions and 9 deletions
|
@ -794,15 +794,16 @@ right side of it."
|
|||
`(c-safe (scan-lists ,from ,count ,depth)))))
|
||||
(if limit
|
||||
`(save-restriction
|
||||
(when ,limit
|
||||
,(if (numberp count)
|
||||
(if (< count 0)
|
||||
`(narrow-to-region ,limit (point-max))
|
||||
`(narrow-to-region (point-min) ,limit))
|
||||
`(if (< ,count 0)
|
||||
(narrow-to-region ,limit (point-max))
|
||||
(narrow-to-region (point-min) ,limit))))
|
||||
,res)
|
||||
(let ((-limit- ,limit))
|
||||
(when -limit-
|
||||
,(if (numberp count)
|
||||
(if (< count 0)
|
||||
`(narrow-to-region -limit- (point-max))
|
||||
`(narrow-to-region (point-min) -limit-))
|
||||
`(if (< ,count 0)
|
||||
(narrow-to-region -limit- (point-max))
|
||||
(narrow-to-region (point-min) -limit-))))
|
||||
,res))
|
||||
res)))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue