]> code.delx.au - gnu-emacs/blobdiff - lisp/play/fortune.el
Merge from emacs-23
[gnu-emacs] / lisp / play / fortune.el
index 90d759bd17446f5b5b418ca0fb2f6153bc89bc37..10bf05b2201e92dc6c08df4d773709849713ff8d 100644 (file)
@@ -1,7 +1,7 @@
 ;;; fortune.el --- use fortune to create signatures
 
 ;; Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;;  2008, 2009  Free Software Foundation, Inc.
+;;  2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Holger Schauer <Holger.Schauer@gmx.de>
 ;; Keywords: games utils mail
@@ -293,8 +293,7 @@ when supplied, specifies the file to choose the fortune from."
        (fort-file (expand-file-name
                    (substitute-in-file-name
                     (or file fortune-file)))))
-    (save-excursion
-      (set-buffer fortune-buffer)
+    (with-current-buffer fortune-buffer
       (toggle-read-only 0)
       (erase-buffer)