1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

Add defgroup; use defcustom for user vars.

This commit is contained in:
Richard M. Stallman 1997-04-12 20:20:55 +00:00
parent 1d6a4283e4
commit 20f0de751d
3 changed files with 93 additions and 43 deletions

View File

@ -46,8 +46,14 @@
;;; Variables controlling the display
;;;
(defvar enriched-verbose t
"*If non-nil, give status messages when reading and writing files.")
(defgroup enriched nil
"Read and save files in text/enriched format"
:group 'wp)
(defcustom enriched-verbose t
"*If non-nil, give status messages when reading and writing files."
:type 'boolean
:group 'enriched)
;;;
;;; Set up faces & display table
@ -143,11 +149,13 @@ Any property that is neither on this list nor dealt with by
(cons '(enriched-mode " Enriched")
minor-mode-alist)))
(defvar enriched-mode-hook nil
(defcustom enriched-mode-hook nil
"Functions to run when entering Enriched mode.
If you set variables in this hook, you should arrange for them to be restored
to their old values if you leave Enriched mode. One way to do this is to add
them and their old values to `enriched-old-bindings'.")
them and their old values to `enriched-old-bindings'."
:type 'hook
:group 'enriched)
(defvar enriched-old-bindings nil
"Store old variable values that we change when entering mode.

View File

@ -1,7 +1,7 @@
;;; mh-comp --- mh-e functions for composing messages
;; Time-stamp: <95/08/19 17:48:59 gildea>
;; Copyright (C) 1993, 1995 Free Software Foundation, Inc.
;; Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
;; This file is part of mh-e, part of GNU Emacs.
@ -26,7 +26,7 @@
;;; Change Log:
;; $Id: mh-comp.el,v 1.7 1995/11/03 02:28:52 kwzh Exp erik $
;; $Id: mh-comp.el,v 1.8 1996/01/14 07:34:30 erik Exp rms $
;;; Code:
@ -35,6 +35,12 @@
;;; Site customization (see also mh-utils.el):
(defgroup mh-compose nil
"Mh-e functions for composing messages"
:prefix "mh-"
:group 'mh)
(defvar mh-send-prog "send"
"Name of the MH send program.
Some sites need to change this because of a name conflict.")
@ -81,37 +87,51 @@ much of the message passed to the hook.")
;;; Personal preferences:
(defvar mh-delete-yanked-msg-window nil
(defcustom mh-delete-yanked-msg-window nil
"*Controls window display when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
If non-nil, yanking the current message into a draft letter deletes any
windows displaying the message.")
windows displaying the message."
:type 'boolean
:group 'mh-compose)
(defvar mh-yank-from-start-of-msg t
(defcustom mh-yank-from-start-of-msg t
"*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
If non-nil, include the entire message. If the symbol `body', then yank the
message minus the header. If nil, yank only the portion of the message
following the point. If the show buffer has a region, this variable is
ignored.")
ignored."
:type '(choice (const t) (const nil) (const body))
:group 'mh-compose)
(defvar mh-ins-buf-prefix "> "
(defcustom mh-ins-buf-prefix "> "
"*String to put before each non-blank line of a yanked or inserted message.
\\<mh-letter-mode-map>Used when the message is inserted into an outgoing letter
by \\[mh-insert-letter] or \\[mh-yank-cur-msg].")
by \\[mh-insert-letter] or \\[mh-yank-cur-msg]."
:type 'string
:group 'mh-compose)
(defvar mh-reply-default-reply-to nil
(defcustom mh-reply-default-reply-to nil
"*Sets the person or persons to whom a reply will be sent.
If nil, prompt for recipient. If non-nil, then \\<mh-folder-mode-map>`\\[mh-reply]' will use this
value and it should be one of \"from\", \"to\", \"cc\", or \"all\".
The values \"cc\" and \"all\" do the same thing.")
The values \"cc\" and \"all\" do the same thing."
:type '(choice (const :tag "Prompt" nil)
(const "from") (const "to")
(const "cc") (const "all"))
:group 'mh-compose)
(defvar mh-signature-file-name "~/.signature"
(defcustom mh-signature-file-name "~/.signature"
"*Name of file containing the user's signature.
Inserted into message by \\<mh-letter-mode-map>\\[mh-insert-signature].")
Inserted into message by \\<mh-letter-mode-map>\\[mh-insert-signature]."
:type 'file
:group 'mh-compose)
(defvar mh-forward-subject-format "%s: %s"
(defcustom mh-forward-subject-format "%s: %s"
"*Format to generate the Subject: line contents for a forwarded message.
The two string arguments to the format are the sender of the original
message and the original subject line.")
message and the original subject line."
:type 'string
:group 'mh-compose)
(defvar mh-comp-formfile "components"
"Name of file to be used as a skeleton for composing messages.
@ -127,15 +147,21 @@ system MH lib directory.")
;;; Hooks:
(defvar mh-letter-mode-hook nil
"Invoked in `mh-letter-mode' on a new letter.")
(defcustom mh-letter-mode-hook nil
"Invoked in `mh-letter-mode' on a new letter."
:type 'hook
:group 'mh-compose)
(defvar mh-compose-letter-function nil
(defcustom mh-compose-letter-function nil
"Invoked when setting up a letter draft.
It is passed three arguments: TO recipients, SUBJECT, and CC recipients.")
It is passed three arguments: TO recipients, SUBJECT, and CC recipients."
:type 'function
:group 'mh-compose)
(defvar mh-before-send-letter-hook nil
"Invoked at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command.")
(defcustom mh-before-send-letter-hook nil
"Invoked at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command."
:type 'hook
:group 'mh-compose)
(defvar mh-rejected-letter-start

View File

@ -1,7 +1,7 @@
;;; mh-utils.el --- mh-e code needed for both sending and reading
;; Time-stamp: <95/10/22 17:58:16 gildea>
;; Copyright (C) 1993, 1995 Free Software Foundation, Inc.
;; Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc.
;; This file is part of mh-e, part of GNU Emacs.
@ -24,10 +24,6 @@
;; Internal support for mh-e package.
;;; Change Log:
;; $Id: mh-utils.el,v 1.10 1996/06/28 06:56:17 rms Exp rms $
;;; Code:
;;; Set for local environment:
@ -51,23 +47,37 @@ the mhl program and the components file.")
;;; User preferences:
(defvar mh-auto-folder-collect t
(defgroup mh-buffer nil
"Layout of MH-E buffers"
:prefix "mh-"
:group 'mh)
(defcustom mh-auto-folder-collect t
"*Whether to start collecting MH folder names immediately in the background.
Non-nil means start a background process collecting the names of all
folders as soon as mh-e is loaded.")
folders as soon as mh-e is loaded."
:type 'boolean
:group 'mh)
(defvar mh-recursive-folders nil
"*If non-nil, then commands which operate on folders do so recursively.")
(defcustom mh-recursive-folders nil
"*If non-nil, then commands which operate on folders do so recursively."
:type 'boolean
:group 'mh)
(defvar mh-clean-message-header nil
(defcustom mh-clean-message-header nil
"*Non-nil means clean headers of messages that are displayed or inserted.
The variables `mh-visible-headers' and `mh-invisible-headers' control what
is removed.")
is removed."
:type 'boolean
:group 'mh-buffer)
(defvar mh-visible-headers nil
(defcustom mh-visible-headers nil
"*If non-nil, contains a regexp specifying the headers to keep when cleaning.
Only used if `mh-clean-message-header' is non-nil. Setting this variable
overrides `mh-invisible-headers'.")
overrides `mh-invisible-headers'."
:type '(choice (const nil) regexp)
:group 'mh-buffer)
(defvar mh-invisible-headers
"^Received: \\|^Message-Id: \\|^Remailed-\\|^Via: \\|^Mail-from: \\|^Return-Path: \\|^Delivery-Date: \\|^In-Reply-To: \\|^Resent-"
@ -75,11 +85,15 @@ overrides `mh-invisible-headers'.")
If `mh-visible-headers' is non-nil, it is used instead to specify what
to keep.")
(defvar mh-bury-show-buffer t
"*Non-nil means that the displayed show buffer for a folder is buried.")
(defcustom mh-bury-show-buffer t
"*Non-nil means that the displayed show buffer for a folder is buried."
:type 'boolean
:group 'mh-buffer)
(defvar mh-summary-height 4
"*Number of lines in MH-Folder window (including the mode line).")
(defcustom mh-summary-height 4
"*Number of lines in MH-Folder window (including the mode line)."
:type 'integer
:group 'mh-buffer)
(defvar mh-msg-number-regexp "^ *\\([0-9]+\\)"
"Regexp to find the number of a message in a scan line.
@ -89,13 +103,15 @@ The message's number must be surrounded with \\( \\)")
"Format string containing a regexp matching the scan listing for a message.
The desired message's number will be an argument to format.")
(defvar mhl-formfile nil
(defcustom mhl-formfile nil
"*Name of format file to be used by mhl to show and print messages.
A value of T means use the default format file.
Nil means don't use mhl to format messages when showing; mhl is still used,
with the default format file, to format messages when printing them.
The format used should specify a non-zero value for overflowoffset so
the message continues to conform to RFC 822 and mh-e can parse the headers.")
the message continues to conform to RFC 822 and mh-e can parse the headers."
:type '(choice (const nil) (const t) string)
:group 'mh)
(put 'mhl-formfile 'info-file "mh-e")
(defvar mh-default-folder-for-message-function nil