emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 5284731: Search exec-path for fortune strfile progr


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 5284731: Search exec-path for fortune strfile program
Date: Tue, 9 Jul 2019 18:33:23 -0400 (EDT)

branch: master
commit 52847315da3e8505e73a5c6b1eb517c25e57dd4e
Author: Benjamin Ragheb <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    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
---
 lisp/play/fortune.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el
index 3c057f4..7226ea0 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."
   (let* ((fortune-file (expand-file-name (substitute-in-file-name file)))
         (fortune-dat (expand-file-name
                       (substitute-in-file-name
-                       (concat fortune-file fortune-database-extension)))))
+                       (concat fortune-file fortune-database-extension))))
+         (strfile (or (executable-find fortune-strfile)
+                      (error "Can't find strfile program %s" 
fortune-strfile))))
   (cond ((file-exists-p fortune-file)
          (cond ((file-newer-than-file-p fortune-file fortune-dat)
                 (message "Compiling new fortune database %s" fortune-dat)
                 (shell-command
-                 (concat fortune-strfile fortune-strfile-options
+                 (concat strfile fortune-strfile-options
                          " " fortune-file fortune-quiet-strfile-options)))))
        (t (error "Can't compile fortune file %s" fortune-file)))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]