Mercurial > emacs
comparison lisp/play/fortune.el @ 98269:c4f6098c0914
Justin Bogner <mail at justinbogner.com> (tiny change)
(fortune-program-options): Change to a list.
(fortune-in-buffer): Use apply.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 20 Sep 2008 20:57:36 +0000 |
parents | 949bd6ad1ba4 |
children | 7aacb688e121 |
comparison
equal
deleted
inserted
replaced
98268:2e2d18ca9e6f | 98269:c4f6098c0914 |
---|---|
85 :group 'fortune) | 85 :group 'fortune) |
86 (defcustom fortune-program "fortune" | 86 (defcustom fortune-program "fortune" |
87 "Program to select a fortune cookie." | 87 "Program to select a fortune cookie." |
88 :type 'string | 88 :type 'string |
89 :group 'fortune) | 89 :group 'fortune) |
90 (defcustom fortune-program-options "" | 90 (defcustom fortune-program-options () |
91 "Options to pass to the fortune program (a string)." | 91 "Options to pass to the fortune program." |
92 :type 'string | 92 :type '(repeat string) |
93 :group 'fortune) | 93 :group 'fortune) |
94 (defcustom fortune-strfile "strfile" | 94 (defcustom fortune-strfile "strfile" |
95 "Program to compute a new fortune database." | 95 "Program to compute a new fortune database." |
96 :type 'string | 96 :type 'string |
97 :group 'fortune) | 97 :group 'fortune) |
297 (erase-buffer) | 297 (erase-buffer) |
298 | 298 |
299 (if fortune-always-compile | 299 (if fortune-always-compile |
300 (fortune-compile fort-file)) | 300 (fortune-compile fort-file)) |
301 | 301 |
302 (call-process | 302 (apply 'call-process |
303 fortune-program ;; programm to call | 303 fortune-program ;; program to call |
304 nil fortune-buffer nil ;; INFILE BUFFER DISPLAYP | 304 nil fortune-buffer nil ;; INFILE BUFFER DISPLAYP |
305 (concat fortune-program-options fort-file))))) | 305 fort-file fortune-program-options)))) |
306 | |
307 | 306 |
308 ;;;###autoload | 307 ;;;###autoload |
309 (defun fortune (&optional file) | 308 (defun fortune (&optional file) |
310 "Display a fortune cookie. | 309 "Display a fortune cookie. |
311 | 310 |