diff options
| author | Alan Mackenzie | 2020-05-20 19:02:26 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2020-05-22 09:43:02 +0000 |
| commit | c0aa2f2abf732ddb9d1f393c5989b14e047d63d7 (patch) | |
| tree | d58140ebf909db98028606b488faa6b70272f613 | |
| parent | 62a5e890d72de11263996b25c1a7256423d22a7b (diff) | |
| download | emacs-c0aa2f2abf732ddb9d1f393c5989b14e047d63d7.tar.gz emacs-c0aa2f2abf732ddb9d1f393c5989b14e047d63d7.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.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index fd7750b0d82..066bec60091 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." | |||
| 770 | (set (make-local-variable 'outline-level) 'c-outline-level) | 770 | (set (make-local-variable 'outline-level) 'c-outline-level) |
| 771 | (set (make-local-variable 'add-log-current-defun-function) | 771 | (set (make-local-variable 'add-log-current-defun-function) |
| 772 | (lambda () | 772 | (lambda () |
| 773 | (or (c-cpp-define-name) (c-defun-name)))) | 773 | (or (c-cpp-define-name) (car (c-defun-name-and-limits nil))))) |
| 774 | (let ((rfn (assq mode c-require-final-newline))) | 774 | (let ((rfn (assq mode c-require-final-newline))) |
| 775 | (when rfn | 775 | (when rfn |
| 776 | (if (boundp 'mode-require-final-newline) | 776 | (if (boundp 'mode-require-final-newline) |