]> code.delx.au - gnu-emacs/commitdiff
Customized.
authorStephen Eglen <stephen@gnu.org>
Sun, 5 Apr 1998 18:26:32 +0000 (18:26 +0000)
committerStephen Eglen <stephen@gnu.org>
Sun, 5 Apr 1998 18:26:32 +0000 (18:26 +0000)
lisp/emacs-lisp/advice.el
lisp/emacs-lisp/backquote.el
lisp/emacs-lisp/debug.el
lisp/emacs-lisp/gulp.el
lisp/emacs-lisp/lisp-mnt.el
lisp/emacs-lisp/pp.el
lisp/emacs-lisp/profile.el
lisp/emacs-lisp/shadow.el
lisp/emacs-lisp/trace.el

index dabff28ae3a3b78dd5daedaaf7e26e35e9fe49ee..33e2ab6b4fc69d712eec73a73ad48f0702451d34 100644 (file)
 ;; @@ 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.
@@ -1843,17 +1848,23 @@ original definition, discard the current definition and replace it with the
 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:
index 807b4bd1c509f067e453237d6215f7d8369e6e95..9a0f5a0cd1ed59ea3e2cefc9d74b3c941df3da96 100644 (file)
@@ -69,17 +69,27 @@ For example (backquote-list* 'a 'b 'c) => (a b . c)"
 
 (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)
index ca23b3adc4046535b4914210f502b5f0ffd2b7f7..33ea729ccc2e8da30ca7df929df84dc56d93cdba 100644 (file)
 
 ;;; 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.")
@@ -398,8 +409,10 @@ Applies to the frame whose line point is on in the backtrace."
     ))
 
 
-(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."
index e84c1056296080eb5ac60bd15c06dcd14d375fc8..9a41864d437d4c470c8108bba8c174124079b355 100644 (file)
 ;; 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)
@@ -61,7 +73,9 @@ please use lisp/ChangeLog as a guide for the style and for what kinds
 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.
index 4e7fae47125389cc8a8eba1a9cde6ea2b27d172f..9aebbf8d02d869bae73ced1a695209d1543bae0a 100644 (file)
 
 ;;; 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:
@@ -127,16 +132,24 @@ 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:
 
index bdc884ab50b85ed44ef711c35ca4b6d2ce95fc7c..beb79c745adea218030dcaa956784f3c62dbbbab 100644 (file)
 ;; 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,
index 1f17a66310c53d35417de85ce7dc4091d7c96ed8..6a8b00632011fb8c3735ba7aad408f0291448f5b 100644 (file)
 
 ;;; 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
@@ -90,7 +101,10 @@ Both how many times invoked and real time of start.")
 (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)
 
index 1e5ef45e7f49058df5000c5213a4f664006e1f7e..edaa74e6a3e6abd74993ffdd4da09f7499550c63 100644 (file)
 
 ;;; 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.
index 40008e29a19962b2b4e975e8cfaaed1e102bc30e..d066f7d82f37b3ac48fa94d2909a8f8f292b37ba 100644 (file)
 
 (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)