# HG changeset patch # User Miles Bader # Date 1150866572 0 # Node ID e04e474d258ea139e56e00cb5c1307e52cab5c6a # Parent 57311883b6e583a8b05da1006d4ef07657ca47f9 lisp/play/cookie1.el (cookie): Work properly when there's only one entry Revision: emacs@sv.gnu.org/emacs--devo--0--patch-323 diff -r 57311883b6e5 -r e04e474d258e lisp/ChangeLog --- 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 + + * play/cookie1.el (cookie): Work properly when there's only one entry. + 2006-06-21 Nick Roberts * progmodes/gdb-ui.el (gdb-exited): Ensure overlay arrow gets killed. diff -r 57311883b6e5 -r e04e474d258e lisp/play/cookie1.el --- 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 @@ -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)