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-13 07:51:54 +00:00
parent d61140e89d
commit 00ed33e7ab
7 changed files with 225 additions and 93 deletions

View File

@ -69,27 +69,41 @@
(provide 'avoid)
(defgroup avoid nil
"Make mouse pointer stay out of the way of editing."
:prefix "mouse-avoidance-"
:group 'mouse)
(defvar mouse-avoidance-mode nil
"Value is t or a symbol if the mouse pointer should avoid the cursor.
See function `mouse-avoidance-mode' for possible values. Changing this
variable is NOT the recommended way to change modes; use that function
instead.")
(defvar mouse-avoidance-nudge-dist 15
(defcustom mouse-avoidance-nudge-dist 15
"*Average distance that mouse will be moved when approached by cursor.
Only applies in mouse-avoidance-mode `jump' and its derivatives.
For best results make this larger than `mouse-avoidance-threshold'.")
For best results make this larger than `mouse-avoidance-threshold'."
:type 'integer
:group 'avoid)
(defvar mouse-avoidance-nudge-var 10
"*Variability of `mouse-avoidance-nudge-dist' (which see).")
(defcustom mouse-avoidance-nudge-var 10
"*Variability of `mouse-avoidance-nudge-dist' (which see)."
:type 'integer
:group 'avoid)
(defvar mouse-avoidance-animation-delay .01
"Delay between animation steps, in seconds.")
(defcustom mouse-avoidance-animation-delay .01
"Delay between animation steps, in seconds."
:type 'number
:group 'avoid)
(defvar mouse-avoidance-threshold 5
(defcustom mouse-avoidance-threshold 5
"*Mouse-pointer's flight distance.
If the cursor gets closer than this, the mouse pointer will move away.
Only applies in mouse-avoidance-modes `animate' and `jump'.")
Only applies in mouse-avoidance-modes `animate' and `jump'."
:type 'integer
:group 'avoid)
;; Internal variables
(defvar mouse-avoidance-state nil)

View File

@ -1,6 +1,6 @@
;;; completion.el --- dynamic word-completion code
;; Copyright (C) 1990, 1993, 1995 Free Software Foundation, Inc.
;; Copyright (C) 1990, 1993, 1995, 1997 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: abbrev
@ -279,44 +279,69 @@
;; User changeable parameters
;;---------------------------------------------------------------------------
(defvar enable-completion t
(defgroup completion nil
"Dynamic word-completion code."
:group 'matching)
(defcustom enable-completion t
"*Non-nil means enable recording and saving of completions.
If nil, no new words added to the database or saved to the init file.")
If nil, no new words added to the database or saved to the init file."
:type 'boolean
:group 'completion)
(defvar save-completions-flag t
(defcustom save-completions-flag t
"*Non-nil means save most-used completions when exiting Emacs.
See also `saved-completions-retention-time'.")
See also `saved-completions-retention-time'."
:type 'boolean
:group 'completion)
(defvar save-completions-file-name (convert-standard-filename "~/.completions")
"*The filename to save completions to.")
(defcustom save-completions-file-name (convert-standard-filename "~/.completions")
"*The filename to save completions to."
:type 'file
:group 'completion)
(defvar save-completions-retention-time 336
(defcustom save-completions-retention-time 336
"*Discard a completion if unused for this many hours.
\(1 day = 24, 1 week = 168). If this is 0, non-permanent completions
will not be saved unless these are used. Default is two weeks.")
will not be saved unless these are used. Default is two weeks."
:type 'integer
:group 'completion)
(defvar completion-on-separator-character nil
(defcustom completion-on-separator-character nil
"*Non-nil means separator characters mark previous word as used.
This means the word will be saved as a completion.")
This means the word will be saved as a completion."
:type 'boolean
:group 'completion)
(defvar completions-file-versions-kept kept-new-versions
"*Number of versions to keep for the saved completions file.")
(defcustom completions-file-versions-kept kept-new-versions
"*Number of versions to keep for the saved completions file."
:type 'integer
:group 'completion)
(defvar completion-prompt-speed-threshold 4800
"*Minimum output speed at which to display next potential completion.")
(defcustom completion-prompt-speed-threshold 4800
"*Minimum output speed at which to display next potential completion."
:type 'integer
:group 'completion)
(defvar completion-cdabbrev-prompt-flag nil
(defcustom completion-cdabbrev-prompt-flag nil
"*If non-nil, the next completion prompt does a cdabbrev search.
This can be time consuming.")
This can be time consuming."
:type 'boolean
:group 'completion)
(defvar completion-search-distance 15000
(defcustom completion-search-distance 15000
"*How far to search in the buffer when looking for completions.
In number of characters. If nil, search the whole buffer.")
In number of characters. If nil, search the whole buffer."
:type 'integer
:group 'completion)
(defvar completions-merging-modes '(lisp c)
(defcustom completions-merging-modes '(lisp c)
"*List of modes {`c' or `lisp'} for automatic completions merging.
Definitions from visited files which have these modes
are automatically added to the completion database.")
are automatically added to the completion database."
:type '(set (const lisp) (const c))
:group 'completion)
;;(defvar *record-cmpl-statistics-p* nil
;; "*If non-nil, record completion statistics.")

View File

@ -53,25 +53,40 @@
;; vars here
;;
(defvar hexl-program "hexl"
(defgroup hexl nil
"Edit a file in a hex dump format using the hexl filter."
:group 'data)
(defcustom hexl-program "hexl"
"The program that will hexlify and dehexlify its stdin.
`hexl-program' will always be concatenated with `hexl-options'
and \"-de\" when dehexlifying a buffer.")
and \"-de\" when dehexlifying a buffer."
:type 'string
:group 'hexl)
(defvar hexl-iso ""
(defcustom hexl-iso ""
"If your emacs can handle ISO characters, this should be set to
\"-iso\" otherwise it should be \"\".")
\"-iso\" otherwise it should be \"\"."
:type 'string
:group 'hexl)
(defvar hexl-options (format "-hex %s" hexl-iso)
"Options to hexl-program that suit your needs.")
(defcustom hexl-options (format "-hex %s" hexl-iso)
"Options to hexl-program that suit your needs."
:type 'string
:group 'hexl)
(defvar hexlify-command
(defcustom hexlify-command
(format "%s%s %s" exec-directory hexl-program hexl-options)
"The command to use to hexlify a buffer.")
"The command to use to hexlify a buffer."
:type 'string
:group 'hexl)
(defvar dehexlify-command
(defcustom dehexlify-command
(format "%s%s -de %s" exec-directory hexl-program hexl-options)
"The command to use to unhexlify a buffer.")
"The command to use to unhexlify a buffer."
:type 'string
:group 'hexl)
(defvar hexl-max-address 0
"Maximum offset into hexl buffer.")

View File

@ -43,26 +43,43 @@
(require 'sendmail)
;;;
(defvar smtpmail-default-smtp-server nil
"*Specify default SMTP server.")
(defgroup smtpmail nil
"SMTP protocol for sending mail."
:group 'mail)
(defvar smtpmail-smtp-server
(defcustom smtpmail-default-smtp-server nil
"*Specify default SMTP server."
:type '(choice (const nil) string)
:group 'smtpmail)
(defcustom smtpmail-smtp-server
(or (getenv "SMTPSERVER") smtpmail-default-smtp-server)
"*The name of the host running SMTP server.")
"*The name of the host running SMTP server."
:type '(choice (const nil) string)
:group 'smtpmail)
(defvar smtpmail-smtp-service 25
"*SMTP service port number. smtp or 25 .")
(defcustom smtpmail-smtp-service 25
"*SMTP service port number. smtp or 25 ."
:type 'integer
:group 'smtpmail)
(defvar smtpmail-local-domain nil
(defcustom smtpmail-local-domain nil
"*Local domain name without a host name.
If the function (system-name) returns the full internet address,
don't define this value.")
don't define this value."
:type '(choice (const nil) string)
:group 'smtpmail)
(defvar smtpmail-debug-info nil
"*smtpmail debug info printout. messages and process buffer.")
(defcustom smtpmail-debug-info nil
"*smtpmail debug info printout. messages and process buffer."
:type 'boolean
:group 'smtpmail)
(defvar smtpmail-code-conv-from nil ;; *junet*
"*smtpmail code convert from this code to *internal*..for tiny-mime..")
(defcustom smtpmail-code-conv-from nil ;; *junet*
"*smtpmail code convert from this code to *internal*..for tiny-mime.."
:type 'boolean
:group 'smtpmail)
;;;
;;;

View File

@ -1,6 +1,6 @@
;;; man.el --- browse UNIX manual pages
;; Copyright (C) 1993, 1994, 1996 Free Software Foundation, Inc.
;; Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
;; Author: Barry A. Warsaw <bwarsaw@cen.com>
;; Keywords: help
@ -98,10 +98,16 @@
;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
;; empty defvars (keep the compiler quiet)
(defgroup man nil
"Browse UNIX manual pages."
:prefix "Man-"
:group 'help)
(defvar Man-notify)
(defvar Man-current-page)
(defvar Man-page-list)
(defvar Man-filter-list nil
(defcustom Man-filter-list nil
"*Manpage cleaning filter command phrases.
This variable contains a list of the following form:
@ -111,7 +117,11 @@ Each phrase-string is concatenated onto the command-string to form a
command filter. The (standard) output (and standard error) of the Un*x
man command is piped through each command filter in the order the
commands appear in the association list. The final output is placed in
the manpage buffer.")
the manpage buffer."
:type '(repeat (list (string :tag "Command String")
(repeat :inline t
(string :tag "Phrase String"))))
:group 'man)
(defvar Man-original-frame)
(defvar Man-arguments)
@ -126,17 +136,23 @@ the manpage buffer.")
;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
;; user variables
(defvar Man-fontify-manpage-flag t
"*Make up the manpage with fonts.")
(defcustom Man-fontify-manpage-flag t
"*Make up the manpage with fonts."
:type 'boolean
:group 'man)
(defvar Man-overstrike-face 'bold
"*Face to use when fontifying overstrike.")
(defcustom Man-overstrike-face 'bold
"*Face to use when fontifying overstrike."
:type 'face
:group 'man)
(defvar Man-underline-face 'underline
"*Face to use when fontifying underlining.")
(defcustom Man-underline-face 'underline
"*Face to use when fontifying underlining."
:type 'face
:group 'man)
;; Use the value of the obsolete user option Man-notify, if set.
(defvar Man-notify-method (if (boundp 'Man-notify) Man-notify 'friendly)
(defcustom Man-notify-method (if (boundp 'Man-notify) Man-notify 'friendly)
"*Selects the behavior when manpage is ready.
This variable may have one of the following values, where (sf) means
that the frames are switched, so the manpage is displayed in the frame
@ -151,23 +167,33 @@ polite -- don't display manpage, but prints message and beep when ready
quiet -- like `polite', but don't beep
meek -- make no indication that the manpage is ready
Any other value of `Man-notify-method' is equivalent to `meek'.")
Any other value of `Man-notify-method' is equivalent to `meek'."
:type '(radio (const newframe) (const pushy) (const bully)
(const aggressive) (const friendly)
(const polite) (const quiet) (const meek))
:group 'man)
(defvar Man-frame-parameters nil
"*Frame parameter list for creating a new frame for a manual page.")
(defcustom Man-frame-parameters nil
"*Frame parameter list for creating a new frame for a manual page."
:type 'sexp
:group 'man)
(defvar Man-downcase-section-letters-flag t
(defcustom Man-downcase-section-letters-flag t
"*Letters in sections are converted to lower case.
Some Un*x man commands can't handle uppercase letters in sections, for
example \"man 2V chmod\", but they are often displayed in the manpage
with the upper case letter. When this variable is t, the section
letter (e.g., \"2V\") is converted to lowercase (e.g., \"2v\") before
being sent to the man background process.")
being sent to the man background process."
:type 'boolean
:group 'man)
(defvar Man-circular-pages-flag t
"*If t, the manpage list is treated as circular for traversal.")
(defcustom Man-circular-pages-flag t
"*If t, the manpage list is treated as circular for traversal."
:type 'boolean
:group 'man)
(defvar Man-section-translations-alist
(defcustom Man-section-translations-alist
(list
'("3C++" . "3")
;; Some systems have a real 3x man section, so let's comment this.
@ -178,7 +204,10 @@ being sent to the man background process.")
Some manpages (e.g. the Sun C++ 2.1 manpages) have section numbers in
their references which Un*x `man' does not recognize. This
association list is used to translate those sections, when found, to
the associated section number.")
the associated section number."
:type '(repeat (cons (string :tag "Bogus Section")
(string :tag "Real Section")))
:group 'man)
(defvar manual-program "man"
"The name of the program that produces man pages.")

View File

@ -3,7 +3,7 @@
;; Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
;; Author: Francesco Potorti` <pot@cnuce.cnr.it>
;; Version: $Id: cmacexp.el,v 1.25 1996/05/21 15:42:13 kwzh Exp rms $
;; Version: $Id: cmacexp.el,v 1.26 1996/06/07 22:59:27 rms Exp rms $
;; Adapted-By: ESR
;; Keywords: c
@ -90,13 +90,22 @@
(provide 'cmacexp)
(defvar c-macro-shrink-window-flag nil
"*Non-nil means shrink the *Macroexpansion* window to fit its contents.")
(defgroup c-macro nil
"Expand C macros in a region."
:group 'c)
(defvar c-macro-prompt-flag nil
"*Non-nil makes `c-macro-expand' prompt for preprocessor arguments.")
(defvar c-macro-preprocessor
(defcustom c-macro-shrink-window-flag nil
"*Non-nil means shrink the *Macroexpansion* window to fit its contents."
:type 'boolean
:group 'c-macro)
(defcustom c-macro-prompt-flag nil
"*Non-nil makes `c-macro-expand' prompt for preprocessor arguments."
:type 'boolean
:group 'c-macro)
(defcustom c-macro-preprocessor
;; Cannot rely on standard directory on MS-DOS to find CPP.
(cond ((eq system-type 'ms-dos) "cpp -C")
;; Solaris has it in an unusual place.
@ -108,10 +117,14 @@
"The preprocessor used by the cmacexp package.
If you change this, be sure to preserve the `-C' (don't strip comments)
option, or to set an equivalent one.")
option, or to set an equivalent one."
:type 'string
:group 'c-macro)
(defvar c-macro-cppflags ""
"*Preprocessor flags used by `c-macro-expand'.")
(defcustom c-macro-cppflags ""
"*Preprocessor flags used by `c-macro-expand'."
:type 'string
:group 'c-macro)
(defconst c-macro-buffer-name "*Macroexpansion*")

View File

@ -235,30 +235,49 @@
;;; Customarily customizable variable definitions
(defvar pages-directory-buffer-narrowing-p t
"*If non-nil, `pages-directory-goto' narrows pages buffer to entry.")
(defgroup pages nil
"Extended page-handling commands."
:group 'extensions)
(defvar pages-directory-for-adding-page-narrowing-p t
"*If non-nil, `add-new-page' narrows page buffer to new entry.")
(defvar pages-directory-for-adding-new-page-before-current-page-p t
"*If non-nil, `add-new-page' inserts new page before current page.")
(defcustom pages-directory-buffer-narrowing-p t
"*If non-nil, `pages-directory-goto' narrows pages buffer to entry."
:type 'boolean
:group 'pages)
(defcustom pages-directory-for-adding-page-narrowing-p t
"*If non-nil, `add-new-page' narrows page buffer to new entry."
:type 'boolean
:group 'pages)
(defcustom pages-directory-for-adding-new-page-before-current-page-p t
"*If non-nil, `add-new-page' inserts new page before current page."
:type 'boolean
:group 'pages)
;;; Addresses related variables
(defvar pages-addresses-file-name "~/addresses"
(defcustom pages-addresses-file-name "~/addresses"
"*Standard name for file of addresses. Entries separated by page-delimiter.
Used by `pages-directory-for-addresses' function.")
Used by `pages-directory-for-addresses' function."
:type 'file
:group 'pages)
(defvar pages-directory-for-addresses-goto-narrowing-p t
"*If non-nil, `pages-directory-goto' narrows addresses buffer to entry.")
(defcustom pages-directory-for-addresses-goto-narrowing-p t
"*If non-nil, `pages-directory-goto' narrows addresses buffer to entry."
:type 'boolean
:group 'pages)
(defvar pages-directory-for-addresses-buffer-keep-windows-p t
"*If nil, `pages-directory-for-addresses' deletes other windows.")
(defcustom pages-directory-for-addresses-buffer-keep-windows-p t
"*If nil, `pages-directory-for-addresses' deletes other windows."
:type 'boolean
:group 'pages)
(defvar pages-directory-for-adding-addresses-narrowing-p t
"*If non-nil, `add-new-page' narrows addresses buffer to new entry.")
(defcustom pages-directory-for-adding-addresses-narrowing-p t
"*If non-nil, `add-new-page' narrows addresses buffer to new entry."
:type 'boolean
:group 'pages)
;;; Key bindings for page handling functions