(gnus-run-hooks): Use save-current-buffer.
authorJesper Harder <harder@ifa.au.dk>
Fri, 7 Feb 2003 20:18:24 +0000 (20:18 +0000)
committerJesper Harder <harder@ifa.au.dk>
Fri, 7 Feb 2003 20:18:24 +0000 (20:18 +0000)
lisp/ChangeLog
lisp/gnus-util.el

index ed770a6..1b38c6b 100644 (file)
@@ -1,3 +1,7 @@
+2003-02-07  Jesper Harder  <harder@ifa.au.dk>
+
+       * gnus-util.el (gnus-run-hooks): Use save-current-buffer.
+
 2003-02-07  John Paul Wallington  <jpw@gnu.org>
 
        * mm-util.el (mm-delete-duplicates, mm-append-to-file)
index 9582548..83622c2 100644 (file)
@@ -913,11 +913,9 @@ ARG is passed to the first function."
     arg))
 
 (defun gnus-run-hooks (&rest funcs)
-  "Does the same as `run-hooks', but saves excursion."
-  (let ((buf (current-buffer)))
-    (unwind-protect
-       (apply 'run-hooks funcs)
-      (set-buffer buf))))
+  "Does the same as `run-hooks', but saves the current buffer."
+  (save-current-buffer
+    (apply 'run-hooks funcs)))
 
 ;;; Various