* lisp/play/fortune.el: Doc fixes.
This commit is contained in:
parent
f484da5fcb
commit
f3b9bccb45
1 changed files with 33 additions and 23 deletions
|
@ -1,6 +1,6 @@
|
||||||
;;; fortune.el --- use fortune to create signatures -*- lexical-binding: t -*-
|
;;; fortune.el --- use fortune to create signatures -*- lexical-binding: t -*-
|
||||||
|
|
||||||
;; Copyright (C) 1999, 2001-2022 Free Software Foundation, Inc.
|
;; Copyright (C) 1999-2022 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; Author: Holger Schauer <Holger.Schauer@gmx.de>
|
;; Author: Holger Schauer <Holger.Schauer@gmx.de>
|
||||||
;; Keywords: games utils mail
|
;; Keywords: games utils mail
|
||||||
|
@ -21,38 +21,48 @@
|
||||||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;; This utility allows you to automatically cut regions to a fortune
|
;; This utility allows you to automatically cut regions to a fortune
|
||||||
;; file. In case that the region stems from an article buffer (mail or
|
;; file. In case that the region stems from an article buffer (mail or
|
||||||
;; news), it will try to automatically determine the author of the
|
;; news), it will try to automatically determine the author of the
|
||||||
;; fortune. It will also allow you to compile your fortune-database
|
;; fortune. It will also allow you to compile your fortune database
|
||||||
;; as well as providing a function to extract a fortune for use as your
|
;; as well as providing a function to extract a fortune for use as your
|
||||||
;; signature.
|
;; signature.
|
||||||
|
;;
|
||||||
;; Of course, it can simply display a fortune, too.
|
;; Of course, it can simply display a fortune, too.
|
||||||
;; Use prefix arguments to specify different fortune databases.
|
;; Use prefix arguments to specify different fortune databases.
|
||||||
|
;;
|
||||||
;;; Installation:
|
;;; Installation:
|
||||||
|
;;
|
||||||
;; Please check the customize settings -- you will at least have to
|
;; Please type `M-x customize-group RET fortune RET' -- you will at
|
||||||
;; modify the values of `fortune-dir' and `fortune-file'.
|
;; least have to modify the user options `fortune-dir' and
|
||||||
|
;; `fortune-file'.
|
||||||
|
;;
|
||||||
;; I then use this in my .gnus:
|
;; I then use this in my .gnus:
|
||||||
;;(message "Making new signature: %s" (fortune-to-signature "~/fortunes/"))
|
;;
|
||||||
|
;; (message "Making new signature: %s"
|
||||||
|
;; (fortune-to-signature "~/fortunes/"))
|
||||||
|
;;
|
||||||
;; This automagically creates a new signature when starting up Gnus.
|
;; This automagically creates a new signature when starting up Gnus.
|
||||||
;; Note that the call to fortune-to-signature specifies a directory in which
|
;; Note that the call to `fortune-to-signature' specifies a directory
|
||||||
;; several fortune-files and their databases are stored.
|
;; in which several fortune files and their databases are stored.
|
||||||
|
;;
|
||||||
;; If you like to get a new signature for every message, you can also hook
|
;; To get a new signature for every message, you can hook it into
|
||||||
;; it into message-mode:
|
;; `message-mode':
|
||||||
;; (add-hook 'message-setup-hook 'fortune-to-signature)
|
;;
|
||||||
;; This time no fortune-file is specified, so fortune-to-signature would use
|
;; (add-hook 'message-setup-hook #'fortune-to-signature)
|
||||||
;; the default-file as specified by fortune-file.
|
;;
|
||||||
|
;; This time no fortune file is specified, so `fortune-to-signature'
|
||||||
;; I have also this in my .gnus:
|
;; would use the default file as specified by `fortune-file'.
|
||||||
|
;;
|
||||||
|
;; I also have this in my .gnus:
|
||||||
|
;;
|
||||||
;; (add-hook 'gnus-article-mode-hook
|
;; (add-hook 'gnus-article-mode-hook
|
||||||
;; (lambda ()
|
;; (lambda ()
|
||||||
;; (define-key gnus-article-mode-map "i" 'fortune-from-region)))
|
;; (define-key gnus-article-mode-map "i" #'fortune-from-region)))
|
||||||
|
;;
|
||||||
;; which allows marking a region and then pressing "i" so that the marked
|
;; which allows marking a region and then pressing "i" so that the marked
|
||||||
;; region will be automatically added to my favorite fortune-file.
|
;; region will be automatically added to my favorite fortune file.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
@ -166,7 +176,7 @@ If INTERACTIVE is non-nil, don't compile the fortune file afterwards."
|
||||||
(fortune-compile file)))))
|
(fortune-compile file)))))
|
||||||
|
|
||||||
(defun fortune-ask-file ()
|
(defun fortune-ask-file ()
|
||||||
"Asks the user for a file-name."
|
"Asks the user for a file name."
|
||||||
(expand-file-name
|
(expand-file-name
|
||||||
(read-file-name
|
(read-file-name
|
||||||
"Fortune file to use: "
|
"Fortune file to use: "
|
||||||
|
|
Loading…
Add table
Reference in a new issue