File tree Expand file tree Collapse file tree 2 files changed +40
-35
lines changed Expand file tree Collapse file tree 2 files changed +40
-35
lines changed Original file line number Diff line number Diff line change @@ -2247,29 +2247,32 @@ The elements of the alist are of the form (FILE . (DEFUN...)),
22472247where DEFUN... is a list of function names found in FILE."
22482248 (save-excursion
22492249 (goto-char (point-min ))
2250- (let ((defuns nil )
2251- (hunk-end nil )
2252- (hunk-mismatch-files nil )
2253- (make-defun-context-follower
2254- (lambda (goline )
2255- (let ((eodefun nil )
2256- (defname nil ))
2257- (list
2258- (lambda () ; ; Check for end of current defun.
2259- (when (and eodefun
2260- (funcall goline)
2261- (>= (point ) eodefun))
2262- (setq defname nil )
2263- (setq eodefun nil )))
2264- (lambda (&optional get-current ) ; ; Check for new defun.
2265- (if get-current
2266- defname
2267- (when-let* ((def (and (not eodefun)
2268- (funcall goline)
2269- (add-log-current-defun )))
2270- (eof (save-excursion (end-of-defun ) (point ))))
2271- (setq eodefun eof)
2272- (setq defname def)))))))))
2250+ (let* ((defuns nil )
2251+ (hunk-end nil )
2252+ (hunk-mismatch-files nil )
2253+ (make-defun-context-follower
2254+ (lambda (goline )
2255+ (let ((eodefun nil )
2256+ (defname nil ))
2257+ (list
2258+ (lambda () ; ; Check for end of current defun.
2259+ (when (and eodefun
2260+ (funcall goline)
2261+ (>= (point ) eodefun))
2262+ (setq defname nil )
2263+ (setq eodefun nil )))
2264+ (lambda (&optional get-current ) ; ; Check for new defun.
2265+ (if get-current
2266+ defname
2267+ (when-let* ((def (and (not eodefun)
2268+ (funcall goline)
2269+ (add-log-current-defun )))
2270+ (eof (save-excursion
2271+ (condition-case ()
2272+ (progn (end-of-defun ) (point ))
2273+ (scan-error hunk-end)))))
2274+ (setq eodefun eof)
2275+ (setq defname def)))))))))
22732276 (while
22742277 ; ; Might need to skip over file headers between diff
22752278 ; ; hunks (e.g., "diff --git ..." etc).
Original file line number Diff line number Diff line change @@ -788,18 +788,20 @@ This command will generate a ChangeLog entries listing the
788788functions. You can then add a description where needed, and use
789789\\ [fill-paragraph] to join consecutive function names."
790790 (interactive )
791- (let* ((diff-buf nil )
792- ; ; Unfortunately, `log-edit-show-diff' doesn't have a NO-SHOW
793- ; ; option, so we try to work around it via display-buffer
794- ; ; machinery.
795- (display-buffer-overriding-action
796- `(,(lambda (buf alist )
797- (setq diff-buf buf)
798- (display-buffer-no-window buf alist))
799- . ((allow-no-window . t )))))
800- (change-log-insert-entries
801- (with-current-buffer (progn (log-edit-show-diff ) diff-buf)
802- (diff-add-log-current-defuns)))))
791+ (change-log-insert-entries
792+ (with-current-buffer
793+ (let* ((diff-buf nil )
794+ ; ; Unfortunately, `log-edit-show-diff' doesn't have a
795+ ; ; NO-SHOW option, so we try to work around it via
796+ ; ; display-buffer machinery.
797+ (display-buffer-overriding-action
798+ `(,(lambda (buf alist )
799+ (setq diff-buf buf)
800+ (display-buffer-no-window buf alist))
801+ . ((allow-no-window . t )))))
802+ (log-edit-show-diff )
803+ diff-buf)
804+ (diff-add-log-current-defuns))))
803805
804806(defun log-edit-insert-changelog (&optional use-first )
805807 " Insert a log message by looking at the ChangeLog.
You can’t perform that action at this time.
0 commit comments