]> code.delx.au - gnu-emacs/blobdiff - lisp/play/fortune.el
* lisp/info.el: Cleanup bytepos/charpos issues
[gnu-emacs] / lisp / play / fortune.el
index 0920012b28043a736c2745a0994a07fc9de7ae71..965f6a99b9c91e27606df603f77d023b7eae5c2c 100644 (file)
@@ -1,6 +1,6 @@
 ;;; fortune.el --- use fortune to create signatures
 
-;; Copyright (C) 1999, 2001-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: Holger Schauer <Holger.Schauer@gmx.de>
 ;; Keywords: games utils mail
@@ -244,17 +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))))
-        (fortune-dat-exist (file-exists-p fortune-dat)))
-    (cond ((file-exists-p fortune-file)
-           (if (or (not fortune-dat-exist)
-                   (and fortune-dat-exist
-                        (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
-                      " " fortune-file fortune-quiet-strfile-options))))
-          (t (error "Can't compile fortune file %s" fortune-file)))))
+                       (concat fortune-file fortune-database-extension)))))
+  (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
+                         " " fortune-file fortune-quiet-strfile-options)))))
+       (t (error "Can't compile fortune file %s" fortune-file)))))
 
 
 ;;; **************