diff options
Diffstat (limited to 'lisp/progmodes/cc-mode.el')
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 2a000957589..a904ffdb811 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -647,7 +647,9 @@ compatible with old code; callers should always specify it." (set (make-local-variable 'outline-regexp) "[^#\n\^M]") (set (make-local-variable 'outline-level) 'c-outline-level) - + (set (make-local-variable 'add-log-current-defun-function) + (lambda () + (or (c-cpp-define-name) (c-defun-name)))) (let ((rfn (assq mode c-require-final-newline))) (when rfn (and (cdr rfn) @@ -1034,7 +1036,10 @@ Note that the style variables are always made local to the buffer." (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. + (c-invalidate-state-cache beg)) (defvar c-in-after-change-fontification nil) (make-variable-buffer-local 'c-in-after-change-fontification) @@ -1082,7 +1087,7 @@ Note that the style variables are always made local to the buffer." (c-trim-found-types beg end old-len) ; maybe we don't need all of these. (c-invalidate-sws-region-after beg end) - (c-invalidate-state-cache beg) + ;; (c-invalidate-state-cache beg) ; moved to `c-before-change'. (c-invalidate-find-decl-cache beg) (when c-recognize-<>-arglists @@ -1703,7 +1708,9 @@ Key bindings: (message "Using CC Mode version %s" c-version) (c-keep-region-active)) -(defvar c-prepare-bug-report-hooks nil) +(define-obsolete-variable-alias 'c-prepare-bug-report-hooks + 'c-prepare-bug-report-hook "24.3") +(defvar c-prepare-bug-report-hook nil) ;; Dynamic variables used by reporter. (defvar reporter-prompt-for-summary-p) @@ -1770,7 +1777,7 @@ Key bindings: lookup-syntax-properties)) vars) (lambda () - (run-hooks 'c-prepare-bug-report-hooks) + (run-hooks 'c-prepare-bug-report-hook) (insert (format "Buffer Style: %s\nc-emacs-features: %s\n" style c-features))))))) |
