Commit ded3e3d8 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

Add defgroup; use defcustom for user vars.

parent 8e933773
......@@ -226,7 +226,12 @@
;; User Variables:
(defvar fast-lock-cache-directories '("." "~/.emacs-flc")
(defgroup fast-lock nil
"Automagic text properties caching for fast Font Lock mode"
:group 'faces)
(defcustom fast-lock-cache-directories '("." "~/.emacs-flc")
; - `internal', keep each file's Font Lock cache file in the same file.
; - `external', keep each file's Font Lock cache file in the same directory.
"*Directories in which Font Lock cache files are saved and read.
......@@ -244,9 +249,11 @@ For example:
((\"^/your/true/home/directory/\" . \".\") \"~/.emacs-flc\")
would cause a file's current directory to be used if the file is under your
home directory hierarchy, or otherwise the absolute directory `~/.emacs-flc'.")
home directory hierarchy, or otherwise the absolute directory `~/.emacs-flc'."
:type '(repeat (choice (cons regexp directory) directory))
:group 'fast-lock)
(defvar fast-lock-minimum-size (* 25 1024)
(defcustom fast-lock-minimum-size (* 25 1024)
"*Minimum size of a buffer for cached fontification.
Only buffers more than this can have associated Font Lock cache files saved.
If nil, means cache files are never created.
......@@ -254,18 +261,25 @@ If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
where MAJOR-MODE is a symbol or t (meaning the default). For example:
((c-mode . 25600) (c++-mode . 25600) (rmail-mode . 1048576))
means that the minimum size is 25K for buffers in C or C++ modes, one megabyte
for buffers in Rmail mode, and size is irrelevant otherwise.")
for buffers in Rmail mode, and size is irrelevant otherwise."
:type '(choice (integer :tag "Size") (repeat (cons (symbol :tag "Major Mode")
(integer :tag "Size"))))
:group 'fast-lock)
(defvar fast-lock-save-events '(kill-buffer kill-emacs)
(defcustom fast-lock-save-events '(kill-buffer kill-emacs)
"*Events under which caches will be saved.
Valid events are `save-buffer', `kill-buffer' and `kill-emacs'.
If concurrent editing sessions use the same associated cache file for a file's
buffer, then you should add `save-buffer' to this list.")
buffer, then you should add `save-buffer' to this list."
:type '(set (const kill-buffer) (const save-buffer) (const kill-emacs))
:group 'fast-lock)
(defvar fast-lock-save-others t
(defcustom fast-lock-save-others t
"*If non-nil, save Font Lock cache files irrespective of file owner.
If nil, means only buffer files known to be owned by you can have associated
Font Lock cache files saved. Ownership may be unknown for networked files.")
Font Lock cache files saved. Ownership may be unknown for networked files."
:type 'boolean
:group 'fast-lock)
(defvar fast-lock-save-faces
(when (save-match-data (string-match "XEmacs" (emacs-version)))
......@@ -274,9 +288,11 @@ Font Lock cache files saved. Ownership may be unknown for networked files.")
"Faces that will be saved in a Font Lock cache file.
If nil, means information for all faces will be saved.")
(defvar fast-lock-verbose font-lock-verbose
(defcustom fast-lock-verbose font-lock-verbose
"*If non-nil, means show status messages for cache processing.
If a number, only buffers greater than this size have processing messages.")
If a number, only buffers greater than this size have processing messages."
:type '(choice integer boolean)
:group 'fast-lock)
;; User Functions:
......
......@@ -29,27 +29,39 @@
;;; Code:
(defgroup info nil
"Info subsystem"
:group 'help
:group 'docs)
(defvar Info-history nil
"List of info nodes user has visited.
Each element of list is a list (FILENAME NODENAME BUFFERPOS).")
(defvar Info-enable-edit nil
(defcustom Info-enable-edit nil
"*Non-nil means the \\<Info-mode-map>\\[Info-edit] command in Info can edit the current node.
This is convenient if you want to write info files by hand.
However, we recommend that you not do this.
It is better to write a Texinfo file and generate the Info file from that,
because that gives you a printed manual as well.")
because that gives you a printed manual as well."
:type 'boolean
:group 'info)
(defvar Info-enable-active-nodes nil
"Non-nil allows Info to execute Lisp code associated with nodes.
The Lisp code is executed when the node is selected.")
(put 'Info-enable-active-nodes 'risky-local-variable t)
(defvar Info-fontify t
"*Non-nil enables highlighting and fonts in Info nodes.")
(defcustom Info-fontify t
"*Non-nil enables highlighting and fonts in Info nodes."
:type 'boolean
:group 'info)
(defvar Info-fontify-maximum-menu-size 30000
"*Maximum size of menu to fontify if `Info-fontify' is non-nil.")
(defcustom Info-fontify-maximum-menu-size 30000
"*Maximum size of menu to fontify if `Info-fontify' is non-nil."
:type 'integer
:group 'info)
(defvar Info-directory-list
(let ((path (getenv "INFOPATH"))
......@@ -99,9 +111,11 @@ source tree, the `info' directory in the source tree is used as the last
element, in place of the installation Info directory. This is useful
when you run a version of Emacs without installing it.")
(defvar Info-additional-directory-list nil
(defcustom Info-additional-directory-list nil
"List of additional directories to search for Info documentation files.
These directories are not searched for merging the `dir' file.")
These directories are not searched for merging the `dir' file."
:type '(repeat directory)
:group 'info)
(defvar Info-current-file nil
"Info file that Info is now looking at, or nil.
......@@ -1936,12 +1950,14 @@ the variable `Info-file-list-for-emacs'."
(t
(Info-goto-emacs-command-node command)))))
(defvar Info-title-face-alist
(defcustom Info-title-face-alist
'((?* bold underline)
(?= bold-italic underline)
(?- italic underline))
"*Alist of face or list of faces to use for pseudo-underlined titles.
The alist key is the character the title is underlined with (?*, ?= or ?-).")
The alist key is the character the title is underlined with (?*, ?= or ?-)."
:type '(repeat (list character face face))
:group 'info)
(defun Info-fontify-node ()
(save-excursion
......
......@@ -198,6 +198,12 @@
;;;;; variable declarations ;;;;;
(defgroup two-column nil
"Minor mode for editing of two-column text"
:prefix "2C-"
:group 'frames)
;; Markers seem to be the only buffer-id not affected by renaming a buffer.
;; This nevertheless loses when a buffer is killed. The variable-name is
;; required by `describe-mode'.
......@@ -213,40 +219,52 @@
;; rearranged, so that the pertinent info will show in 40 columns
(defvar 2C-mode-line-format
(defcustom 2C-mode-line-format
'("-%*- %15b --" (-3 . "%p") "--%[(" mode-name
minor-mode-alist "%n" mode-line-process ")%]%-")
"*Value of mode-line-format for a buffer in two-column minor mode.")
"*Value of mode-line-format for a buffer in two-column minor mode."
:type 'sexp
:group 'two-column)
(defvar 2C-other-buffer-hook 'text-mode
"*Hook run in new buffer when it is associated with current one.")
(defcustom 2C-other-buffer-hook 'text-mode
"*Hook run in new buffer when it is associated with current one."
:type 'function
:group 'two-column)
(defvar 2C-separator ""
(defcustom 2C-separator ""
"*A string inserted between the two columns when merging.
This gets set locally by \\[2C-split].")
This gets set locally by \\[2C-split]."
:type 'string
:group 'two-column)
(put '2C-separator 'permanent-local t)
(defvar 2C-window-width 40
(defcustom 2C-window-width 40
"*The width of the first column. (Must be at least `window-min-width')
This value is local for every buffer that sets it.")
This value is local for every buffer that sets it."
:type 'integer
:group 'two-column)
(make-variable-buffer-local '2C-window-width)
(put '2C-window-width 'permanent-local t)
(defvar 2C-beyond-fill-column 4
(defcustom 2C-beyond-fill-column 4
"*Base for calculating `fill-column' for a buffer in two-column minor mode.
The value of `fill-column' becomes `2C-window-width' for this buffer
minus this value.")
minus this value."
:type 'integer
:group 'two-column)
(defvar 2C-autoscroll t
"If non-nil, Emacs attempts to keep the two column's buffers aligned.")
(defcustom 2C-autoscroll t
"If non-nil, Emacs attempts to keep the two column's buffers aligned."
:type 'boolean
:group 'two-column)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment