(save-buffers-kill-emacs): Compile the advice at the compile time. Use
authorczkmt <czkmt>
Mon, 6 Dec 1999 12:18:20 +0000 (12:18 +0000)
committerczkmt <czkmt>
Mon, 6 Dec 1999 12:18:20 +0000 (12:18 +0000)
`gnus-alive-p'.

lisp/gnus-start.el

index e711c42..b1333c0 100644 (file)
@@ -2369,9 +2369,10 @@ If FORCE is non-nil, the .newsrc file is read."
        (gnus-group-set-mode-line)))))
 
 ;; Call the function above at C-x C-c.
-(defadvice save-buffers-kill-emacs (before save-gnus-newsrc-file-maybe activate)
+(defadvice save-buffers-kill-emacs (before save-gnus-newsrc-file-maybe
+                                          activate preactivate)
   "Save .newsrc and .newsrc.eld when Emacs is killed."
-  (when (get-buffer gnus-group-buffer)
+  (when (gnus-alive-p)
     (gnus-run-hooks 'gnus-exit-gnus-hook)
     (gnus-offer-save-summaries)
     (gnus-save-newsrc-file)))