emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111785: * lisp/play/fortune.el (fort


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111785: * lisp/play/fortune.el (fortune-compile): Simplify and fix previous change.
Date: Thu, 14 Feb 2013 20:30:11 -0500
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111785
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2013-02-14 20:30:11 -0500
message:
  * lisp/play/fortune.el (fortune-compile): Simplify and fix previous change.
  
  Since file-newer-than-p returns non-nil if FILE2 does not exist,
  the actual fix for bug#5338 is just a one-liner. But there is no test
  case or explanation of what the issue actually is in bug#5338, so one
  has to wonder if the initial (file-exists-p fortune-dat) test was
  there for a reason...
modified:
  lisp/ChangeLog
  lisp/play/fortune.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-02-14 13:32:04 +0000
+++ b/lisp/ChangeLog    2013-02-15 01:30:11 +0000
@@ -1,3 +1,7 @@
+2013-02-15  Glenn Morris  <address@hidden>
+
+       * play/fortune.el (fortune-compile): Simplify and fix previous change.
+
 2013-02-14  Michael Albinus  <address@hidden>
 
        * net/tramp.el (tramp-debug-message): Add

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


reply via email to

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