From 8d3cad7e02dadcca7cf93e380e05f10357d38c4a Mon Sep 17 00:00:00 2001 From: TEC Date: Tue, 26 Mar 2024 12:15:00 +0800 Subject: [PATCH] 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. --- config.org | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config.org b/config.org index f26942a..fb338ca 100644 --- a/config.org +++ b/config.org @@ -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