diff options
| author | Gerd Moellmann | 2001-07-23 09:57:37 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-07-23 09:57:37 +0000 |
| commit | f111f09d776ecf745f948dc74255939d8aa37b25 (patch) | |
| tree | 1d83dc07cf17f4d14bf7f46796f0b9297dca6afc /lisp | |
| parent | 5247262aa74ddc05176ae7694a2e1320ab210adf (diff) | |
| download | emacs-f111f09d776ecf745f948dc74255939d8aa37b25.tar.gz emacs-f111f09d776ecf745f948dc74255939d8aa37b25.zip | |
Undo change of 2001-07-13.
Fix autoload cookies. Add types to defcustoms.
(fortune) <defgroup>: Add :link.
(fortune-from-region): Use eq, not eql.
From Dave Love <fx@gnu.org>.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/play/fortune.el | 82 |
1 files changed, 35 insertions, 47 deletions
diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index aab77fa2435..269139176c6 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | ;;; fortune.el --- use fortune to create signatures | 1 | ;;; fortune.el --- use fortune to create signatures |
| 2 | |||
| 2 | ;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. |
| 3 | 4 | ||
| 4 | ;; Author: Holger Schauer <Holger.Schauer@gmx.de> | 5 | ;; Author: Holger Schauer <Holger.Schauer@gmx.de> |
| @@ -33,8 +34,8 @@ | |||
| 33 | 34 | ||
| 34 | ;;; Installation: | 35 | ;;; Installation: |
| 35 | 36 | ||
| 36 | ;; Please check the customize settings - you will at least have to modify the | 37 | ;; Please check the customize settings -- you will at least have to |
| 37 | ;; values of `fortune-dir' and `fortune-file'. | 38 | ;; modify the values of `fortune-dir' and `fortune-file'. |
| 38 | 39 | ||
| 39 | ;; I then use this in my .gnus: | 40 | ;; I then use this in my .gnus: |
| 40 | ;;(message "Making new signature: %s" (fortune-to-signature "~/fortunes/")) | 41 | ;;(message "Making new signature: %s" (fortune-to-signature "~/fortunes/")) |
| @@ -44,9 +45,7 @@ | |||
| 44 | 45 | ||
| 45 | ;; If you like to get a new signature for every message, you can also hook | 46 | ;; If you like to get a new signature for every message, you can also hook |
| 46 | ;; it into message-mode: | 47 | ;; it into message-mode: |
| 47 | ;; (add-hook 'message-setup-hook | 48 | ;; (add-hook 'message-setup-hook 'fortune-to-signature) |
| 48 | ;; '(lambda () | ||
| 49 | ;; (fortune-to-signature))) | ||
| 50 | ;; This time no fortune-file is specified, so fortune-to-signature would use | 49 | ;; This time no fortune-file is specified, so fortune-to-signature would use |
| 51 | ;; the default-file as specified by fortune-file. | 50 | ;; the default-file as specified by fortune-file. |
| 52 | 51 | ||
| @@ -63,9 +62,9 @@ | |||
| 63 | ;;; Customizable Settings | 62 | ;;; Customizable Settings |
| 64 | (defgroup fortune nil | 63 | (defgroup fortune nil |
| 65 | "Settings for fortune." | 64 | "Settings for fortune." |
| 65 | :link '(emacs-commentary-link "fortune.el") | ||
| 66 | :version "21.1" | 66 | :version "21.1" |
| 67 | :group 'games) | 67 | :group 'games) |
| 68 | |||
| 69 | (defgroup fortune-signature nil | 68 | (defgroup fortune-signature nil |
| 70 | "Settings for use of fortune for signatures." | 69 | "Settings for use of fortune for signatures." |
| 71 | :group 'fortune | 70 | :group 'fortune |
| @@ -73,78 +72,67 @@ | |||
| 73 | 72 | ||
| 74 | (defcustom fortune-dir "~/docs/ascii/misc/fortunes/" | 73 | (defcustom fortune-dir "~/docs/ascii/misc/fortunes/" |
| 75 | "*The directory to look in for local fortune cookies files." | 74 | "*The directory to look in for local fortune cookies files." |
| 76 | :group 'fortune | 75 | :type 'directory |
| 77 | :type 'directory) | 76 | :group 'fortune) |
| 78 | 77 | (defcustom fortune-file | |
| 79 | (defcustom fortune-file (expand-file-name "usenet" fortune-dir) | 78 | (expand-file-name "usenet" fortune-dir) |
| 80 | "*The file in which local fortune cookies will be stored." | 79 | "*The file in which local fortune cookies will be stored." |
| 81 | :group 'fortune | 80 | :type 'file |
| 82 | :type 'file) | 81 | :group 'fortune) |
| 83 | |||
| 84 | (defcustom fortune-database-extension ".dat" | 82 | (defcustom fortune-database-extension ".dat" |
| 85 | "The extension of the corresponding fortune database. | 83 | "The extension of the corresponding fortune database. |
| 86 | Normally you won't have a reason to change it." | 84 | Normally you won't have a reason to change it." |
| 87 | :group 'fortune | 85 | :type 'string |
| 88 | :type 'string) | 86 | :group 'fortune) |
| 89 | |||
| 90 | (defcustom fortune-program "fortune" | 87 | (defcustom fortune-program "fortune" |
| 91 | "Program to select a fortune cookie." | 88 | "Program to select a fortune cookie." |
| 92 | :group 'fortune | 89 | :type 'string |
| 93 | :type 'file) | 90 | :group 'fortune) |
| 94 | |||
| 95 | (defcustom fortune-program-options "" | 91 | (defcustom fortune-program-options "" |
| 96 | "Options to pass to the fortune program." | 92 | "Options to pass to the fortune program (a string)." |
| 97 | :group 'fortune | 93 | :type 'string |
| 98 | :type 'string) | 94 | :group 'fortune) |
| 99 | |||
| 100 | (defcustom fortune-strfile "strfile" | 95 | (defcustom fortune-strfile "strfile" |
| 101 | "Program to compute a new fortune database." | 96 | "Program to compute a new fortune database." |
| 102 | :group 'fortune | 97 | :type 'string |
| 103 | :type 'file) | 98 | :group 'fortune) |
| 104 | |||
| 105 | (defcustom fortune-strfile-options "" | 99 | (defcustom fortune-strfile-options "" |
| 106 | "Options to pass to the strfile program." | 100 | "Options to pass to the strfile program (a string)." |
| 107 | :group 'fortune | 101 | :type 'string |
| 108 | :type 'string) | 102 | :group 'fortune) |
| 109 | |||
| 110 | (defcustom fortune-quiet-strfile-options "> /dev/null" | 103 | (defcustom fortune-quiet-strfile-options "> /dev/null" |
| 111 | "Text added to the command for running `strfile'. | 104 | "Text added to the command for running `strfile'. |
| 112 | By default it discards the output produced by `strfile'. | 105 | By default it discards the output produced by `strfile'. |
| 113 | Set this to \"\" if you would like to see the output." | 106 | Set this to \"\" if you would like to see the output." |
| 114 | :group 'fortune | 107 | :type 'string |
| 115 | :type 'string) | 108 | :group 'fortune) |
| 116 | 109 | ||
| 117 | (defcustom fortune-always-compile t | 110 | (defcustom fortune-always-compile t |
| 118 | "*Non-nil means automatically compile fortune files. | 111 | "*Non-nil means automatically compile fortune files. |
| 119 | If nil, you must invoke `fortune-compile' manually to do that." | 112 | If nil, you must invoke `fortune-compile' manually to do that." |
| 120 | :group 'fortune | 113 | :type 'boolean |
| 121 | :type 'boolean) | 114 | :group 'fortune) |
| 122 | |||
| 123 | (defcustom fortune-author-line-prefix " -- " | 115 | (defcustom fortune-author-line-prefix " -- " |
| 124 | "Prefix to put before the author name of a fortunate." | 116 | "Prefix to put before the author name of a fortunate." |
| 125 | :group 'fortune-signature | 117 | :type 'string |
| 126 | :type 'string) | 118 | :group 'fortune-signature) |
| 127 | |||
| 128 | (defcustom fortune-fill-column fill-column | 119 | (defcustom fortune-fill-column fill-column |
| 129 | "Fill column for fortune files." | 120 | "Fill column for fortune files." |
| 130 | :group 'fortune-signature | 121 | :type 'integer |
| 131 | :type 'integer) | 122 | :group 'fortune-signature) |
| 132 | |||
| 133 | (defcustom fortune-from-mail "private e-mail" | 123 | (defcustom fortune-from-mail "private e-mail" |
| 134 | "String to use to characterize that the fortune comes from an e-mail. | 124 | "String to use to characterize that the fortune comes from an e-mail. |
| 135 | No need to add an `in'." | 125 | No need to add an `in'." |
| 136 | :type 'string | 126 | :type 'string |
| 137 | :group 'fortune-signature) | 127 | :group 'fortune-signature) |
| 138 | |||
| 139 | (defcustom fortune-sigstart "" | 128 | (defcustom fortune-sigstart "" |
| 140 | "*Some text to insert before the fortune cookie, in a mail signature." | 129 | "*Some text to insert before the fortune cookie, in a mail signature." |
| 141 | :group 'fortune-signature | 130 | :type 'string |
| 142 | :type 'string) | 131 | :group 'fortune-signature) |
| 143 | |||
| 144 | (defcustom fortune-sigend "" | 132 | (defcustom fortune-sigend "" |
| 145 | "*Some text to insert after the fortune cookie, in a mail signature." | 133 | "*Some text to insert after the fortune cookie, in a mail signature." |
| 146 | :group 'fortune-signature | 134 | :type 'string |
| 147 | :type 'string) | 135 | :group 'fortune-signature) |
| 148 | 136 | ||
| 149 | 137 | ||
| 150 | ;; not customizable settings | 138 | ;; not customizable settings |