emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111763: fortune-compile tiny change


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111763: fortune-compile tiny change
Date: Wed, 13 Feb 2013 00:10:41 -0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111763
fixes bug: http://debbugs.gnu.org/5338
author: Kirill A. Korinskiy <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-02-13 00:10:41 -0800
message:
  fortune-compile tiny change
  
  * lisp/play/fortune.el (fortune-compile):
  Also make the compiled file if it does not exist at all, not just if it is 
old.
modified:
  lisp/ChangeLog
  lisp/play/fortune.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-02-13 05:00:45 +0000
+++ b/lisp/ChangeLog    2013-02-13 08:10:41 +0000
@@ -1,3 +1,8 @@
+2013-02-13  Kirill A. Korinskiy  <address@hidden>
+
+       * play/fortune.el (fortune-compile): Also make the compiled file
+       if it does not exist at all, not just if it is old.  (Bug#5338)
+
 2013-02-13  Glenn Morris  <address@hidden>
 
        * emacs-lisp/package.el (package-menu-execute): Doc fix.

=== modified file 'lisp/play/fortune.el'
--- a/lisp/play/fortune.el      2013-01-01 09:11:05 +0000
+++ b/lisp/play/fortune.el      2013-02-13 08:10:41 +0000
@@ -244,15 +244,17 @@
   (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-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)))))
 
 
 ;;; **************


reply via email to

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