1 new commit in cc-mode:
https://bitbucket.org/xemacs/cc-mode/changeset/0a221a4f3b9b/
changeset: 0a221a4f3b9b
user: acm
date: 2012-01-11 23:59:04
summary: Fix Emacs bug #10463 - put `widen's around the critical spots.
cc-engine.el (c-in-literal, c-literal-limits): put a widen around each
invocation of c-state-pp-to-literal. Remove an unused let variable.
affected #: 1 file
diff -r 4e9db4db477f39fd880f9ea0ce0787b0a2007294 -r
0a221a4f3b9b50b3bb1c3324e8ad308ecfed010f cc-engine.el
--- a/cc-engine.el
+++ b/cc-engine.el
@@ -4225,12 +4225,14 @@
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))))
+ (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,9 +4252,10 @@
(save-excursion
(let* ((pos (point))
(lim (or lim (c-state-safe-place pos)))
- (pp-to-lit (c-state-pp-to-literal lim pos))
+ (pp-to-lit (save-restriction
+ (widen)
+ (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
Repository URL:
https://bitbucket.org/xemacs/cc-mode/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches