Function: fortune-to-signature
fortune-to-signature is an autoloaded, interactive and byte-compiled
function defined in fortune.el.gz.
Signature
(fortune-to-signature &optional FILE)
Documentation
Create signature from output of the fortune program.
If called with a prefix asks for the FILE to choose the fortune from,
otherwise uses the value of fortune-file. If you want to have fortune
choose from a set of files in a directory, call interactively with prefix
and choose the directory as the fortune-file.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/play/fortune.el.gz
;;; **************
;;; Use fortune for signature
;;;###autoload
(defun fortune-to-signature (&optional file)
"Create signature from output of the fortune program.
If called with a prefix asks for the FILE to choose the fortune from,
otherwise uses the value of `fortune-file'. If you want to have fortune
choose from a set of files in a directory, call interactively with prefix
and choose the directory as the fortune-file."
(interactive
(list
(if current-prefix-arg
(fortune-ask-file)
fortune-file)))
(save-excursion
(fortune-in-buffer t file)
(set-buffer fortune-buffer-name)
(let* ((fortune (buffer-string))
(signature (concat fortune-sigstart fortune fortune-sigend)))
(setq mail-signature signature)
(if (boundp 'message-signature)
(setq message-signature signature)))))