changeset 71413:e04e474d258e

lisp/play/cookie1.el (cookie): Work properly when there's only one entry Revision: emacs@sv.gnu.org/emacs--devo--0--patch-323
author Miles Bader <miles@gnu.org>
date Wed, 21 Jun 2006 05:09:32 +0000
parents 57311883b6e5
children 6328b7a0d755
files lisp/ChangeLog lisp/play/cookie1.el
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Jun 21 05:09:12 2006 +0000
+++ b/lisp/ChangeLog	Wed Jun 21 05:09:32 2006 +0000
@@ -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.
--- a/lisp/play/cookie1.el	Wed Jun 21 05:09:12 2006 +0000
+++ b/lisp/play/cookie1.el	Wed Jun 21 05:09:32 2006 +0000
@@ -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 @@
 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)