]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix recent remember-diary-extract-entries change
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 20 Jan 2021 22:30:53 +0000 (23:30 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 20 Jan 2021 22:30:53 +0000 (23:30 +0100)
* lisp/textmodes/remember.el (remember-diary-extract-entries): Use
`remember-diary-file' over `diary-file'.

lisp/textmodes/remember.el

index 7f107977d533810ff43fefc799975b741ad180ca..811a265118ce4b4fa1b8c1e76b9cee4866aff6e5 100644 (file)
@@ -549,6 +549,8 @@ If this is nil, then `diary-file' will be used instead."
   :type 'regexp
   :version "28.1")
 
+(defvar diary-file)
+
 ;;;###autoload
 (defun remember-diary-extract-entries ()
   "Extract diary entries from the region based on `remember-diary-regexp'."
@@ -561,7 +563,8 @@ If this is nil, then `diary-file' will be used instead."
         (diary-make-entry (mapconcat 'identity list "\n")
                           nil remember-diary-file)
         (when remember-save-after-remembering
-          (with-current-buffer (find-buffer-visiting diary-file)
+          (with-current-buffer (find-buffer-visiting (or remember-diary-file
+                                                         diary-file))
             (save-buffer))))
       nil))) ;; Continue processing