Commit 4bef9110 authored by Stephen Eglen's avatar Stephen Eglen
Browse files

Customized.

parent 14d4446b
......@@ -61,6 +61,10 @@
(provide 'allout)
;;;_* USER CUSTOMIZATION VARIABLES:
(defgroup allout nil
"Extensive outline mode for use alone and with other modes."
:prefix "outline-"
:group 'outlines)
;;;_ + Layout, Mode, and Topic Header Configuration
......@@ -122,17 +126,19 @@ is modulo the setting of `outline-use-mode-specific-leader', which see.")
(make-variable-buffer-local 'outline-layout)
;;;_ = outline-header-prefix
(defvar outline-header-prefix "."
(defcustom outline-header-prefix "."
"*Leading string which helps distinguish topic headers.
Outline topic header lines are identified by a leading topic
header prefix, which mostly have the value of this var at their front.
\(Level 1 topics are exceptions. They consist of only a single
character, which is typically set to the outline-primary-bullet. Many
outlines start at level 2 to avoid this discrepancy.")
outlines start at level 2 to avoid this discrepancy."
:type 'string
:group 'allout)
(make-variable-buffer-local 'outline-header-prefix)
;;;_ = outline-primary-bullet
(defvar outline-primary-bullet "*"
(defcustom outline-primary-bullet "*"
"Bullet used for top-level outline topics.
Outline topic header lines are identified by a leading topic header
......@@ -142,10 +148,12 @@ var and the respective outline-*-bullets-string vars.
The value of an asterisk (`*') provides for backwards compatibility
with the original emacs outline mode. See outline-plain-bullets-string
and outline-distinctive-bullets-string for the range of available
bullets.")
bullets."
:type 'string
:group 'allout)
(make-variable-buffer-local 'outline-primary-bullet)
;;;_ = outline-plain-bullets-string
(defvar outline-plain-bullets-string (concat outline-primary-bullet
(defcustom outline-plain-bullets-string (concat outline-primary-bullet
"+-:.;,")
"*The bullets normally used in outline topic prefixes.
......@@ -155,10 +163,12 @@ bullets.
DO NOT include the close-square-bracket, `]', as a bullet.
Outline mode has to be reactivated in order for changes to the value
of this var to take effect.")
of this var to take effect."
:type 'string
:group 'allout)
(make-variable-buffer-local 'outline-plain-bullets-string)
;;;_ = outline-distinctive-bullets-string
(defvar outline-distinctive-bullets-string "=>([{}&!?#%\"X@$~\\"
(defcustom outline-distinctive-bullets-string "=>([{}&!?#%\"X@$~\\"
"*Persistent outline header bullets used to distinguish special topics.
These bullets are not offered among the regular, level-specific
......@@ -170,11 +180,13 @@ You must run `set-outline-regexp' in order for changes
to the value of this var to effect outline-mode operation.
DO NOT include the close-square-bracket, `]', on either of the bullet
strings.")
strings."
:type 'string
:group 'allout)
(make-variable-buffer-local 'outline-distinctive-bullets-string)
;;;_ = outline-use-mode-specific-leader
(defvar outline-use-mode-specific-leader t
(defcustom outline-use-mode-specific-leader t
"*When non-nil, use mode-specific topic-header prefixes.
Allout outline mode will use the mode-specific `outline-mode-leaders'
......@@ -198,7 +210,11 @@ comment strings. comment-start strings that do end in spaces are not
tripled, but an underscore is substituted for the space. [This
presumes that the space is for appearance, not comment syntax. You
can use `outline-mode-leaders' to override this behavior, when
incorrect.]")
incorrect.]"
:type '(choice (const t) (const nil) string
(const outline-mode-leaders)
(const comment-start))
:group 'allout)
;;;_ = outline-mode-leaders
(defvar outline-mode-leaders '()
"Specific outline-prefix leading strings per major modes.
......@@ -212,7 +228,7 @@ character, like an \"_\" underscore, to distinguish the lead string
from regular comments that start at bol.")
;;;_ = outline-old-style-prefixes
(defvar outline-old-style-prefixes nil
(defcustom outline-old-style-prefixes nil
"*When non-nil, use only old-and-crusty outline-mode `*' topic prefixes.
Non-nil restricts the topic creation and modification
......@@ -220,10 +236,12 @@ functions to asterix-padded prefixes, so they look exactly
like the original emacs-outline style prefixes.
Whatever the setting of this variable, both old and new style prefixes
are always respected by the topic maneuvering functions.")
are always respected by the topic maneuvering functions."
:type 'boolean
:group 'allout)
(make-variable-buffer-local 'outline-old-style-prefixes)
;;;_ = outline-stylish-prefixes - alternating bullets
(defvar outline-stylish-prefixes t
(defcustom outline-stylish-prefixes t
"*Do fancy stuff with topic prefix bullets according to level, etc.
Non-nil enables topic creation, modification, and repositioning
......@@ -264,51 +282,73 @@ always respected by the topic maneuvering functions, regardless of
this variable setting.
The setting of this var is not relevant when outline-old-style-prefixes
is non-nil.")
is non-nil."
:type 'boolean
:group 'allout)
(make-variable-buffer-local 'outline-stylish-prefixes)
;;;_ = outline-numbered-bullet
(defvar outline-numbered-bullet "#"
(defcustom outline-numbered-bullet "#"
"*String designating bullet of topics that have auto-numbering; nil for none.
Topics having this bullet have automatic maintenance of a sibling
sequence-number tacked on, just after the bullet. Conventionally set
to \"#\", you can set it to a bullet of your choice. A nil value
disables numbering maintenance.")
disables numbering maintenance."
:type '(choice (const nil) string)
:group 'allout)
(make-variable-buffer-local 'outline-numbered-bullet)
;;;_ = outline-file-xref-bullet
(defvar outline-file-xref-bullet "@"
(defcustom outline-file-xref-bullet "@"
"*Bullet signifying file cross-references, for `outline-resolve-xref'.
Set this var to the bullet you want to use for file cross-references.
Set it to nil if you want to inhibit this capability.")
Set it to nil if you want to inhibit this capability."
:type '(choice (const nil) string)
:group 'allout)
;;;_ + LaTeX formatting
;;;_ - outline-number-pages
(defvar outline-number-pages nil
"*Non-nil turns on page numbering for LaTeX formatting of an outline.")
(defcustom outline-number-pages nil
"*Non-nil turns on page numbering for LaTeX formatting of an outline."
:type 'boolean
:group 'allout)
;;;_ - outline-label-style
(defvar outline-label-style "\\large\\bf"
"*Font and size of labels for LaTeX formatting of an outline.")
(defcustom outline-label-style "\\large\\bf"
"*Font and size of labels for LaTeX formatting of an outline."
:type 'string
:group 'allout)
;;;_ - outline-head-line-style
(defvar outline-head-line-style "\\large\\sl "
"*Font and size of entries for LaTeX formatting of an outline.")
(defcustom outline-head-line-style "\\large\\sl "
"*Font and size of entries for LaTeX formatting of an outline."
:type 'string
:group 'allout)
;;;_ - outline-body-line-style
(defvar outline-body-line-style " "
"*Font and size of entries for LaTeX formatting of an outline.")
(defcustom outline-body-line-style " "
"*Font and size of entries for LaTeX formatting of an outline."
:type 'string
:group 'allout)
;;;_ - outline-title-style
(defvar outline-title-style "\\Large\\bf"
"*Font and size of titles for LaTeX formatting of an outline.")
(defcustom outline-title-style "\\Large\\bf"
"*Font and size of titles for LaTeX formatting of an outline."
:type 'string
:group 'allout)
;;;_ - outline-title
(defvar outline-title '(or buffer-file-name (current-buffer-name))
(defcustom outline-title '(or buffer-file-name (current-buffer-name))
"*Expression to be evaluated to determine the title for LaTeX
formatted copy.")
formatted copy."
:type 'sexp
:group 'allout)
;;;_ - outline-line-skip
(defvar outline-line-skip ".05cm"
"*Space between lines for LaTeX formatting of an outline.")
(defcustom outline-line-skip ".05cm"
"*Space between lines for LaTeX formatting of an outline."
:type 'string
:group 'allout)
;;;_ - outline-indent
(defvar outline-indent ".3cm"
"*LaTeX formatted depth-indent spacing.")
(defcustom outline-indent ".3cm"
"*LaTeX formatted depth-indent spacing."
:type 'string
:group 'allout)
;;;_ + Miscellaneous customization
......@@ -361,29 +401,35 @@ will be used as is.")
("?c" outline-copy-exposed)))
;;;_ = outline-command-prefix
(defvar outline-command-prefix "\C-c"
"*Key sequence to be used as prefix for outline mode command key bindings.")
(defcustom outline-command-prefix "\C-c"
"*Key sequence to be used as prefix for outline mode command key bindings."
:type 'string
:group 'allout)
;;;_ = outline-enwrap-isearch-mode
(defvar outline-enwrap-isearch-mode t
(defcustom outline-enwrap-isearch-mode t
"*Set non-nil to enable automatic exposure of concealed isearch targets.
If non-nil, isearch will expose hidden text encountered in the course
of a search, and to reconceal it if the search is continued past it.")
of a search, and to reconceal it if the search is continued past it."
:type 'boolean
:group 'allout)
;;;_ = outline-use-hanging-indents
(defvar outline-use-hanging-indents t
(defcustom outline-use-hanging-indents t
"*If non-nil, topic body text auto-indent defaults to indent of the header.
Ie, it is indented to be just past the header prefix. This is
relevant mostly for use with indented-text-mode, or other situations
where auto-fill occurs.
\[This feature no longer depends in any way on the `filladapt.el'
lisp-archive package.\]")
lisp-archive package.\]"
:type 'boolean
:group 'allout)
(make-variable-buffer-local 'outline-use-hanging-indents)
;;;_ = outline-reindent-bodies
(defvar outline-reindent-bodies (if outline-use-hanging-indents
(defcustom outline-reindent-bodies (if outline-use-hanging-indents
'text)
"*Non-nil enables auto-adjust of topic body hanging indent with depth shifts.
......@@ -393,12 +439,14 @@ the header.
A value of `t' enables reindent in non-programming-code buffers, ie
those that do not have the variable `comment-start' set. A value of
`force' enables reindent whether or not `comment-start' is set.")
`force' enables reindent whether or not `comment-start' is set."
:type '(choice (const nil) (const t) (const text) (const force))
:group 'allout)
(make-variable-buffer-local 'outline-reindent-bodies)
;;;_ = outline-inhibit-protection
(defvar outline-inhibit-protection nil
(defcustom outline-inhibit-protection nil
"*Non-nil disables warnings and confirmation-checks for concealed-text edits.
Outline mode uses emacs change-triggered functions to detect unruly
......@@ -407,7 +455,9 @@ protection, potentially increasing text-entry responsiveness a bit.
This var takes effect at outline-mode activation, so you may have to
deactivate and then reactivate the mode if you want to toggle the
behavior.")
behavior."
:type 'boolean
:group 'allout)
;;;_* CODE - no user customizations below.
......
......@@ -33,10 +33,16 @@
(require 'timer)
(defvar battery-status-function
(defgroup battery nil
"Display battery status information."
:prefix "battery-"
:group 'hardware)
(defcustom battery-status-function
(cond ((and (eq system-type 'gnu/linux)
(file-readable-p "/proc/apm"))
'battery-linux-proc-apm))
'battery-linux-proc-apm))
"*Function for getting battery status information.
The function have to return an alist of conversion definitions.
Cons cells are of the form
......@@ -44,31 +50,39 @@ Cons cells are of the form
(CONVERSION . REPLACEMENT-TEXT)
CONVERSION is the character code of a \"conversion specification\"
introduced by a `%' character in a control string.")
introduced by a `%' character in a control string."
:type 'function
:group 'battery)
(defvar battery-echo-area-format
(defcustom battery-echo-area-format
(cond ((eq battery-status-function 'battery-linux-proc-apm)
"Power %L, battery %B (%p%% load, remaining time %t)"))
"*Control string formatting the string to display in the echo area.
Ordinary characters in the control string are printed as-is, while
conversion specifications introduced by a `%' character in the control
string are substituted as defined by the current value of the variable
`battery-status-function'.")
`battery-status-function'."
:type '(choice string (const nil))
:group 'battery)
(defvar battery-mode-line-string nil
"String to display in the mode line.")
(defvar battery-mode-line-format
(defcustom battery-mode-line-format
(cond ((eq battery-status-function 'battery-linux-proc-apm)
" [%b%p%%]"))
"*Control string formatting the string to display in the mode line.
Ordinary characters in the control string are printed as-is, while
conversion specifications introduced by a `%' character in the control
string are substituted as defined by the current value of the variable
`battery-status-function'.")
(defvar battery-update-interval 60
"*Seconds after which the battery status will be updated.")
`battery-status-function'."
:type '(choice string (const nil))
:group 'battery)
(defcustom battery-update-interval 60
"*Seconds after which the battery status will be updated."
:type 'integer
:group 'battery)
(defvar battery-update-timer nil
"Interval timer object.")
......
......@@ -31,6 +31,10 @@
;;; Code:
(defgroup chistory nil
"List command history."
:group 'keyboard)
;;;###autoload
(defun repeat-matching-complex-command (&optional pattern)
"Edit and re-evaluate complex command with name matching PATTERN.
......@@ -59,15 +63,17 @@ editing and the result is evaluated."
(setq command-history (cdr command-history)))
(edit-and-eval-command "Redo: " what))))
(defvar default-command-history-filter-garbage
(defcustom default-command-history-filter-garbage
'(command-history-mode
list-command-history
electric-command-history)
"*A list of symbols to be ignored by `default-command-history-filter'.
It that function is given a list whose car is an element of this list,
If that function is given a list whose car is an element of this list,
then it will return non-nil (indicating the list should be discarded from
the history).
Initially, all commands related to the command history are discarded.")
Initially, all commands related to the command history are discarded."
:type '(repeat symbol)
:group 'chistory)
(defvar list-command-history-filter 'default-command-history-filter
"Predicate to test which commands should be excluded from the history listing.
......@@ -83,8 +89,10 @@ from the command history."
(or (not (consp frob))
(memq (car frob) default-command-history-filter-garbage)))
(defvar list-command-history-max 32
"*If non-nil, maximum length of the listing produced by `list-command-history'.")
(defcustom list-command-history-max 32
"*If non-nil, maximum length of the listing produced by `list-command-history'."
:type '(choice integer (const nil))
:group 'chistory)
;;;###autoload
(defun list-command-history ()
......@@ -126,8 +134,10 @@ The buffer is left in Command History mode."
(setq major-mode (or majormode 'command-history-mode))
(setq mode-name (or modename "Command History")))
(defvar command-history-hook nil
"If non-nil, its value is called on entry to `command-history-mode'.")
(defcustom command-history-hook nil
"If non-nil, its value is called on entry to `command-history-mode'."
:type 'hook
:group 'chistory)
(defvar command-history-map nil)
(if command-history-map
......
......@@ -96,11 +96,19 @@
(require 'scheme)
(require 'comint)
(defgroup cmuscheme nil
"Run a scheme process in a buffer."
:group 'lisp)
;;; INFERIOR SCHEME MODE STUFF
;;;============================================================================
(defvar inferior-scheme-mode-hook nil
"*Hook for customising inferior-scheme mode.")
(defcustom inferior-scheme-mode-hook nil
"*Hook for customising inferior-scheme mode."
:type 'hook
:group 'cmuscheme)
(defvar inferior-scheme-mode-map nil)
(cond ((not inferior-scheme-mode-map)
......@@ -202,9 +210,11 @@ to continue it."
(setq comint-get-old-input (function scheme-get-old-input))
(run-hooks 'inferior-scheme-mode-hook))
(defvar inferior-scheme-filter-regexp "\\`\\s *\\S ?\\S ?\\s *\\'"
(defcustom inferior-scheme-filter-regexp "\\`\\s *\\S ?\\S ?\\s *\\'"
"*Input matching this regexp are not saved on the history list.
Defaults to a regexp ignoring all inputs of 0, 1, or 2 letters.")
Defaults to a regexp ignoring all inputs of 0, 1, or 2 letters."
:type 'regexp
:group 'cmuscheme)
(defun scheme-input-filter (str)
"Don't save anything matching inferior-scheme-filter-regexp"
......@@ -230,8 +240,10 @@ Defaults to a regexp ignoring all inputs of 0, 1, or 2 letters.")
(scheme-args-to-list (substring string pos
(length string)))))))))
(defvar scheme-program-name "scheme"
"*Program invoked by the run-scheme command")
(defcustom scheme-program-name "scheme"
"*Program invoked by the run-scheme command"
:type 'string
:group 'cmuscheme)
;;;###autoload
(defun run-scheme (cmd)
......@@ -275,8 +287,10 @@ of `scheme-program-name'). Runs the hooks `inferior-scheme-mode-hook'
(interactive)
(scheme-send-region (save-excursion (backward-sexp) (point)) (point)))
(defvar scheme-compile-exp-command "(compile '%s)"
"*Template for issuing commands to compile arbitrary Scheme expressions.")
(defcustom scheme-compile-exp-command "(compile '%s)"
"*Template for issuing commands to compile arbitrary Scheme expressions."
:type 'string
:group 'cmuscheme)
(defun scheme-compile-region (start end)
"Compile the current region in the inferior Scheme process.
......@@ -335,11 +349,13 @@ Then switch to the process buffer."
(scheme-compile-region start end)
(switch-to-scheme t))
(defvar scheme-source-modes '(scheme-mode)
(defcustom scheme-source-modes '(scheme-mode)
"*Used to determine if a buffer contains Scheme source code.
If it's loaded into a buffer that is in one of these major modes, it's
considered a scheme source file by scheme-load-file and scheme-compile-file.
Used by these commands to determine defaults.")
Used by these commands to determine defaults."
:type '(repeat function)
:group 'cmuscheme)
(defvar scheme-prev-l/c-dir/file nil
"Caches the last (directory . file) pair.
......@@ -425,9 +441,11 @@ for a minimal, simple implementation. Feel free to extend it.")
;;; Do the user's customisation...
(defvar cmuscheme-load-hook nil
(defcustom cmuscheme-load-hook nil
"This hook is run when cmuscheme is loaded in.
This is a good place to put keybindings.")
This is a good place to put keybindings."
:type 'hook
:group 'cmuscheme)
(run-hooks 'cmuscheme-load-hook)
......
......@@ -30,7 +30,12 @@
;;; Code:
(defvar compare-windows-whitespace "[ \t\n]+"
(defgroup compare-w nil
"Compare text between windows."
:prefix "compare-"
:group 'tools)
(defcustom compare-windows-whitespace "[ \t\n]+"
"*Regexp that defines whitespace sequences for \\[compare-windows].
Changes in whitespace are optionally ignored.
......@@ -42,10 +47,14 @@ point; it should also advance past any whitespace.
The function is passed one argument, the point where `compare-windows'
was originally called; it should not consider any text before that point.
If the function returns the same value for both buffers, then the
whitespace is considered to match, and is skipped.")
(defvar compare-ignore-case nil
"*Non-nil means \\[compare-windows] ignores case differences.")
whitespace is considered to match, and is skipped."
:type '(choice regexp function)
:group 'compare-w)
(defcustom compare-ignore-case nil
"*Non-nil means \\[compare-windows] ignores case differences."
:type 'boolean
:group 'compare-w)
;;;###autoload
(defun compare-windows (ignore-whitespace)
......
......@@ -60,17 +60,27 @@
;;; Code:
;; User customizable variables
(defvar docref-highlight-p t
(defgroup docref nil
"Simple cross references for Elisp documentation strings."
:prefix "docref-"
:group 'help
:group 'lisp
:group 'docs)
(defcustom docref-highlight-p t
"*If non-nil, \\(f@docref-subst) highlights cross-references.
Under window system it highlights them with face defined by
\\(v@docref-highlight-face), on character terminal highlighted references
look like cross-references in info mode.")
look like cross-references in info mode."
:type 'boolean
:group 'docref)
(defvar docref-highlight-face 'highlight
"*Face used to highlight cross-references (used by \\(f@docref-subst))")
(defcustom docref-highlight-face 'highlight
"*Face used to highlight cross-references (used by \\(f@docref-subst))"
:type 'face
:group 'docref)
(defvar docref-methods-alist
(defcustom docref-methods-alist
'(("f" . docref-describe-function) ; reference to a function documentation
("v" . docref-describe-variable) ; reference to a variable documentation
("F" . docref-read-file) ; reference to a file contents
......@@ -81,10 +91,14 @@ look like cross-references in info mode.")
The car of each element is a string that serves as `type' in cross-references.
\(See \\(f@docref-subst)). The cdr is a function of one argument,
to be called to find this reference.")
(defvar docref-back-label "\nback"
"Label to use by \\(f@docref-subst) for the go-back reference.")
to be called to find this reference."
:type '(repeat (cons string function))
:group 'docref)
(defcustom docref-back-label "\nback"
"Label to use by \\(f@docref-subst) for the go-back reference."
:type 'string
:group 'docref)
(defvar docref-back-reference nil
"If non-nil, this is a go-back reference to add to the current buffer.
......
......@@ -28,6 +28,10 @@
;;; Code:
(defgroup dos-fns nil
"MS-Dos specific functions."
:group 'environment)
;; This overrides a trivial definition in files.el.
(defun convert-standard-filename (filename)
"Convert a standard file's name to something suitable for the current OS.
......@@ -78,8 +82,10 @@ with a definition that really does change some file names."
(aset string (1- (length string)) lastchar))
(concat dir string))))
(defvar msdos-shells '("command.com" "4dos.com" "ndos.com")
"*List of shells that use `/c' instead of `-c' and a backslashed command.")
(defcustom msdos-shells '("command.com" "4dos.com" "ndos.com")
"*List of shells that use `/c' instead of `-c' and a backslashed command."
:type '(repeat string)
:group 'dos-fns)
(defvar register-name-alist
'((ax . 0) (bx . 1) (cx . 2) (dx . 3) (si . 4) (di . 5)
......@@ -121,7 +127,7 @@ with a definition that really does change some file names."
(int86 33 regs))
;; Support for printing under MS-DOS, see lpr.el and ps-print.el.
(defvar dos-printer "PRN"
(defcustom dos-printer "PRN"
"*The name of a local MS-DOS device to which data is sent for printing.
\(Note that PostScript files are sent to `dos-ps-printer', which see.\)
......@@ -129,7 +135,9 @@ Typical non-default settings would be \"LPT1\" to \"LPT3\" for
parallel printers, or \"COM1\" to \"COM4\" or \"AUX\" for serial
printers. You can also set it to a name of a file, in which
case the output gets appended to that file.
If you want to discard the printed output, set this to \"NUL\".")
If you want to discard the printed output, set this to \"NUL\"."
:type 'file ; could use string but then we lose completion for files.
:group 'dos-fns)
(defun dos-print-region-function (start end
&optional lpr-prog
......@@ -164,7 +172,7 @@ START and END."
;; the same output as `lpr-buffer' and `lpr-region', accordingly.
(setq lpr-headers-switches "(page headers are not supported)")
(defvar dos-ps-printer "PRN"
(defcustom dos-ps-printer "PRN"
"*Method for printing PostScript files under MS-DOS.
If the value is a string, then it is taken as the name of the
......@@ -180,7 +188,9 @@ you want to silently discard the printed output, set this to \"NUL\".
If the value is anything but a string, PostScript files will be
piped to the program given by `ps-lpr-command', with switches
given by `ps-lpr-switches', which see.")
given by `ps-lpr-switches', which see."
:type '(choice file (const :tag "Pipe to ps-lpr-command" pipe))
:group 'dos-fns)
(setq ps-lpr-command "gs")
......
......@@ -369,14 +369,23 @@
;;}}}
;;{{{ Variables