emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 c0aa2f2: CC Mode: Fix bug #39972, by fixing c-display-defun-nam


From: Alan Mackenzie
Subject: emacs-27 c0aa2f2: CC Mode: Fix bug #39972, by fixing c-display-defun-name for nested defuns
Date: Fri, 22 May 2020 05:43:47 -0400 (EDT)

branch: emacs-27
commit c0aa2f2abf732ddb9d1f393c5989b14e047d63d7
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    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.
---
 lisp/progmodes/cc-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index fd7750b..066bec6 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]