summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2006-06-21 05:09:32 +0000
committerMiles Bader <miles@gnu.org>2006-06-21 05:09:32 +0000
commita2064b094cde59c0cf9455c7f9a49b2bed967852 (patch)
treecee3f4e4a5f53313cd81110aa825565f7a588565
parentbe1fc9b84b9be3858fe8a3a023d67c6a5cef7152 (diff)
downloademacs-a2064b094cde59c0cf9455c7f9a49b2bed967852.tar.gz
lisp/play/cookie1.el (cookie): Work properly when there's only one entry
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-323
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/play/cookie1.el4
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b1a83ded6be..8fceccba7d4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el
index bc4ee84da2f..7a2e6c602ea 100644
--- a/lisp/play/cookie1.el
+++ b/lisp/play/cookie1.el
@@ -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)