emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r104911: * play/fortune.el (fortune-c


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104911: * play/fortune.el (fortune-compile): Make a new fortune dat file
Date: Sun, 03 Jul 2011 21:27:53 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104911
fixes bug(s): http://debbugs.gnu.org/5338
author: Juanma Barranquero <address@hidden>
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Sun 2011-07-03 21:27:53 +0200
message:
  * play/fortune.el (fortune-compile): Make a new fortune dat file
  compile time if the dat file does not exist.
modified:
  lisp/ChangeLog
  lisp/play/fortune.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-07-03 16:11:37 +0000
+++ b/lisp/ChangeLog    2011-07-03 19:27:53 +0000
@@ -1,3 +1,8 @@
+2011-07-03  Juanma Barranquero  <address@hidden>
+
+       * play/fortune.el (fortune-compile): Make a new fortune dat file
+       compile time if the dat file does not exist (bug#5338).
+
 2011-07-03  Richard Kim <address@hidden> (tiny change)
 
        * textmodes/texnfo-upd.el (texinfo-insert-menu): Don't insert

=== modified file 'lisp/play/fortune.el'
--- a/lisp/play/fortune.el      2011-05-23 17:57:17 +0000
+++ b/lisp/play/fortune.el      2011-07-03 19:27:53 +0000
@@ -244,15 +244,21 @@
   (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)))))
-  (cond ((file-exists-p fortune-file)
-        (if (file-exists-p fortune-dat)
-            (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)))))
+                       (concat fortune-file fortune-database-extension))))
+        (fortune-file-exist (file-exists-p fortune-file))
+        (fortune-dat-exist (file-exists-p fortune-dat))
+        (fortune-file-newer (file-newer-than-file-p
+                             fortune-file fortune-dat)))
+    (cond
+     (fortune-file-exist
+      (if (or (not fortune-dat-exist)
+             (and fortune-dat-exist
+                  fortune-file-newer))
+         (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)))))
 
 
 ;;; **************


reply via email to

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