GNU bug report logs -
#10463
24.0.92; c-literal-limits out of range
Previous Next
Reported by: martin rudalics <rudalics <at> gmx.at>
Date: Mon, 9 Jan 2012 10:15:02 UTC
Severity: important
Merged with 10480
Found in version 24.0.92
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Mon, Jan 09, 2012 at 07:19:25PM +0100, martin rudalics wrote a bug
report:
Hi, Martin.
Please apply this patch, use C Mode for an infinite amount of time, then
report back and tell me the bug has disappeared.
Thanks!
*** orig/cc-engine.el 2012-01-09 20:27:51.000000000 +0000
--- cc-engine.el 2012-01-09 20:53:42.000000000 +0000
***************
*** 4225,4236 ****
Note that this function might do hidden buffer changes. See the
comment at the start of cc-engine.el for more info."
! (let* ((safe-place (c-state-safe-place (point)))
! (lit (c-state-pp-to-literal safe-place (point))))
! (or (cadr lit)
! (and detect-cpp
! (save-excursion (c-beginning-of-macro))
! 'pound))))
(defun c-literal-limits (&optional lim near not-in-delimiter)
"Return a cons of the beginning and end positions of the comment or
--- 4225,4238 ----
Note that this function might do hidden buffer changes. See the
comment at the start of cc-engine.el for more info."
! (save-restriction
! (widen
! (let* ((safe-place (c-state-safe-place (point)))
! (lit (c-state-pp-to-literal safe-place (point))))
! (or (cadr lit)
! (and detect-cpp
! (save-excursion (c-beginning-of-macro))
! 'pound))))))
(defun c-literal-limits (&optional lim near not-in-delimiter)
"Return a cons of the beginning and end positions of the comment or
***************
*** 4250,4258 ****
(save-excursion
(let* ((pos (point))
(lim (or lim (c-state-safe-place pos)))
! (pp-to-lit (c-state-pp-to-literal lim pos))
(state (car pp-to-lit))
- (lit-type (cadr pp-to-lit))
(lit-limits (car (cddr pp-to-lit))))
(cond
--- 4252,4261 ----
(save-excursion
(let* ((pos (point))
(lim (or lim (c-state-safe-place pos)))
! (pp-to-lit (save-restriction
! (widen)
! (c-state-pp-to-literal lim pos)))
(state (car pp-to-lit))
(lit-limits (car (cddr pp-to-lit))))
(cond
> martin
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 13 years and 186 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.