summaryrefslogtreecommitdiff
path: root/lisp/play
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-06-21 09:00:00 -0700
committerGlenn Morris <rgm@gnu.org>2013-06-21 09:00:00 -0700
commitcad5d1cb5af7210154814b60825576d14740158f (patch)
tree34ff367469ca647cc6c865322b73d050dfba05df /lisp/play
parent9e2773026a6bcf2161c15fc384e4592fb841535e (diff)
downloademacs-cad5d1cb5af7210154814b60825576d14740158f.tar.gz
Use cookie functions in yow
* play/cookie1.el (cookie-apropos): Add optional display argument. * obsolete/yow.el (apropos-zippy): Use cookie-apropos. (psychoanalyze-pinhead): Use cookie-doctor.
Diffstat (limited to 'lisp/play')
-rw-r--r--lisp/play/cookie1.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el
index 69cf4d538b2..0a53d8f4e61 100644
--- a/lisp/play/cookie1.el
+++ b/lisp/play/cookie1.el
@@ -185,11 +185,11 @@ Argument REQUIRE-MATCH non-nil forces a matching cookie."
(define-obsolete-function-alias 'shuffle-vector 'cookie-shuffle-vector "24.4")
-(defun cookie-apropos (regexp phrase-file)
+(defun cookie-apropos (regexp phrase-file &optional display)
"Return a list of all entries matching REGEXP from PHRASE-FILE.
Interactively, PHRASE-FILE defaults to `cookie-file', unless that
is nil or a prefix argument is used.
-If called interactively, display a list of matches."
+If called interactively, or if DISPLAY is non-nil, display a list of matches."
(interactive (list (read-regexp "Apropos phrase (regexp): ")
(if (or current-prefix-arg (not cookie-file))
(read-file-name "Cookie file: " nil
@@ -211,7 +211,7 @@ If called interactively, display a list of matches."
(setq i (1+ i))))
(and matches
(setq matches (sort matches 'string-lessp)))
- (and (called-interactively-p 'interactive)
+ (and (or display (called-interactively-p 'interactive))
(cond ((null matches)
(message "No matches found."))
(t