X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/6b8bc570715801cb194dc4273370eab87628e8bf..651182d070bfbb22a47133adf8d90c849e5e6467:/lisp/play/fortune.el diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index 05775c8a85..25fa3f66ef 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el @@ -1,6 +1,6 @@ ;;; fortune.el --- use fortune to create signatures -;; Copyright (C) 1999, 2001-2011 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2001-2016 Free Software Foundation, Inc. ;; Author: Holger Schauer ;; Keywords: games utils mail @@ -49,10 +49,10 @@ ;; I have also this in my .gnus: ;;(add-hook 'gnus-article-mode-hook -;; '(lambda () +;; (lambda () ;; (define-key gnus-article-mode-map "i" 'fortune-from-region))) ;; which allows marking a region and then pressing "i" so that the marked -;; region will be automatically added to my favourite fortune-file. +;; region will be automatically added to my favorite fortune-file. ;;; Code: @@ -246,12 +246,11 @@ the value of `fortune-file'. This currently cannot handle directories." (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)))))) + (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))))) @@ -282,7 +281,7 @@ and choose the directory as the fortune-file." ;;; ************** ;;; Display fortune -(defun fortune-in-buffer (interactive &optional file) +(defun fortune-in-buffer (_interactive &optional file) "Put a fortune cookie in the *fortune* buffer. INTERACTIVE is ignored. Optional argument FILE, when supplied, specifies the file to choose the fortune from."