diff options
| author | Richard M. Stallman | 1997-04-13 03:09:23 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-04-13 03:09:23 +0000 |
| commit | ded3e3d8164880c92301010fce1426ae20fb8d12 (patch) | |
| tree | 4f417c70082215f769efa092597827306b88a04c | |
| parent | 8e9337739bb050be41b174c06bd2fcc5d4117097 (diff) | |
| download | emacs-ded3e3d8164880c92301010fce1426ae20fb8d12.tar.gz emacs-ded3e3d8164880c92301010fce1426ae20fb8d12.zip | |
Add defgroup; use defcustom for user vars.
| -rw-r--r-- | lisp/fast-lock.el | 36 | ||||
| -rw-r--r-- | lisp/info.el | 36 | ||||
| -rw-r--r-- | lisp/textmodes/two-column.el | 42 |
3 files changed, 82 insertions, 32 deletions
diff --git a/lisp/fast-lock.el b/lisp/fast-lock.el index aa3a57b9e41..566b75b6cae 100644 --- a/lisp/fast-lock.el +++ b/lisp/fast-lock.el | |||
| @@ -226,7 +226,12 @@ | |||
| 226 | 226 | ||
| 227 | ;; User Variables: | 227 | ;; User Variables: |
| 228 | 228 | ||
| 229 | (defvar fast-lock-cache-directories '("." "~/.emacs-flc") | 229 | (defgroup fast-lock nil |
| 230 | "Automagic text properties caching for fast Font Lock mode" | ||
| 231 | :group 'faces) | ||
| 232 | |||
| 233 | |||
| 234 | (defcustom fast-lock-cache-directories '("." "~/.emacs-flc") | ||
| 230 | ; - `internal', keep each file's Font Lock cache file in the same file. | 235 | ; - `internal', keep each file's Font Lock cache file in the same file. |
| 231 | ; - `external', keep each file's Font Lock cache file in the same directory. | 236 | ; - `external', keep each file's Font Lock cache file in the same directory. |
| 232 | "*Directories in which Font Lock cache files are saved and read. | 237 | "*Directories in which Font Lock cache files are saved and read. |
| @@ -244,9 +249,11 @@ For example: | |||
| 244 | ((\"^/your/true/home/directory/\" . \".\") \"~/.emacs-flc\") | 249 | ((\"^/your/true/home/directory/\" . \".\") \"~/.emacs-flc\") |
| 245 | 250 | ||
| 246 | would cause a file's current directory to be used if the file is under your | 251 | would cause a file's current directory to be used if the file is under your |
| 247 | home directory hierarchy, or otherwise the absolute directory `~/.emacs-flc'.") | 252 | home directory hierarchy, or otherwise the absolute directory `~/.emacs-flc'." |
| 253 | :type '(repeat (choice (cons regexp directory) directory)) | ||
| 254 | :group 'fast-lock) | ||
| 248 | 255 | ||
| 249 | (defvar fast-lock-minimum-size (* 25 1024) | 256 | (defcustom fast-lock-minimum-size (* 25 1024) |
| 250 | "*Minimum size of a buffer for cached fontification. | 257 | "*Minimum size of a buffer for cached fontification. |
| 251 | Only buffers more than this can have associated Font Lock cache files saved. | 258 | Only buffers more than this can have associated Font Lock cache files saved. |
| 252 | If nil, means cache files are never created. | 259 | 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), | |||
| 254 | where MAJOR-MODE is a symbol or t (meaning the default). For example: | 261 | where MAJOR-MODE is a symbol or t (meaning the default). For example: |
| 255 | ((c-mode . 25600) (c++-mode . 25600) (rmail-mode . 1048576)) | 262 | ((c-mode . 25600) (c++-mode . 25600) (rmail-mode . 1048576)) |
| 256 | means that the minimum size is 25K for buffers in C or C++ modes, one megabyte | 263 | means that the minimum size is 25K for buffers in C or C++ modes, one megabyte |
| 257 | for buffers in Rmail mode, and size is irrelevant otherwise.") | 264 | for buffers in Rmail mode, and size is irrelevant otherwise." |
| 265 | :type '(choice (integer :tag "Size") (repeat (cons (symbol :tag "Major Mode") | ||
| 266 | (integer :tag "Size")))) | ||
| 267 | :group 'fast-lock) | ||
| 258 | 268 | ||
| 259 | (defvar fast-lock-save-events '(kill-buffer kill-emacs) | 269 | (defcustom fast-lock-save-events '(kill-buffer kill-emacs) |
| 260 | "*Events under which caches will be saved. | 270 | "*Events under which caches will be saved. |
| 261 | Valid events are `save-buffer', `kill-buffer' and `kill-emacs'. | 271 | Valid events are `save-buffer', `kill-buffer' and `kill-emacs'. |
| 262 | If concurrent editing sessions use the same associated cache file for a file's | 272 | If concurrent editing sessions use the same associated cache file for a file's |
| 263 | buffer, then you should add `save-buffer' to this list.") | 273 | buffer, then you should add `save-buffer' to this list." |
| 274 | :type '(set (const kill-buffer) (const save-buffer) (const kill-emacs)) | ||
| 275 | :group 'fast-lock) | ||
| 264 | 276 | ||
| 265 | (defvar fast-lock-save-others t | 277 | (defcustom fast-lock-save-others t |
| 266 | "*If non-nil, save Font Lock cache files irrespective of file owner. | 278 | "*If non-nil, save Font Lock cache files irrespective of file owner. |
| 267 | If nil, means only buffer files known to be owned by you can have associated | 279 | If nil, means only buffer files known to be owned by you can have associated |
| 268 | Font Lock cache files saved. Ownership may be unknown for networked files.") | 280 | Font Lock cache files saved. Ownership may be unknown for networked files." |
| 281 | :type 'boolean | ||
| 282 | :group 'fast-lock) | ||
| 269 | 283 | ||
| 270 | (defvar fast-lock-save-faces | 284 | (defvar fast-lock-save-faces |
| 271 | (when (save-match-data (string-match "XEmacs" (emacs-version))) | 285 | (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.") | |||
| 274 | "Faces that will be saved in a Font Lock cache file. | 288 | "Faces that will be saved in a Font Lock cache file. |
| 275 | If nil, means information for all faces will be saved.") | 289 | If nil, means information for all faces will be saved.") |
| 276 | 290 | ||
| 277 | (defvar fast-lock-verbose font-lock-verbose | 291 | (defcustom fast-lock-verbose font-lock-verbose |
| 278 | "*If non-nil, means show status messages for cache processing. | 292 | "*If non-nil, means show status messages for cache processing. |
| 279 | If a number, only buffers greater than this size have processing messages.") | 293 | If a number, only buffers greater than this size have processing messages." |
| 294 | :type '(choice integer boolean) | ||
| 295 | :group 'fast-lock) | ||
| 280 | 296 | ||
| 281 | ;; User Functions: | 297 | ;; User Functions: |
| 282 | 298 | ||
diff --git a/lisp/info.el b/lisp/info.el index a760d4f7aba..fb5c7b985a2 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -29,27 +29,39 @@ | |||
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | 31 | ||
| 32 | (defgroup info nil | ||
| 33 | "Info subsystem" | ||
| 34 | :group 'help | ||
| 35 | :group 'docs) | ||
| 36 | |||
| 37 | |||
| 32 | (defvar Info-history nil | 38 | (defvar Info-history nil |
| 33 | "List of info nodes user has visited. | 39 | "List of info nodes user has visited. |
| 34 | Each element of list is a list (FILENAME NODENAME BUFFERPOS).") | 40 | Each element of list is a list (FILENAME NODENAME BUFFERPOS).") |
| 35 | 41 | ||
| 36 | (defvar Info-enable-edit nil | 42 | (defcustom Info-enable-edit nil |
| 37 | "*Non-nil means the \\<Info-mode-map>\\[Info-edit] command in Info can edit the current node. | 43 | "*Non-nil means the \\<Info-mode-map>\\[Info-edit] command in Info can edit the current node. |
| 38 | This is convenient if you want to write info files by hand. | 44 | This is convenient if you want to write info files by hand. |
| 39 | However, we recommend that you not do this. | 45 | However, we recommend that you not do this. |
| 40 | It is better to write a Texinfo file and generate the Info file from that, | 46 | It is better to write a Texinfo file and generate the Info file from that, |
| 41 | because that gives you a printed manual as well.") | 47 | because that gives you a printed manual as well." |
| 48 | :type 'boolean | ||
| 49 | :group 'info) | ||
| 42 | 50 | ||
| 43 | (defvar Info-enable-active-nodes nil | 51 | (defvar Info-enable-active-nodes nil |
| 44 | "Non-nil allows Info to execute Lisp code associated with nodes. | 52 | "Non-nil allows Info to execute Lisp code associated with nodes. |
| 45 | The Lisp code is executed when the node is selected.") | 53 | The Lisp code is executed when the node is selected.") |
| 46 | (put 'Info-enable-active-nodes 'risky-local-variable t) | 54 | (put 'Info-enable-active-nodes 'risky-local-variable t) |
| 47 | 55 | ||
| 48 | (defvar Info-fontify t | 56 | (defcustom Info-fontify t |
| 49 | "*Non-nil enables highlighting and fonts in Info nodes.") | 57 | "*Non-nil enables highlighting and fonts in Info nodes." |
| 58 | :type 'boolean | ||
| 59 | :group 'info) | ||
| 50 | 60 | ||
| 51 | (defvar Info-fontify-maximum-menu-size 30000 | 61 | (defcustom Info-fontify-maximum-menu-size 30000 |
| 52 | "*Maximum size of menu to fontify if `Info-fontify' is non-nil.") | 62 | "*Maximum size of menu to fontify if `Info-fontify' is non-nil." |
| 63 | :type 'integer | ||
| 64 | :group 'info) | ||
| 53 | 65 | ||
| 54 | (defvar Info-directory-list | 66 | (defvar Info-directory-list |
| 55 | (let ((path (getenv "INFOPATH")) | 67 | (let ((path (getenv "INFOPATH")) |
| @@ -99,9 +111,11 @@ source tree, the `info' directory in the source tree is used as the last | |||
| 99 | element, in place of the installation Info directory. This is useful | 111 | element, in place of the installation Info directory. This is useful |
| 100 | when you run a version of Emacs without installing it.") | 112 | when you run a version of Emacs without installing it.") |
| 101 | 113 | ||
| 102 | (defvar Info-additional-directory-list nil | 114 | (defcustom Info-additional-directory-list nil |
| 103 | "List of additional directories to search for Info documentation files. | 115 | "List of additional directories to search for Info documentation files. |
| 104 | These directories are not searched for merging the `dir' file.") | 116 | These directories are not searched for merging the `dir' file." |
| 117 | :type '(repeat directory) | ||
| 118 | :group 'info) | ||
| 105 | 119 | ||
| 106 | (defvar Info-current-file nil | 120 | (defvar Info-current-file nil |
| 107 | "Info file that Info is now looking at, or nil. | 121 | "Info file that Info is now looking at, or nil. |
| @@ -1936,12 +1950,14 @@ the variable `Info-file-list-for-emacs'." | |||
| 1936 | (t | 1950 | (t |
| 1937 | (Info-goto-emacs-command-node command))))) | 1951 | (Info-goto-emacs-command-node command))))) |
| 1938 | 1952 | ||
| 1939 | (defvar Info-title-face-alist | 1953 | (defcustom Info-title-face-alist |
| 1940 | '((?* bold underline) | 1954 | '((?* bold underline) |
| 1941 | (?= bold-italic underline) | 1955 | (?= bold-italic underline) |
| 1942 | (?- italic underline)) | 1956 | (?- italic underline)) |
| 1943 | "*Alist of face or list of faces to use for pseudo-underlined titles. | 1957 | "*Alist of face or list of faces to use for pseudo-underlined titles. |
| 1944 | The alist key is the character the title is underlined with (?*, ?= or ?-).") | 1958 | The alist key is the character the title is underlined with (?*, ?= or ?-)." |
| 1959 | :type '(repeat (list character face face)) | ||
| 1960 | :group 'info) | ||
| 1945 | 1961 | ||
| 1946 | (defun Info-fontify-node () | 1962 | (defun Info-fontify-node () |
| 1947 | (save-excursion | 1963 | (save-excursion |
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el index 1fa8474c9b9..0643bb99ecb 100644 --- a/lisp/textmodes/two-column.el +++ b/lisp/textmodes/two-column.el | |||
| @@ -198,6 +198,12 @@ | |||
| 198 | 198 | ||
| 199 | ;;;;; variable declarations ;;;;; | 199 | ;;;;; variable declarations ;;;;; |
| 200 | 200 | ||
| 201 | (defgroup two-column nil | ||
| 202 | "Minor mode for editing of two-column text" | ||
| 203 | :prefix "2C-" | ||
| 204 | :group 'frames) | ||
| 205 | |||
| 206 | |||
| 201 | ;; Markers seem to be the only buffer-id not affected by renaming a buffer. | 207 | ;; Markers seem to be the only buffer-id not affected by renaming a buffer. |
| 202 | ;; This nevertheless loses when a buffer is killed. The variable-name is | 208 | ;; This nevertheless loses when a buffer is killed. The variable-name is |
| 203 | ;; required by `describe-mode'. | 209 | ;; required by `describe-mode'. |
| @@ -213,40 +219,52 @@ | |||
| 213 | 219 | ||
| 214 | 220 | ||
| 215 | ;; rearranged, so that the pertinent info will show in 40 columns | 221 | ;; rearranged, so that the pertinent info will show in 40 columns |
| 216 | (defvar 2C-mode-line-format | 222 | (defcustom 2C-mode-line-format |
| 217 | '("-%*- %15b --" (-3 . "%p") "--%[(" mode-name | 223 | '("-%*- %15b --" (-3 . "%p") "--%[(" mode-name |
| 218 | minor-mode-alist "%n" mode-line-process ")%]%-") | 224 | minor-mode-alist "%n" mode-line-process ")%]%-") |
| 219 | "*Value of mode-line-format for a buffer in two-column minor mode.") | 225 | "*Value of mode-line-format for a buffer in two-column minor mode." |
| 226 | :type 'sexp | ||
| 227 | :group 'two-column) | ||
| 220 | 228 | ||
| 221 | 229 | ||
| 222 | (defvar 2C-other-buffer-hook 'text-mode | 230 | (defcustom 2C-other-buffer-hook 'text-mode |
| 223 | "*Hook run in new buffer when it is associated with current one.") | 231 | "*Hook run in new buffer when it is associated with current one." |
| 232 | :type 'function | ||
| 233 | :group 'two-column) | ||
| 224 | 234 | ||
| 225 | 235 | ||
| 226 | (defvar 2C-separator "" | 236 | (defcustom 2C-separator "" |
| 227 | "*A string inserted between the two columns when merging. | 237 | "*A string inserted between the two columns when merging. |
| 228 | This gets set locally by \\[2C-split].") | 238 | This gets set locally by \\[2C-split]." |
| 239 | :type 'string | ||
| 240 | :group 'two-column) | ||
| 229 | (put '2C-separator 'permanent-local t) | 241 | (put '2C-separator 'permanent-local t) |
| 230 | 242 | ||
| 231 | 243 | ||
| 232 | 244 | ||
| 233 | (defvar 2C-window-width 40 | 245 | (defcustom 2C-window-width 40 |
| 234 | "*The width of the first column. (Must be at least `window-min-width') | 246 | "*The width of the first column. (Must be at least `window-min-width') |
| 235 | This value is local for every buffer that sets it.") | 247 | This value is local for every buffer that sets it." |
| 248 | :type 'integer | ||
| 249 | :group 'two-column) | ||
| 236 | (make-variable-buffer-local '2C-window-width) | 250 | (make-variable-buffer-local '2C-window-width) |
| 237 | (put '2C-window-width 'permanent-local t) | 251 | (put '2C-window-width 'permanent-local t) |
| 238 | 252 | ||
| 239 | 253 | ||
| 240 | 254 | ||
| 241 | (defvar 2C-beyond-fill-column 4 | 255 | (defcustom 2C-beyond-fill-column 4 |
| 242 | "*Base for calculating `fill-column' for a buffer in two-column minor mode. | 256 | "*Base for calculating `fill-column' for a buffer in two-column minor mode. |
| 243 | The value of `fill-column' becomes `2C-window-width' for this buffer | 257 | The value of `fill-column' becomes `2C-window-width' for this buffer |
| 244 | minus this value.") | 258 | minus this value." |
| 259 | :type 'integer | ||
| 260 | :group 'two-column) | ||
| 245 | 261 | ||
| 246 | 262 | ||
| 247 | 263 | ||
| 248 | (defvar 2C-autoscroll t | 264 | (defcustom 2C-autoscroll t |
| 249 | "If non-nil, Emacs attempts to keep the two column's buffers aligned.") | 265 | "If non-nil, Emacs attempts to keep the two column's buffers aligned." |
| 266 | :type 'boolean | ||
| 267 | :group 'two-column) | ||
| 250 | 268 | ||
| 251 | 269 | ||
| 252 | 270 | ||