]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/play/cookie1.el (cookie): Work properly when there's only one entry
authorMiles Bader <miles@gnu.org>
Wed, 21 Jun 2006 05:09:32 +0000 (05:09 +0000)
committerMiles Bader <miles@gnu.org>
Wed, 21 Jun 2006 05:09:32 +0000 (05:09 +0000)
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-323

lisp/ChangeLog
lisp/play/cookie1.el

index b1a83ded6be3d61f82b828f4c67b395d4bfb7278..8fceccba7d43c8a37020cab1710e0363cc2bb2f9 100644 (file)
@@ -1,3 +1,7 @@
+2006-06-21  Miles Bader  <miles@gnu.org>
+
+       * play/cookie1.el (cookie): Work properly when there's only one entry.
+
 2006-06-21  Nick Roberts  <nickrob@snap.net.nz>
 
        * progmodes/gdb-ui.el (gdb-exited): Ensure overlay arrow gets killed.
index bc4ee84da2fcb794a451fba46ce2ef72cabd8ba5..7a2e6c602ea7ca8bba796d812e5ce0c372720e4e 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cookie1.el --- retrieve random phrases from fortune cookie files
 
-;; Copyright (C) 1993, 2002, 2003, 2004, 2005,
+;; Copyright (C) 1993, 2002, 2003, 2004, 2005, 2006,
 ;;   2006 Free Software Foundation, Inc.
 
 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
@@ -75,7 +75,7 @@ When the phrase file is read in, display STARTMSG at the beginning
 of load, ENDMSG at the end."
   (let ((cookie-vector (cookie-snarf phrase-file startmsg endmsg)))
     (shuffle-vector cookie-vector)
-    (aref cookie-vector 1)))
+    (aref cookie-vector 0)))
 
 ;;;###autoload
 (defun cookie-insert (phrase-file &optional count startmsg endmsg)