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

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

[elpa] externals/denote dbe003bae7 3/6: Use with-temp-buffer instead of


From: ELPA Syncer
Subject: [elpa] externals/denote dbe003bae7 3/6: Use with-temp-buffer instead of with-current-buffer in denote--regexp-in-file-p
Date: Fri, 12 Aug 2022 23:57:30 -0400 (EDT)

branch: externals/denote
commit dbe003bae7bb9f13e4fc31e7fabe3e9d21d105d1
Author: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>
Commit: Jean-Philippe Gagné Guay <jeanphilippe150@gmail.com>

    Use with-temp-buffer instead of with-current-buffer in 
denote--regexp-in-file-p
---
 denote.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/denote.el b/denote.el
index cd82694bfc..31547eb157 100644
--- a/denote.el
+++ b/denote.el
@@ -1165,7 +1165,8 @@ appropriate."
 
 (defun denote--regexp-in-file-p (regexp file)
   "Return t if REGEXP matches in the FILE."
-  (with-current-buffer (find-file-noselect file)
+  (with-temp-buffer
+    (insert-file-contents file)
     (save-excursion
       (save-restriction
         (widen)



reply via email to

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