diff options
| author | Benjamin Ragheb | 2019-07-10 00:31:10 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-07-10 00:33:17 +0200 |
| commit | 52847315da3e8505e73a5c6b1eb517c25e57dd4e (patch) | |
| tree | c9b1e2df36ab139ad750834b961aca2cc03a1f0f | |
| parent | ba4f1d28ecd6490e6886b7e3de89b0eab65b339a (diff) | |
| download | emacs-52847315da3e8505e73a5c6b1eb517c25e57dd4e.tar.gz emacs-52847315da3e8505e73a5c6b1eb517c25e57dd4e.zip | |
Search exec-path for fortune strfile program
* lisp/play/fortune.el (fortune-compile): Search exec-path for
strfile program (bug#33984).
Copyright-paperwork-exempt: yes
| -rw-r--r-- | lisp/play/fortune.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index 3c057f41497..7226ea07030 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el | |||
| @@ -244,12 +244,14 @@ the value of `fortune-file'. This currently cannot handle directories." | |||
| 244 | (let* ((fortune-file (expand-file-name (substitute-in-file-name file))) | 244 | (let* ((fortune-file (expand-file-name (substitute-in-file-name file))) |
| 245 | (fortune-dat (expand-file-name | 245 | (fortune-dat (expand-file-name |
| 246 | (substitute-in-file-name | 246 | (substitute-in-file-name |
| 247 | (concat fortune-file fortune-database-extension))))) | 247 | (concat fortune-file fortune-database-extension)))) |
| 248 | (strfile (or (executable-find fortune-strfile) | ||
| 249 | (error "Can't find strfile program %s" fortune-strfile)))) | ||
| 248 | (cond ((file-exists-p fortune-file) | 250 | (cond ((file-exists-p fortune-file) |
| 249 | (cond ((file-newer-than-file-p fortune-file fortune-dat) | 251 | (cond ((file-newer-than-file-p fortune-file fortune-dat) |
| 250 | (message "Compiling new fortune database %s" fortune-dat) | 252 | (message "Compiling new fortune database %s" fortune-dat) |
| 251 | (shell-command | 253 | (shell-command |
| 252 | (concat fortune-strfile fortune-strfile-options | 254 | (concat strfile fortune-strfile-options |
| 253 | " " fortune-file fortune-quiet-strfile-options))))) | 255 | " " fortune-file fortune-quiet-strfile-options))))) |
| 254 | (t (error "Can't compile fortune file %s" fortune-file))))) | 256 | (t (error "Can't compile fortune file %s" fortune-file))))) |
| 255 | 257 | ||