From xemacs-m  Thu Apr 10 16:29:14 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id QAA28988
	for <xemacs-beta@xemacs.org>; Thu, 10 Apr 1997 16:29:12 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id XAA18424; Thu, 10 Apr 1997 23:29:10 +0200 (MET DST)
Sender: hniksic@public.srce.hr
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Ediff is customized
X-URL: ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/
X-Attribution: Hrv
X-Face: &}4JQk=L;e.~x+|eo]#DGk@x3~ed!.~lZ}YQcYb7f[WL9L'Z*+OyA\nA
        EL1M(".[qvI#a2E6WYI5>>e7'@_)3Ol9p|Nn2wNa/;~06jL*B%tTcn/X
        vhAu7qeES0\|MF%$;sI#yn1+y"
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 10 Apr 1997 23:29:09 +0200
Message-ID: <kig3esypnx6.fsf@jagor.srce.hr>
Lines: 433
X-Mailer: Gnus v5.4.42/XEmacs 19.15

--- lisp/ediff/ediff-diff.el.orig	Thu Apr 10 23:03:53 1997
+++ lisp/ediff/ediff-diff.el	Thu Apr 10 23:05:23 1997
@@ -39,8 +39,13 @@
 
 (require 'ediff-init)
 
+(defgroup ediff-diff nil
+  "Diff related utilities"
+  :prefix "ediff-"
+  :group 'ediff)
 
-(defvar ediff-shell
+
+(defcustom ediff-shell
   (cond ((eq system-type 'emx) "cmd") ; OS/2
 	((memq system-type '(ms-dos windows-nt windows-95))
 	 shell-file-name) ; no standard name on MS-DOS
@@ -50,37 +55,53 @@
 .cshrc files are set up correctly, any shell will do.  However, some people
 set $prompt or other things incorrectly, which leads to undesirable output
 messages.  These may cause Ediff to fail.  In such a case, set ediff-shell
-to a shell that you are not using or, better, fix your shell's startup file.")
+to a shell that you are not using or, better, fix your shell's startup file."
+  :type 'string
+  :group 'ediff-diff)
 
 
-(defvar ediff-diff-program "diff"
-  "*Program to use for generating the differential of the two files.")
-(defvar ediff-diff-options ""  
+(defcustom ediff-diff-program "diff"
+  "*Program to use for generating the differential of the two files."
+  :type 'string
+  :group 'ediff-diff)
+(defcustom ediff-diff-options ""  
   "*Options to pass to `ediff-diff-program'. 
 If diff\(1\) is used as `ediff-diff-program', then the most useful options are
 `-w', to ignore space, and `-i', to ignore case of letters.
 At present, the option `-c' is ignored, since Ediff doesn't understand this
-type of output.")
+type of output."
+  :type 'string
+  :group 'ediff-diff)
 
-(defvar ediff-custom-diff-program ediff-diff-program
+(defcustom ediff-custom-diff-program ediff-diff-program
   "*Program to use for generating custom diff output for saving it in a file.
-This output is not used by Ediff internally.")
-(defvar ediff-custom-diff-options "-c"
-  "*Options to pass to `ediff-custom-diff-program'.")
+This output is not used by Ediff internally."
+  :type 'string
+  :group 'ediff-diff)
+(defcustom ediff-custom-diff-options "-c"
+  "*Options to pass to `ediff-custom-diff-program'."
+  :type 'string
+  :group 'ediff-diff)
 
 ;;; Support for diff3
 
 (defvar ediff-match-diff3-line "^====\\(.?\\)$"
   "Pattern to match lines produced by diff3 that describe differences.")
-(defvar ediff-diff3-program "diff3"
+(defcustom ediff-diff3-program "diff3"
   "*Program to be used for three-way comparison.
-Must produce output compatible with Unix's diff3 program.")
-(defvar ediff-diff3-options ""  
-  "*Options to pass to `ediff-diff3-program'.")
-(defvar ediff-diff3-ok-lines-regexp
+Must produce output compatible with Unix's diff3 program."
+  :type 'string
+  :group 'ediff-diff)
+(defcustom ediff-diff3-options ""  
+  "*Options to pass to `ediff-diff3-program'."
+  :type 'string
+  :group 'ediff-diff)
+(defcustom ediff-diff3-ok-lines-regexp
   "^\\([1-3]:\\|====\\|  \\|.*Warning *:\\|.*No newline\\|.*missing newline\\|^\C-m$\\)"
   "*Regexp that matches normal output lines from `ediff-diff3-program'.
-Lines that do not match are assumed to be error messages.")
+Lines that do not match are assumed to be error messages."
+  :type 'regexp
+  :group 'ediff-diff)
 
 ;; keeps the status of the current diff in 3-way jobs.
 ;; the status can be =diff(A), =diff(B), or =diff(A+B)
--- lisp/ediff/ediff-merg.el.orig	Thu Apr 10 23:07:16 1997
+++ lisp/ediff/ediff-merg.el	Thu Apr 10 23:08:37 1997
@@ -25,6 +25,12 @@
 
 (provide 'ediff-merg)
 
+(defgroup ediff-merge nil
+  "Merging utilities"
+  :prefix "ediff-"
+  :group 'ediff)
+
+
 ;; compiler pacifier
 (defvar ediff-window-A)
 (defvar ediff-window-B)
@@ -44,11 +50,13 @@
 (require 'ediff-init)
 
 
-(defvar ediff-default-variant 'combined
+(defcustom ediff-default-variant 'combined
   "*The variant to be used as a default for buffer C in merging.
-Valid values are the symbols `default-A', `default-B', and `combined'.")
+Valid values are the symbols `default-A', `default-B', and `combined'."
+  :type '(radio (const default-A) (const default-B) (const combined))
+  :group 'ediff-merge)
 
-(defvar ediff-combination-pattern 
+(defcustom ediff-combination-pattern 
   '("<<<<<<<<<<<<<< variant A" ">>>>>>>>>>>>>> variant B" "======= end of combination")
   "*Pattern to be used for combining difference regions in buffers A and B.
 The value is (STRING1 STRING2 STRING3). The combined text will look like this:
@@ -58,7 +66,9 @@
 STRING2
 diff region from variant B
 STRING3
-")
+"
+  :type '(list string string string)
+  :group 'ediff-merge)
 
 (ediff-defvar-local ediff-show-clashes-only  nil
   "*If t, show only those diff regions where both buffers disagree with the ancestor.
--- lisp/ediff/ediff-mult.el.orig	Thu Apr 10 23:10:28 1997
+++ lisp/ediff/ediff-mult.el	Thu Apr 10 23:12:22 1997
@@ -92,6 +92,12 @@
 
 (provide 'ediff-mult)
 
+(defgroup ediff-mult nil
+  "Multi-file and multi-buffer processing in ediff"
+  :prefix "ediff-"
+  :group 'ediff)
+
+
 ;; compiler pacifier
 (eval-when-compile
   (let ((load-path (cons (expand-file-name ".") load-path)))
@@ -163,22 +169,34 @@
 ;; The registry of Ediff sessions. A list of control buffers.
 (defvar ediff-session-registry nil)
 
-(defvar ediff-registry-setup-hook nil
-  "*Hooks run just after the registry control panel is set up.")
-(defvar ediff-session-group-setup-hook nil
+(defcustom ediff-registry-setup-hook nil
+  "*Hooks run just after the registry control panel is set up."
+  :type 'hook
+  :group 'ediff-mult)
+(defcustom ediff-session-group-setup-hook nil
   "*Hooks run just after a meta-buffer controlling a session group, such as
-ediff-directories, is run.")
-(defvar ediff-quit-session-group-hook nil
-  "*Hooks run just before exiting a session group.")
-(defvar ediff-show-registry-hook nil
-  "*Hooks run just after the registry buffer is shown.")
-(defvar ediff-show-session-group-hook nil
-  "*Hooks run just after a session group buffer is shown.")
-(defvar ediff-meta-buffer-keymap-setup-hook nil
+ediff-directories, is run."
+  :type 'hook
+  :group 'ediff-mult)
+(defcustom ediff-quit-session-group-hook nil
+  "*Hooks run just before exiting a session group."
+  :type 'hook
+  :group 'ediff-mult)
+(defcustom ediff-show-registry-hook nil
+  "*Hooks run just after the registry buffer is shown."
+  :type 'hook
+  :group 'ediff-mult)
+(defcustom ediff-show-session-group-hook nil
+  "*Hooks run just after a session group buffer is shown."
+  :type 'hook
+  :group 'ediff-mult)
+(defcustom ediff-meta-buffer-keymap-setup-hook nil
   "*Hooks run just after setting up the ediff-meta-buffer-map.
 This keymap controls key bindings in the meta buffer and is a local variable.
 This means that you can set different bindings for different kinds of meta
-buffers.")
+buffers."
+  :type 'hook
+  :group 'ediff-mult)
 
 ;; buffer holding the multi-file patch. local to the meta buffer
 (ediff-defvar-local ediff-meta-patchbufer nil "")
--- lisp/ediff/ediff-ptch.el.orig	Thu Apr 10 23:12:48 1997
+++ lisp/ediff/ediff-ptch.el	Thu Apr 10 23:16:32 1997
@@ -26,6 +26,12 @@
 	 
 (provide 'ediff-ptch)
 
+(defgroup ediff-ptch nil
+  "Ediff patch support"
+  :tag "Patch"
+  :prefix "ediff-"
+  :group 'ediff)
+
 ;; compiler pacifier
 (defvar ediff-window-A)
 (defvar ediff-window-B)
@@ -53,7 +59,7 @@
   "Backup extension used by the patch program.
 See also `ediff-backup-specs'.")
 
-(defvar ediff-backup-specs (format "-b %s" ediff-backup-extension)
+(defcustom ediff-backup-specs (format "-b %s" ediff-backup-extension)
   "*Backup directives to pass to the patch program.
 Ediff requires that the old version of the file \(before applying the patch\)
 is saved in a file named `the-patch-file.extension'. Usually `extension' is
@@ -67,31 +73,41 @@
 Note that both `ediff-backup-extension' and `ediff-backup-specs'
 must be properly set. If your patch program takes the option `-b',
 but not `-b extension', the variable `ediff-backup-extension' must
-still be set so Ediff will know which extension to use.")
+still be set so Ediff will know which extension to use."
+  :type 'string
+  :group 'ediff-ptch)
 
 
-(defvar ediff-patch-default-directory nil
-  "*Default directory to look for patches.")
+(defcustom ediff-patch-default-directory nil
+  "*Default directory to look for patches."
+  :type '(choice (const nil) string)
+  :group 'ediff-ptch)
 
-(defvar ediff-context-diff-label-regexp
+(defcustom ediff-context-diff-label-regexp
   (concat "\\(" 	; context diff 2-liner
 	  "^\\*\\*\\* \\([^ \t]+\\)[^*]+[\t ]*\n--- \\([^ \t]+\\)"
 	  "\\|" 	; GNU unified format diff 2-liner
 	  "^--- \\([^ \t]+\\)[\t ]+.*\n\\+\\+\\+ \\([^ \t]+\\)"
 	  "\\)")
-  "*Regexp matching filename 2-liners at the start of each context diff.")
+  "*Regexp matching filename 2-liners at the start of each context diff."
+  :type 'regexp
+  :group 'ediff-ptch)
 
-(defvar ediff-patch-program "patch"
+(defcustom ediff-patch-program "patch"
   "*Name of the program that applies patches.
-It is recommended to use GNU-compatible versions.")
-(defvar ediff-patch-options "-f"
+It is recommended to use GNU-compatible versions."
+  :type 'string
+  :group 'ediff-ptch)
+(defcustom ediff-patch-options "-f"
   "*Options to pass to ediff-patch-program.
 
 Note: the `-b' option should be specified in `ediff-backup-specs'.
 
 It is recommended to pass the `-f' option to the patch program, so it won't ask
 questions. However, some implementations don't accept this option, in which
-case the default value for this variable should be changed.")
+case the default value for this variable should be changed."
+  :type 'string
+  :group 'ediff-ptch)
 
 ;; The buffer of the patch file. Local to control buffer.
 (ediff-defvar-local ediff-patchbufer nil "")
--- lisp/ediff/ediff-wind.el.orig	Thu Apr 10 23:21:38 1997
+++ lisp/ediff/ediff-wind.el	Thu Apr 10 23:21:43 1997
@@ -60,8 +60,14 @@
        (defun ediff-compute-toolbar-width () 0)))
   (defun ediff-compute-toolbar-width () 0))
 
+(defgroup ediff-window nil
+  "Ediff window manipulation"
+  :prefix "ediff-"
+  :group 'ediff
+  :group 'frames)
 
-(defvar ediff-window-setup-function (if (ediff-window-display-p)
+
+(defcustom ediff-window-setup-function (if (ediff-window-display-p)
 					'ediff-setup-windows-multiframe
 				      'ediff-setup-windows-plain)
   "*Function called to set up windows.
@@ -82,7 +88,9 @@
        buffer-A, buffer-B, buffer-C, control-buffer
        Buffer C may not be used in jobs that compare only two buffers.
 If you plan to do something fancy, take a close look at how the two
-provided functions are written.")
+provided functions are written."
+  :type 'function
+  :group 'ediff-window)
 
 ;; indicates if we are in a multiframe setup
 (ediff-defvar-local ediff-multiframe nil "")
@@ -103,21 +111,25 @@
 (ediff-defvar-local ediff-window-config-saved "" "")
 
 
-(defvar ediff-split-window-function 'split-window-vertically
+(defcustom ediff-split-window-function 'split-window-vertically
   "*The function used to split the main window between buffer-A and buffer-B.
 You can set it to a horizontal split instead of the default vertical split
 by setting this variable to `split-window-horizontally'.
 You can also have your own function to do fancy splits.
 This variable has no effect when buffer-A/B are shown in different frames.
-In this case, Ediff will use those frames to display these buffers.")
+In this case, Ediff will use those frames to display these buffers."
+  :type 'function
+  :group 'ediff-window)
 
-(defvar ediff-merge-split-window-function 'split-window-horizontally
+(defcustom ediff-merge-split-window-function 'split-window-horizontally
   "*The function used to split the main window between buffer-A and buffer-B.
 You can set it to a vertical split instead of the default horizontal split
 by setting this variable to `split-window-vertically'.
 You can also have your own function to do fancy splits.
 This variable has no effect when buffer-A/B/C are shown in different frames.
-In this case, Ediff will use those frames to display these buffers.")
+In this case, Ediff will use those frames to display these buffers."
+  :type 'function
+  :group 'ediff-window)
 
 (defconst ediff-control-frame-parameters
   (list 
@@ -152,40 +164,50 @@
 (defvar ediff-mouse-pixel-threshold 30
   "If the user moves mouse more than this many pixels, Ediff won't warp mouse into control window.")
 
-(defvar ediff-grab-mouse t
+(defcustom ediff-grab-mouse t
   "*If t, Ediff will always grab the mouse and put it in the control frame.
 If 'maybe, Ediff will do it sometimes, but not after operations that require
 relatively long time. If nil, the mouse will be entirely user's
-responsibility.")
+responsibility."
+  :type 'boolean
+  :group 'ediff-window)
 
-(defvar ediff-control-frame-position-function 'ediff-make-frame-position
+(defcustom ediff-control-frame-position-function 'ediff-make-frame-position
   "Function to call to determine the desired location for the control panel.
 Expects three parameters: the control buffer, the desired width and height
 of the control frame. It returns an association list
-of the form \(\(top . <position>\) \(left . <position>\)\)")
+of the form \(\(top . <position>\) \(left . <position>\)\)"
+  :type 'boolean
+  :group 'ediff-window)
 
-(defvar ediff-control-frame-upward-shift (if ediff-xemacs-p 42 14)
+(defcustom ediff-control-frame-upward-shift (if ediff-xemacs-p 42 14)
   "*The upward shift of control frame from the top of buffer A's frame.
 Measured in pixels.
 This is used by the default control frame positioning function,
 `ediff-make-frame-position'. This variable is provided for easy
-customization of the default.")
+customization of the default."
+  :type 'integer
+  :group 'ediff-window)
 
-(defvar ediff-narrow-control-frame-leftward-shift (if ediff-xemacs-p 7 3)
+(defcustom ediff-narrow-control-frame-leftward-shift (if ediff-xemacs-p 7 3)
   "*The leftward shift of control frame from the right edge of buf A's frame.
 Measured in characters.
 This is used by the default control frame positioning function,
 `ediff-make-frame-position' to adjust the position of the control frame
 when it shows the short menu. This variable is provided for easy
-customization of the default.")
+customization of the default."
+  :type 'integer
+  :group 'ediff-window)
 
-(defvar ediff-wide-control-frame-rightward-shift 7
+(defcustom ediff-wide-control-frame-rightward-shift 7
   "*The rightward shift of control frame from the left edge of buf A's frame.
 Measured in characters.
 This is used by the default control frame positioning function,
 `ediff-make-frame-position' to adjust the position of the control frame
 when it shows the full menu. This variable is provided for easy
-customization of the default.")
+customization of the default."
+  :type 'integer
+  :group 'ediff-window)
 
 
 ;; Wide frame display
@@ -209,7 +231,7 @@
 ;; Frame used for the control panel in a windowing system.
 (ediff-defvar-local ediff-control-frame nil "")
 
-(defvar ediff-prefer-iconified-control-frame nil
+(defcustom ediff-prefer-iconified-control-frame nil
   "*If t, keep control panel iconified when help message is off.
 This has effect only on a windowing system.
 If t, hitting `?' to toggle control panel off iconifies it.
@@ -217,7 +239,9 @@
 This is only useful in Emacs and only for certain kinds of window managers,
 such as TWM and its derivatives, since the window manager must permit
 keyboard input to go into icons. XEmacs completely ignores keyboard input
-into icons, regardless of the window manager.")
+into icons, regardless of the window manager."
+  :type 'boolean
+  :group 'ediff-window)
 
 ;;; Functions
 
--- lisp/ediff/ediff.el.orig	Thu Apr 10 22:59:33 1997
+++ lisp/ediff/ediff.el	Thu Apr 10 22:59:33 1997
@@ -130,9 +130,16 @@
 (require 'ediff-init)
 (require 'ediff-mult)  ; required because of the registry stuff
 
-(defvar ediff-use-last-dir nil
-  "*If t, Ediff uses previous directory as default when reading file name.")
-  
+(defgroup ediff nil
+  "A comprehensive visual interface to diff & patch"
+  :group 'tools)
+
+
+(defcustom ediff-use-last-dir nil
+  "*If t, Ediff uses previous directory as default when reading file name."
+  :type 'boolean
+  :group 'ediff)
+
 (defvar ediff-last-dir-A nil
   "Last directory used by an Ediff command for file-A.")
 (defvar ediff-last-dir-B nil

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Ask not for whom the <CONTROL-G> tolls.

