1 new commit in cc-mode:
https://bitbucket.org/xemacs/cc-mode/commits/c4ec2b121c78/
Changeset: c4ec2b121c78
User: acm
Date: 2014-01-19 13:09:30
Summary: Bind open-paren-in-column-0-is-defun-start to nil at some entry points.
cc-engine.el (c-invalidate-state-cache-1, c-parse-state-1)
(c-guess-basic-syntax): Bind it here.
cc-mode.el (c-before-change, c-after-change, c-font-lock-fontify-region):
Bind it here.
Affected #: 2 files
diff -r 0461a5d4fe96e0b75a6d012ba147a9bba2e5ba7d -r c4ec2b121c78037c898bded82474eff79e1df0fb cc-engine.el
--- a/cc-engine.el
+++ b/cc-engine.el
@@ -3189,7 +3189,8 @@
;;; Truncate `c-state-cache' and set `c-state-cache-good-pos' to a value below
;;; `here'. To maintain its consistency, we may need to insert a new brace
;;; pair.
- (let ((here-bol (c-point 'bol here))
+ (let (open-paren-in-column-0-is-defun-start
+ (here-bol (c-point 'bol here))
too-high-pa ; recorded {/(/[ next above here, or nil.
dropped-cons ; was the last removed element a brace pair?
pa)
@@ -3260,6 +3261,7 @@
;; This function might do hidden buffer changes.
(let* ((here (point))
(here-bopl (c-point 'bopl))
+ open-paren-in-column-0-is-defun-start
strategy ; 'forward, 'backward etc..
;; Candidate positions to start scanning from:
cache-pos ; highest position below HERE already existing in
@@ -9405,6 +9407,7 @@
(c-save-buffer-state
((indent-point (point))
(case-fold-search nil)
+ open-paren-in-column-0-is-defun-start
;; A whole ugly bunch of various temporary variables. Have
;; to declare them here since it's not possible to declare
;; a variable with only the scope of a cond test and the
diff -r 0461a5d4fe96e0b75a6d012ba147a9bba2e5ba7d -r c4ec2b121c78037c898bded82474eff79e1df0fb cc-mode.el
--- a/cc-mode.el
+++ b/cc-mode.el
@@ -1054,9 +1054,10 @@
(buffer-substring-no-properties beg end)))))))
(if c-get-state-before-change-functions
- (mapc (lambda (fn)
- (funcall fn beg end))
- c-get-state-before-change-functions))
+ (let (open-paren-in-column-0-is-defun-start)
+ (mapc (lambda (fn)
+ (funcall fn beg end))
+ c-get-state-before-change-functions)))
)))
;; The following must be done here rather than in `c-after-change' because
;; newly inserted parens would foul up the invalidation algorithm.
@@ -1082,7 +1083,7 @@
;; This typically sets `syntax-table' properties.
(setq c-just-done-before-change nil)
- (c-save-buffer-state (case-fold-search)
+ (c-save-buffer-state (case-fold-search open-paren-in-column-0-is-defun-start)
;; When `combine-after-change-calls' is used we might get calls
;; with regions outside the current narrowing. This has been
;; observed in Emacs 20.7.
@@ -1199,7 +1200,8 @@
;;
;; Type a space in the first blank line, and the fontification of the next
;; line was fouled up by context fontification.
- (let ((new-beg beg) (new-end end) new-region case-fold-search)
+ (let ((new-beg beg) (new-end end) new-region case-fold-search
+ open-paren-in-column-0-is-defun-start)
(if c-in-after-change-fontification
(setq c-in-after-change-fontification nil)
(save-restriction
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.