aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2020-05-20 19:02:26 +0000
committerAlan Mackenzie2020-05-20 19:05:14 +0000
commit5989432d15feb4439e759d2c0e28233ca22a7604 (patch)
tree8557dc948f4765b2b9fbb653c5fa93b3396e67a6
parent5b66483eadebbd3b1c37a46d2d987637b2872a8e (diff)
downloademacs-5989432d15feb4439e759d2c0e28233ca22a7604.tar.gz
emacs-5989432d15feb4439e759d2c0e28233ca22a7604.zip
CC Mode: Fix bug #39972, by fixing c-display-defun-name for nested defuns
* lisp/progmodes/cc-mode.el (c-common-init): Build add-log-current-defun-function out of c-defun-name-and-limits instead of the former c-defun-name.
-rw-r--r--lisp/progmodes/cc-mode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index d822788bee2..b3b2374805d 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -795,7 +795,7 @@ compatible with old code; callers should always specify it."
795 (set (make-local-variable 'outline-level) 'c-outline-level) 795 (set (make-local-variable 'outline-level) 'c-outline-level)
796 (set (make-local-variable 'add-log-current-defun-function) 796 (set (make-local-variable 'add-log-current-defun-function)
797 (lambda () 797 (lambda ()
798 (or (c-cpp-define-name) (c-defun-name)))) 798 (or (c-cpp-define-name) (car (c-defun-name-and-limits nil)))))
799 (let ((rfn (assq mode c-require-final-newline))) 799 (let ((rfn (assq mode c-require-final-newline)))
800 (when rfn 800 (when rfn
801 (if (boundp 'mode-require-final-newline) 801 (if (boundp 'mode-require-final-newline)