]> code.delx.au - gnu-emacs/blobdiff - lisp/play/cookie1.el
Simplify url handling in rcirc-mode
[gnu-emacs] / lisp / play / cookie1.el
index ebef884943e3beb0c16f10de21c2d7904cc04a74..837213665fc7581bf7037b3d723f4714e7492541 100644 (file)
@@ -1,7 +1,6 @@
 ;;; cookie1.el --- retrieve random phrases from fortune cookie files
 
-;; Copyright (C) 1993, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 2001-2011 Free Software Foundation, Inc.
 
 ;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
 ;; Maintainer: FSF
@@ -51,9 +50,6 @@
 ;; has been generalized so that it supports multiple simultaneous
 ;; cookie databases and fortune files.  It is intended to be called
 ;; from other packages such as yow.el and spook.el.
-;;
-;; TO DO: teach cookie-snarf to auto-detect ITS PINS or UNIX fortune(6)
-;; format and do the right thing.
 
 ;;; Code:
 
@@ -141,7 +137,7 @@ Optional fifth arg REQUIRE-MATCH non-nil forces a matching cookie."
                                (vec (cookie-snarf phrase-file
                                                   startmsg endmsg))
                                (i (length vec)))
-                          (while (> (setq i (1- i)) 0)
+                          (while (>= (setq i (1- i)) 0)
                             (setq alist (cons (list (aref vec i)) alist)))
                           (put sym 'completion-alist alist))))
                   nil require-match nil nil))
@@ -167,5 +163,4 @@ Optional fifth arg REQUIRE-MATCH non-nil forces a matching cookie."
 
 (provide 'cookie1)
 
-;; arch-tag: 4a8a8712-df6a-4f34-b030-108a1b47f9f2
 ;;; cookie1.el ends here