diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/play/fortune.el | 24 |
2 files changed, 20 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6949d776821..0881f9f5982 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-07-03 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * play/fortune.el (fortune-compile): Make a new fortune dat file | ||
| 4 | compile time if the dat file does not exist (bug#5338). | ||
| 5 | |||
| 1 | 2011-07-03 Richard Kim <emacs18@gmail.com> (tiny change) | 6 | 2011-07-03 Richard Kim <emacs18@gmail.com> (tiny change) |
| 2 | 7 | ||
| 3 | * textmodes/texnfo-upd.el (texinfo-insert-menu): Don't insert | 8 | * textmodes/texnfo-upd.el (texinfo-insert-menu): Don't insert |
diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index 55b0a564fef..e675302755c 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el | |||
| @@ -244,15 +244,21 @@ the value of `fortune-file'. This currently cannot handle directories." | |||
| 244 | (let* ((fortune-file (expand-file-name (substitute-in-file-name file))) | 244 | (let* ((fortune-file (expand-file-name (substitute-in-file-name file))) |
| 245 | (fortune-dat (expand-file-name | 245 | (fortune-dat (expand-file-name |
| 246 | (substitute-in-file-name | 246 | (substitute-in-file-name |
| 247 | (concat fortune-file fortune-database-extension))))) | 247 | (concat fortune-file fortune-database-extension)))) |
| 248 | (cond ((file-exists-p fortune-file) | 248 | (fortune-file-exist (file-exists-p fortune-file)) |
| 249 | (if (file-exists-p fortune-dat) | 249 | (fortune-dat-exist (file-exists-p fortune-dat)) |
| 250 | (cond ((file-newer-than-file-p fortune-file fortune-dat) | 250 | (fortune-file-newer (file-newer-than-file-p |
| 251 | (message "Compiling new fortune database %s" fortune-dat) | 251 | fortune-file fortune-dat))) |
| 252 | (shell-command | 252 | (cond |
| 253 | (concat fortune-strfile fortune-strfile-options | 253 | (fortune-file-exist |
| 254 | " " fortune-file fortune-quiet-strfile-options)))))) | 254 | (if (or (not fortune-dat-exist) |
| 255 | (t (error "Can't compile fortune file %s" fortune-file))))) | 255 | (and fortune-dat-exist |
| 256 | fortune-file-newer)) | ||
| 257 | (message "Compiling new fortune database %s" fortune-dat) | ||
| 258 | (shell-command | ||
| 259 | (concat fortune-strfile fortune-strfile-options | ||
| 260 | " " fortune-file fortune-quiet-strfile-options)))) | ||
| 261 | (t (error "Can't compile fortune file %s" fortune-file))))) | ||
| 256 | 262 | ||
| 257 | 263 | ||
| 258 | ;;; ************** | 264 | ;;; ************** |