File: yow-mode-from-cvs.diff

package info (click to toggle)
emacs21 21.4a%2B1-3etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 59,104 kB
  • ctags: 58,909
  • sloc: lisp: 493,229; ansic: 237,175; xml: 4,262; sh: 4,109; makefile: 2,479; perl: 1,069; cs: 776; asm: 254; csh: 9; sed: 4
file content (81 lines) | stat: -rw-r--r-- 2,861 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
* Yow and cookie1 modes from CVS trunk. These are necessary in order to
  be able to read the yow.lines replacement which comes from the CVS
  trunk as well.
  Patch: yow-mode-from-cvs.diff
  Added-by: Jerome Marant <jerome@debian.org>
  Date: Fri, 27 Oct 2006 19:55:36 +0200
  Status: has been incorporated upstream

Index: emacs21-21.4a+1/lisp/play/cookie1.el
===================================================================
--- emacs21-21.4a+1.orig/lisp/play/cookie1.el	2006-10-27 19:24:50.012779300 +0200
+++ emacs21-21.4a+1/lisp/play/cookie1.el	2006-10-27 19:26:05.378697124 +0200
@@ -73,7 +73,7 @@
 is read in, display STARTMSG at beginning of load, ENDMSG at 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)
Index: emacs21-21.4a+1/lisp/play/yow.el
===================================================================
--- emacs21-21.4a+1.orig/lisp/play/yow.el	2006-10-27 19:24:41.665009929 +0200
+++ emacs21-21.4a+1/lisp/play/yow.el	2006-10-27 19:25:42.687324028 +0200
@@ -1,6 +1,7 @@
 ;;; yow.el --- quote random zippyisms
 
-;; Copyright (C) 1993, 1994, 1995, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1995, 2000, 2002, 2003, 2004,
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Author: Richard Mlynarik
@@ -20,8 +21,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -49,13 +50,13 @@
 (defconst yow-after-load-message "I have SEEN the CONSING!!")
 
 ;;;###autoload
-(defun yow (&optional insert)
+(defun yow (&optional insert display)
   "Return or display a random Zippy quotation.  With prefix arg, insert it."
-  (interactive "P")
+  (interactive "P\np")
   (let ((yow (cookie yow-file yow-load-message yow-after-load-message)))
     (cond (insert
 	   (insert yow))
-	  ((not (interactive-p))
+	  ((not display)
 	   yow)
 	  (t
 	   (message "%s" yow)))))
@@ -101,7 +102,8 @@
                     (while l
                       (princ (car l))
                       (setq l (cdr l))
-                      (and l (princ "\n\n"))))))))
+                      (and l (princ "\n\n")))
+		    (print-help-return-message))))))
     matches))
 
 
@@ -119,7 +121,7 @@
   (switch-to-buffer "*doctor*")
   (sit-for 0)
   (while (not (input-pending-p))
-    (insert-string (yow))
+    (insert (yow))
     (sit-for 0)
     (doctor-ret-or-read 1)
     (doctor-ret-or-read 1)))