Commit c0aa2f2a authored by Alan Mackenzie's avatar Alan Mackenzie
Browse files

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.
parent 62a5e890
Pipeline #5638 passed with stage
in 59 minutes and 39 seconds
......@@ -770,7 +770,7 @@ compatible with old code; callers should always specify it."
(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))))
(or (c-cpp-define-name) (car (c-defun-name-and-limits nil)))))
(let ((rfn (assq mode c-require-final-newline)))
(when rfn
(if (boundp 'mode-require-final-newline)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment