emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/denote 0e65f05bbb 080/355: Use 'delete-region' instead


From: ELPA Syncer
Subject: [elpa] externals/denote 0e65f05bbb 080/355: Use 'delete-region' instead of 'delete-line'
Date: Sun, 26 Jun 2022 23:58:02 -0400 (EDT)

branch: externals/denote
commit 0e65f05bbb993d9cf64c4740f806754b12798624
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Use 'delete-region' instead of 'delete-line'
    
    The latter requires 'subr'.
    
    Thanks to Kaushal Modi for reporting the bug in issue 2 over at the
    GitHub mirror: <https://github.com/protesilaos/denote/issues/2>.
---
 denote-link.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/denote-link.el b/denote-link.el
index e36fe6066a..cb997ed5c9 100644
--- a/denote-link.el
+++ b/denote-link.el
@@ -130,10 +130,10 @@ This heading is appended to a file when another links to 
it.")
   (let ((default-directory (denote-directory)))
     (save-excursion
       (goto-char (point-min))
-      (when (re-search-forward denote-link-backlink-heading nil t))
-      (while (re-search-forward denote-link--backlink-regexp nil t)
-        (unless (file-exists-p (match-string-no-properties 1))
-          (delete-line))))))
+      (when (re-search-forward denote-link-backlink-heading nil t)
+        (while (re-search-forward denote-link--backlink-regexp nil t)
+          (unless (file-exists-p (match-string-no-properties 1))
+            (delete-region (point-at-bol) (point-at-bol 2))))))))
 
 (provide 'denote-link)
 ;;; denote-link.el ends here



reply via email to

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