]> git.eshelyaron.com Git - emacs.git/commitdiff
Use a temporary buffer in nnagent-request-set-mark (bug#64117)
authorAndrew G Cohen <cohen@andy.bu.edu>
Tue, 27 Jun 2023 07:40:46 +0000 (15:40 +0800)
committerAndrew G Cohen <cohen@andy.bu.edu>
Thu, 29 Jun 2023 09:05:33 +0000 (17:05 +0800)
Commit cb12a84f2c519a48dd87453c925e3bc36d9944db inadvertently removed
the use of a temporary buffer in nnagent-request-set-mark.  Bug and
fix reported by Jens Schmidt <jschmidt4gnu@vodafonemail.de>

* lisp/gnus/nnagent.el (nnagent-request-set-mark): Restore the use of
a temporary buffer that was inadvertently removed.

lisp/gnus/nnagent.el

index 61ec66155e43e97c3218c494393761c52799d959..30d5514a8b7090fa094078e751af9cb8dde1ee9a 100644 (file)
   (gnus-request-accept-article "nndraft:queue" nil t t))
 
 (deffoo nnagent-request-set-mark (group action server)
-  (insert "(gnus-agent-synchronize-group-flags \""
-         group
-         "\" '")
-  (gnus-pp action)
-  (insert " \""
-         (gnus-method-to-server gnus-command-method)
-         "\"")
-  (insert ")\n")
-  (let ((coding-system-for-write nnheader-file-coding-system))
-    (write-region (point-min) (point-max) (gnus-agent-lib-file "flags")
-                 t 'silent))
+  (with-temp-buffer
+    (insert "(gnus-agent-synchronize-group-flags \""
+           group
+           "\" '")
+    (gnus-pp action)
+    (insert " \""
+           (gnus-method-to-server gnus-command-method)
+           "\"")
+    (insert ")\n")
+    (let ((coding-system-for-write nnheader-file-coding-system))
+      (write-region (point-min) (point-max) (gnus-agent-lib-file "flags")
+                   t 'silent)))
   ;; Also set the marks for the original back end that keeps marks in
   ;; the local system.
   (let ((gnus-agent nil))