summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>1998-01-07 10:31:09 +0000
committerAndreas Schwab <schwab@suse.de>1998-01-07 10:31:09 +0000
commit33933d45beb4ab3b66b421a970fc9d3ab18e9acc (patch)
tree2794bb910287b8a044651317863a89538d2251a3
parent92631216919566dd1bfc6a880fc35c2ef0611457 (diff)
downloademacs-33933d45beb4ab3b66b421a970fc9d3ab18e9acc.tar.gz
Customized.
-rw-r--r--lisp/emerge.el149
-rw-r--r--lisp/expand.el26
-rw-r--r--lisp/filecache.el68
-rw-r--r--lisp/find-dired.el21
4 files changed, 180 insertions, 84 deletions
diff --git a/lisp/emerge.el b/lisp/emerge.el
index b8b085f64e5..8794ab45e55 100644
--- a/lisp/emerge.el
+++ b/lisp/emerge.el
@@ -113,6 +113,10 @@ When called interactively, displays the version."
;;; Emerge configuration variables
+(defgroup emerge nil
+ "Merge diffs under Emacs control."
+ :group 'tools)
+
;; Commands that produce difference files
;; All that can be configured is the name of the programs to execute
;; (emerge-diff-program and emerge-diff3-program) and the options
@@ -124,69 +128,102 @@ When called interactively, displays the version."
;; The code which processes the diff/diff3 output depends on all the
;; finicky details of their output, including the somewhat strange
;; way they number lines of a file.
-(defvar emerge-diff-program "diff"
- "*Name of the program which compares two files.")
-(defvar emerge-diff3-program "diff3"
+(defcustom emerge-diff-program "diff"
+ "*Name of the program which compares two files."
+ :type 'string
+ :group 'emerge)
+(defcustom emerge-diff3-program "diff3"
"*Name of the program which compares three files.
-Its arguments are the ancestor file and the two variant files.")
-(defvar emerge-diff-options ""
- "*Options to pass to `emerge-diff-program' and `emerge-diff3-program'.")
-(defvar emerge-match-diff-line (let ((x "\\([0-9]+\\)\\(\\|,\\([0-9]+\\)\\)"))
- (concat "^" x "\\([acd]\\)" x "$"))
+Its arguments are the ancestor file and the two variant files."
+ :type 'string
+ :group 'emerge)
+(defcustom emerge-diff-options ""
+ "*Options to pass to `emerge-diff-program' and `emerge-diff3-program'."
+ :type 'string
+ :group 'emerge)
+(defcustom emerge-match-diff-line
+ (let ((x "\\([0-9]+\\)\\(\\|,\\([0-9]+\\)\\)"))
+ (concat "^" x "\\([acd]\\)" x "$"))
"*Pattern to match lines produced by diff that describe differences.
-This is as opposed to lines from the source files.")
-(defvar emerge-diff-ok-lines-regexp
+This is as opposed to lines from the source files."
+ :type 'regexp
+ :group 'emerge)
+(defcustom emerge-diff-ok-lines-regexp
"^\\([0-9,]+[acd][0-9,]+$\\|[<>] \\|---\\)"
"*Regexp that matches normal output lines from `emerge-diff-program'.
-Lines that do not match are assumed to be error messages.")
-(defvar emerge-diff3-ok-lines-regexp
+Lines that do not match are assumed to be error messages."
+ :type 'regexp
+ :group 'emerge)
+(defcustom emerge-diff3-ok-lines-regexp
"^\\([1-3]:\\|====\\| \\)"
"*Regexp that matches normal output lines from `emerge-diff3-program'.
-Lines that do not match are assumed to be error messages.")
-
-(defvar emerge-rcs-ci-program "ci"
- "*Name of the program that checks in RCS revisions.")
-(defvar emerge-rcs-co-program "co"
- "*Name of the program that checks out RCS revisions.")
-
-(defvar emerge-process-local-variables nil
+Lines that do not match are assumed to be error messages."
+ :type 'regexp
+ :group 'emerge)
+
+(defcustom emerge-rcs-ci-program "ci"
+ "*Name of the program that checks in RCS revisions."
+ :type 'string
+ :group 'emerge)
+(defcustom emerge-rcs-co-program "co"
+ "*Name of the program that checks out RCS revisions."
+ :type 'string
+ :group 'emerge)
+
+(defcustom emerge-process-local-variables nil
"*Non-nil if Emerge should process local-variables lists in merge buffers.
\(You can explicitly request processing the local-variables
-by executing `(hack-local-variables)'.)")
-(defvar emerge-execute-line-deletions nil
+by executing `(hack-local-variables)'.)"
+ :type 'boolean
+ :group 'emerge)
+(defcustom emerge-execute-line-deletions nil
"*If non-nil: `emerge-execute-line' makes no output if an input was deleted.
It concludes that an input version has been deleted when an ancestor entry
is present, only one A or B entry is present, and an output entry is present.
If nil: In such circumstances, the A or B file that is present will be
-copied to the designated output file.")
+copied to the designated output file."
+ :type 'boolean
+ :group 'emerge)
-(defvar emerge-before-flag "vvvvvvvvvvvvvvvvvvvv\n"
+(defcustom emerge-before-flag "vvvvvvvvvvvvvvvvvvvv\n"
"*Flag placed above the highlighted block of code. Must end with newline.
Must be set before Emerge is loaded, or emerge-new-flags must be run
-after setting.")
-(defvar emerge-after-flag "^^^^^^^^^^^^^^^^^^^^\n"
+after setting."
+ :type 'string
+ :group 'emerge)
+(defcustom emerge-after-flag "^^^^^^^^^^^^^^^^^^^^\n"
"*Flag placed below the highlighted block of code. Must end with newline.
Must be set before Emerge is loaded, or emerge-new-flags must be run
-after setting.")
+after setting."
+ :type 'string
+ :group 'emerge)
;; Hook variables
-(defvar emerge-startup-hook nil
- "*Hook to run in the merge buffer after the merge has been set up.")
-(defvar emerge-select-hook nil
+(defcustom emerge-startup-hook nil
+ "*Hook to run in the merge buffer after the merge has been set up."
+ :type 'hook
+ :group 'emerge)
+(defcustom emerge-select-hook nil
"*Hook to run after a difference has been selected.
-The variable `n' holds the (internal) number of the difference.")
-(defvar emerge-unselect-hook nil
+The variable `n' holds the (internal) number of the difference."
+ :type 'hook
+ :group 'emerge)
+(defcustom emerge-unselect-hook nil
"*Hook to run after a difference has been unselected.
-The variable `n' holds the (internal) number of the difference.")
+The variable `n' holds the (internal) number of the difference."
+ :type 'hook
+ :group 'emerge)
;; Variables to control the default directories of the arguments to
;; Emerge commands.
-(defvar emerge-default-last-directories nil
+(defcustom emerge-default-last-directories nil
"*If nil, default dir for filenames in emerge is `default-directory'.
If non-nil, filenames complete in the directory of the last argument of the
-same type to an `emerge-files...' command.")
+same type to an `emerge-files...' command."
+ :type 'boolean
+ :group 'emerge)
(defvar emerge-last-dir-A nil
"Last directory for the first file of an `emerge-files...' command.")
@@ -246,11 +283,13 @@ depend on the flags."
;; Calculate dependent variables
(emerge-new-flags)
-(defvar emerge-min-visible-lines 3
+(defcustom emerge-min-visible-lines 3
"*Number of lines that we want to show above and below the flags when we are
-displaying a difference.")
+displaying a difference."
+ :type 'integer
+ :group 'emerge)
-(defvar emerge-temp-file-prefix
+(defcustom emerge-temp-file-prefix
(let ((env (or (getenv "TMPDIR")
(getenv "TMP")
(getenv "TEMP")))
@@ -262,12 +301,16 @@ displaying a difference.")
(setq d (substring d 0 -1)))
(concat d "/emerge"))
"*Prefix to put on Emerge temporary file names.
-Do not start with `~/' or `~user-name/'.")
+Do not start with `~/' or `~user-name/'."
+ :type 'string
+ :group 'emerge)
-(defvar emerge-temp-file-mode 384 ; u=rw only
- "*Mode for Emerge temporary files.")
+(defcustom emerge-temp-file-mode 384 ; u=rw only
+ "*Mode for Emerge temporary files."
+ :type 'integer
+ :group 'emerge)
-(defvar emerge-combine-versions-template
+(defcustom emerge-combine-versions-template
"#ifdef NEW\n%b#else /* not NEW */\n%a#endif /* not NEW */\n"
"*Template for `emerge-combine-versions' to combine the two versions.
The template is inserted as a string, with the following interpolations:
@@ -276,7 +319,9 @@ The template is inserted as a string, with the following interpolations:
%% the character `%'
Don't forget to end the template with a newline.
Note that this variable can be made local to a particular merge buffer by
-giving a prefix argument to `emerge-set-combine-versions-template'.")
+giving a prefix argument to `emerge-set-combine-versions-template'."
+ :type 'string
+ :group 'emerge)
;; Build keymaps
@@ -298,9 +343,11 @@ Makes Emerge commands directly available.")
(defvar emerge-move-menu
(make-sparse-keymap "Move"))
-(defvar emerge-command-prefix "\C-c\C-c"
+(defcustom emerge-command-prefix "\C-c\C-c"
"*Command prefix for Emerge commands in `edit' mode.
-Must be set before Emerge is loaded.")
+Must be set before Emerge is loaded."
+ :type 'string
+ :group 'emerge)
;; This function sets up the fixed keymaps. It is executed when the first
;; Emerge is done to allow the user maximum time to set up the global keymap.
@@ -1247,8 +1294,10 @@ Otherwise, the A or B file present is copied to the output file."
;;; Sample function for creating information for emerge-execute-line
-(defvar emerge-merge-directories-filename-regexp "[^.]"
- "Regexp describing files to be processed by `emerge-merge-directories'.")
+(defcustom emerge-merge-directories-filename-regexp "[^.]"
+ "Regexp describing files to be processed by `emerge-merge-directories'."
+ :type 'regexp
+ :group 'emerge)
;;;###autoload
(defun emerge-merge-directories (a-dir b-dir ancestor-dir output-dir)
@@ -3154,9 +3203,11 @@ See also `auto-save-file-name-p'."
;; Metacharacters that have to be protected from the shell when executing
;; a diff/diff3 command.
-(defvar emerge-metachars "[ \t\n!\"#$&'()*;<=>?[\\^`{|~]"
+(defcustom emerge-metachars "[ \t\n!\"#$&'()*;<=>?[\\^`{|~]"
"Characters that must be quoted with \\ when used in a shell command line.
-More precisely, a [...] regexp to match any one such character.")
+More precisely, a [...] regexp to match any one such character."
+ :type 'regexp
+ :group 'emerge)
;; Quote metacharacters (using \) when executing a diff/diff3 command.
(defun emerge-protect-metachars (s)
diff --git a/lisp/expand.el b/lisp/expand.el
index 51a12139897..3741a1496e4 100644
--- a/lisp/expand.el
+++ b/lisp/expand.el
@@ -74,14 +74,24 @@
;;; Constants:
-(defvar expand-load-hook nil
- "Hooks run when `expand.el' is loaded.")
-
-(defvar expand-expand-hook nil
- "Hooks run when an abbrev made by `expand-add-abbrevs' is expanded.")
-
-(defvar expand-jump-hook nil
- "Hooks run by `expand-jump-to-previous-slot' and `expand-jump-to-next-slot'.")
+(defgroup expand nil
+ "Make abbreviations more usable."
+ :group 'abbrev)
+
+(defcustom expand-load-hook nil
+ "Hooks run when `expand.el' is loaded."
+ :type 'hook
+ :group 'expand)
+
+(defcustom expand-expand-hook nil
+ "Hooks run when an abbrev made by `expand-add-abbrevs' is expanded."
+ :type 'hook
+ :group 'expand)
+
+(defcustom expand-jump-hook nil
+ "Hooks run by `expand-jump-to-previous-slot' and `expand-jump-to-next-slot'."
+ :type 'hook
+ :group 'expand)
;;; Samples:
diff --git a/lisp/filecache.el b/lisp/filecache.el
index 08ae14c7395..7c8fe96b946 100644
--- a/lisp/filecache.el
+++ b/lisp/filecache.el
@@ -142,48 +142,72 @@
;;; Code:
+(defgroup file-cache nil
+ "Find files using a pre-loaded cache."
+ :group 'files
+ :prefix "file-cache-")
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; User-modifiable variables
-(defvar file-cache-filter-regexps
+(defcustom file-cache-filter-regexps
(list "~$" "\\.o$" "\\.exe$" "\\.a$" "\\.elc$" ",v$" "\\.output$"
"\\.$" "#$")
"*List of regular expressions used as filters by the file cache.
File names which match these expressions will not be added to the cache.
Note that the functions `file-cache-add-file' and `file-cache-add-file-list'
-do not use this variable.")
+do not use this variable."
+ :type '(repeat regexp)
+ :group 'file-cache)
-(defvar file-cache-find-command "find"
- "*External program used by `file-cache-add-directory-using-find'.")
+(defcustom file-cache-find-command "find"
+ "*External program used by `file-cache-add-directory-using-find'."
+ :type 'string
+ :group 'file-cache)
-(defvar file-cache-locate-command "locate"
- "*External program used by `file-cache-add-directory-using-locate'.")
+(defcustom file-cache-locate-command "locate"
+ "*External program used by `file-cache-add-directory-using-locate'."
+ :type 'string
+ :group 'file-cache)
;; Minibuffer messages
-(defvar file-cache-no-match-message " [File Cache: No match]"
- "Message to display when there is no completion.")
-
-(defvar file-cache-sole-match-message " [File Cache: sole completion]"
- "Message to display when there is only one completion.")
-
-(defvar file-cache-non-unique-message " [File Cache: complete but not unique]"
- "Message to display when there is a non-unique completion.")
+(defcustom file-cache-no-match-message " [File Cache: No match]"
+ "Message to display when there is no completion."
+ :type 'string
+ :group 'file-cache)
+
+(defcustom file-cache-sole-match-message " [File Cache: sole completion]"
+ "Message to display when there is only one completion."
+ :type 'string
+ :group 'file-cache)
+
+(defcustom file-cache-non-unique-message
+ " [File Cache: complete but not unique]"
+ "Message to display when there is a non-unique completion."
+ :type 'string
+ :group 'file-cache)
(defvar file-cache-multiple-directory-message nil)
;; Internal variables
;; This should be named *Completions* because that's what the function
;; switch-to-completions in simple.el expects
-(defvar file-cache-completions-buffer "*Completions*"
- "Buffer to display completions when using the file cache.")
-
-(defvar file-cache-buffer "*File Cache*"
- "Buffer to hold the cache of file names.")
-
-(defvar file-cache-buffer-default-regexp "^.+$"
- "Regexp to match files in `file-cache-buffer'.")
+(defcustom file-cache-completions-buffer "*Completions*"
+ "Buffer to display completions when using the file cache."
+ :type 'string
+ :group 'file-cache)
+
+(defcustom file-cache-buffer "*File Cache*"
+ "Buffer to hold the cache of file names."
+ :type 'string
+ :group 'file-cache)
+
+(defcustom file-cache-buffer-default-regexp "^.+$"
+ "Regexp to match files in `file-cache-buffer'."
+ :type 'regexp
+ :group 'file-cache)
(defvar file-cache-last-completion nil)
diff --git a/lisp/find-dired.el b/lisp/find-dired.el
index daa610af18a..502a93c1c74 100644
--- a/lisp/find-dired.el
+++ b/lisp/find-dired.el
@@ -27,25 +27,36 @@
(require 'dired)
+(defgroup find-dired nil
+ "Run a `find' command and dired the output."
+ :group 'dired
+ :prefix "find-")
+
;; find's -ls corresponds to these switches.
;; Note -b, at least GNU find quotes spaces etc. in filenames
;;;###autoload
-(defvar find-ls-option (if (eq system-type 'berkeley-unix) '("-ls" . "-gilsb")
- '("-exec ls -ld {} \\;" . "-ld"))
+(defcustom find-ls-option
+ (if (eq system-type 'berkeley-unix) '("-ls" . "-gilsb")
+ '("-exec ls -ld {} \\;" . "-ld"))
"*Description of the option to `find' to produce an `ls -l'-type listing.
This is a cons of two strings (FIND-OPTION . LS-SWITCHES). FIND-OPTION
gives the option (or options) to `find' that produce the desired output.
-LS-SWITCHES is a list of `ls' switches to tell dired how to parse the output.")
+LS-SWITCHES is a list of `ls' switches to tell dired how to parse the output."
+ :type '(cons (string :tag "Find Option")
+ (string :tag "Ls Switches"))
+ :group 'find-dired)
;;;###autoload
-(defvar find-grep-options
+(defcustom find-grep-options
(if (or (eq system-type 'berkeley-unix)
(string-match "solaris2" system-configuration)
(string-match "irix" system-configuration))
"-s" "-q")
"*Option to grep to be as silent as possible.
On Berkeley systems, this is `-s'; on Posix, and with GNU grep, `-q' does it.
-On other systems, the closest you can come is to use `-l'.")
+On other systems, the closest you can come is to use `-l'."
+ :type 'string
+ :group 'find-dired)
(defvar find-args nil
"Last arguments given to `find' by \\[find-dired].")