;; @@ Variable definitions:
;; ========================
+(defgroup advice nil
+ "An overloading mechanism for Emacs Lisp functions."
+ :prefix "ad-"
+ :group 'lisp)
+
(defconst ad-version "2.14")
;;;###autoload
-(defvar ad-redefinition-action 'warn
+(defcustom ad-redefinition-action 'warn
"*Defines what to do with redefinitions during Advice de/activation.
Redefinition occurs if a previously activated function that already has an
original definition associated with it gets redefined and then de/activated.
old original, or keep it and raise an error. The values `accept', `discard',
`error' or `warn' govern what will be done. `warn' is just like `accept' but
it additionally prints a warning message. All other values will be
-interpreted as `error'.")
+interpreted as `error'."
+ :type '(choice (const accept) (const discard) (const error) (const warn))
+ :group 'advice)
;;;###autoload
-(defvar ad-default-compilation-action 'maybe
+(defcustom ad-default-compilation-action 'maybe
"*Defines whether to compile advised definitions during activation.
A value of `always' will result in unconditional compilation, `never' will
always avoid compilation, `maybe' will compile if the byte-compiler is already
loaded, and `like-original' will compile if the original definition of the
advised function is compiled or a built-in function. Every other value will
be interpreted as `maybe'. This variable will only be considered if the
-COMPILE argument of `ad-activate' was supplied as nil.")
+COMPILE argument of `ad-activate' was supplied as nil."
+ :type '(choice (const always) (const never) (const maybe)
+ (const like-original))
+ :group 'advice)
+
;; @@ Some utilities:
(defalias 'backquote-list* (symbol-function 'backquote-list*-macro))
+(defgroup backquote nil
+ "Implement the ` Lisp construct."
+ :prefix "backquote-"
+ :group 'lisp)
+
;; A few advertised variables that control which symbols are used
;; to represent the backquote, unquote, and splice operations.
-
-(defvar backquote-backquote-symbol '\`
- "*Symbol used to represent a backquote or nested backquote (e.g. `).")
-
-(defvar backquote-unquote-symbol ',
- "*Symbol used to represent an unquote (e.g. `,') inside a backquote.")
-
-(defvar backquote-splice-symbol ',@
- "*Symbol used to represent a splice (e.g. `,@') inside a backquote.")
+(defcustom backquote-backquote-symbol '\`
+ "*Symbol used to represent a backquote or nested backquote (e.g. `)."
+ :type 'symbol
+ :group 'backquote)
+
+(defcustom backquote-unquote-symbol ',
+ "*Symbol used to represent an unquote (e.g. `,') inside a backquote."
+ :type 'symbol
+ :group 'backquote)
+
+(defcustom backquote-splice-symbol ',@
+ "*Symbol used to represent a splice (e.g. `,@') inside a backquote."
+ :type 'symbol
+ :group 'backquote)
;;;###autoload
(defmacro backquote (arg)
;;; Code:
-(defvar debugger-mode-hook nil
- "*Hooks run when `debugger-mode' is turned on.")
+(defgroup debugger nil
+ "Debuggers and related commands for Emacs."
+ :prefix "debugger-"
+ :group 'debug)
+(defcustom debugger-mode-hook nil
+ "*Hooks run when `debugger-mode' is turned on."
+ :type 'hook
+ :group 'debugger)
-(defvar debug-function-list nil
- "List of functions currently set for debug on entry.")
-(defvar debugger-step-after-exit nil
- "Non-nil means \"single-step\" after the debugger exits.")
+(defcustom debug-function-list nil
+ "List of functions currently set for debug on entry."
+ :type '(repeat function)
+ :group 'debugger)
+
+(defcustom debugger-step-after-exit nil
+ "Non-nil means \"single-step\" after the debugger exits."
+ :type 'boolean
+ :group 'debugger)
(defvar debugger-value nil
"This is the value for the debugger to return, when it returns.")
))
-(defvar debugger-record-buffer "*Debugger-record*"
- "*Buffer name for expression values, for \\[debugger-record-expression].")
+(defcustom debugger-record-buffer "*Debugger-record*"
+ "*Buffer name for expression values, for \\[debugger-record-expression]."
+ :type 'string
+ :group 'debugger)
(defun debugger-record-expression (exp)
"Display a variable's value and record it in `*Backtrace-record*' buffer."
;; update.
;;; Code:
-
-(defvar gulp-discard "^;+ *Maintainer: *FSF *$"
- "*The regexp matching the packages not requiring the request for updates.")
-
-(defvar gulp-tmp-buffer "*gulp*" "The name of the temporary buffer.")
-
-(defvar gulp-max-len 2000
- "*Distance into a Lisp source file to scan for keywords.")
-
-(defvar gulp-request-header
+(defgroup gulp nil
+ "Ask for updates for Lisp packages."
+ :prefix "-"
+ :group 'maint)
+
+(defcustom gulp-discard "^;+ *Maintainer: *FSF *$"
+ "*The regexp matching the packages not requiring the request for updates."
+ :type 'regexp
+ :group 'gulp)
+
+(defcustom gulp-tmp-buffer "*gulp*" "The name of the temporary buffer."
+ :type 'string
+ :group 'gulp)
+
+(defcustom gulp-max-len 2000
+ "*Distance into a Lisp source file to scan for keywords."
+ :type 'integer
+ :group 'gulp)
+
+(defcustom gulp-request-header
(concat
"This message was created automatically.
I'm going to start pretesting a new version of GNU Emacs soon, so I'd
like to ask if you have any updates for the Emacs packages you work on.
You're listed as the maintainer of the following package(s):\n\n")
- "*The starting text of a gulp message.")
+ "*The starting text of a gulp message."
+ :type 'string
+ :group 'gulp)
-(defvar gulp-request-end
+(defcustom gulp-request-end
(concat
"\nIf you have any changes since the version in the previous release ("
(format "%d.%d" emacs-major-version emacs-minor-version)
of information to include.
Thanks.")
- "*The closing text in a gulp message.")
+ "*The closing text in a gulp message."
+ :type 'string
+ :group 'gulp)
(defun gulp-send-requests (dir &optional time)
"Send requests for updates to the authors of Lisp packages in directory DIR.
;;; Variables:
-(defvar lm-header-prefix "^;;*[ \t]+\\(@\(#\)\\)?[ \t]*\\([\$]\\)?"
+(defgroup lisp-mnt nil
+ "Minor mode for Emacs Lisp maintainers."
+ :prefix "lm-"
+ :group 'maint)
+
+(defcustom lm-header-prefix "^;;*[ \t]+\\(@\(#\)\\)?[ \t]*\\([\$]\\)?"
"Prefix that is ignored before the tag.
For example, you can write the 1st line synopsis string and headers like this
in your Lisp package:
;; @(#) $Maintainer: Person Foo Bar $
The @(#) construct is used by unix what(1) and
-then $identifier: doc string $ is used by GNU ident(1)")
-
-(defvar lm-comment-column 16
- "Column used for placing formatted output.")
-
-(defvar lm-commentary-header "Commentary\\|Documentation"
- "Regexp which matches start of documentation section.")
-
-(defvar lm-history-header "Change Log\\|History"
- "Regexp which matches the start of code log section.")
+then $identifier: doc string $ is used by GNU ident(1)"
+ :type 'regexp
+ :group 'lisp-mnt)
+
+(defcustom lm-comment-column 16
+ "Column used for placing formatted output."
+ :type 'integer
+ :group 'lisp-mnt)
+
+(defcustom lm-commentary-header "Commentary\\|Documentation"
+ "Regexp which matches start of documentation section."
+ :type 'regexp
+ :group 'lisp-mnt)
+
+(defcustom lm-history-header "Change Log\\|History"
+ "Regexp which matches the start of code log section."
+ :type 'regexp
+ :group 'lisp-mnt)
;;; Functions:
;; Boston, MA 02111-1307, USA.
;;; Code:
+(defgroup pp nil
+ "Pretty printer for Emacs Lisp."
+ :prefix "pp-"
+ :group 'lisp)
-(defvar pp-escape-newlines t
- "*Value of print-escape-newlines used by pp-* functions.")
+(defcustom pp-escape-newlines t
+ "*Value of `print-escape-newlines' used by pp-* functions."
+ :type 'boolean
+ :group 'pp)
(defun pp-to-string (object)
"Return a string containing the pretty-printed representation of OBJECT,
;;; Code:
+(defgroup profile nil
+ "Generate run time measurements of Emacs Lisp functions."
+ :prefix "profile-"
+ :group 'lisp)
+
;;;
;;; User modifiable VARIABLES
;;;
-(defvar profile-functions-list nil "*List of functions to profile.")
-(defvar profile-timer-program
+(defcustom profile-functions-list nil
+ "*List of functions to profile."
+ :type '(repeat function)
+ :group 'profile)
+
+(defcustom profile-timer-program
(concat exec-directory "profile")
- "*Name of the profile timer program.")
+ "*Name of the profile timer program."
+ :type 'file
+ :group 'profile)
;;;
;;; V A R I A B L E S
(defvar profile-max-fun-name 0 "Max length of name of any function profiled.")
(defvar profile-temp-result- nil "Should NOT be used anywhere else.")
(defvar profile-time (cons 0 0) "Used to return result from a filter.")
-(defvar profile-buffer "*profile*" "Name of profile buffer.")
+(defcustom profile-buffer "*profile*"
+ "Name of profile buffer."
+ :type 'string
+ :group 'profile)
(defconst profile-million 1000000)
;;; Code:
\f
-(defvar shadows-compare-text-p nil
+(defgroup shadow nil
+ "Locate Emacs Lisp file shadowings."
+ :prefix "shadows-"
+ :group 'lisp)
+
+(defcustom shadows-compare-text-p nil
"*If non-nil, then shadowing files are reported only if their text differs.
-This is slower, but filters out some innocuous shadowing.")
+This is slower, but filters out some innocuous shadowing."
+ :type 'boolean
+ :group 'shadow)
(defun find-emacs-lisp-shadows (&optional path)
"Return a list of Emacs Lisp files that create shadows.
(require 'advice)
+(defgroup trace nil
+ "Tracing facility for Emacs Lisp functions"
+ :prefix "trace-"
+ :group 'lisp)
+
;;;###autoload
-(defvar trace-buffer "*trace-output*"
- "*Trace output will by default go to that buffer.")
+(defcustom trace-buffer "*trace-output*"
+ "*Trace output will by default go to that buffer."
+ :type 'string
+ :group 'trace)
;; Current level of traced function invocation:
(defvar trace-level 0)