Fix incorrect use of add-to-list
You can't use add-to-list with lexical variables, push should be used instead with delete-dups later.
This commit is contained in:
parent
bd8fc036bf
commit
8d3cad7e02
|
@ -3923,11 +3923,12 @@ follow [[https://orgmode.org/worg/org-contribute.html#commit-messages][a certain
|
|||
((string-match-p "\\.el$" last-file)
|
||||
(when (re-search-backward "^\\(?:[+-]? *\\|@@[ +-\\d,]+@@ \\)(\\(?:cl-\\)?\\(?:defun\\|defvar\\|defmacro\\|defcustom\\)" temp-point t)
|
||||
(re-search-forward "\\(?:cl-\\)?\\(?:defun\\|defvar\\|defmacro\\|defcustom\\) \\([^[:space:]\n]+\\)" nil t)
|
||||
(add-to-list 'file-changes (match-string 1))))
|
||||
(push (match-string 1) file-changes)))
|
||||
((string-match-p "\\.org$" last-file)
|
||||
(when (re-search-backward "^[+-]\\*+ \\|^@@[ +-\\d,]+@@ \\*+ " temp-point t)
|
||||
(re-search-forward "@@ \\*+ " nil t)
|
||||
(add-to-list 'file-changes (buffer-substring-no-properties (point) (line-end-position)))))))))
|
||||
(push (buffer-substring-no-properties (point) (line-end-position)) file-changes)))))))
|
||||
(setq file-changes (delete-dups file-changes))
|
||||
(push (list last-file file-changes) change-data)
|
||||
(setq change-data (delete '(nil nil) change-data))
|
||||
(concat
|
||||
|
|
Loading…
Reference in New Issue