]> code.delx.au - gnu-emacs/blobdiff - lisp/ediff-init.el
Merge from emacs--rel--22
[gnu-emacs] / lisp / ediff-init.el
index 3933fd760d2cbbfa6f36906c2dc77e0cea6d273e..21e6bf660ee11718dec344c8d8f806a58ef5b7cc 100644 (file)
@@ -1,7 +1,7 @@
 ;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff
 
 ;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;;     2004, 2005 Free Software Foundation, Inc.
+;;   2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -102,7 +102,7 @@ that Ediff doesn't know about.")
        (boundp 'ediff-use-toolbar-p)
        ediff-use-toolbar-p))           ;Does the user want it ?
 
-;; Defines SYMBOL as an advertised local variable.
+;; Defines VAR as an advertised local variable.
 ;; Performs a defvar, then executes `make-variable-buffer-local' on
 ;; the variable.  Also sets the `permanent-local' property,
 ;; so that `kill-all-local-variables' (called by major-mode setting
@@ -110,6 +110,8 @@ that Ediff doesn't know about.")
 ;;
 ;; Plagiarised from `emerge-defvar-local' for XEmacs.
 (defmacro ediff-defvar-local (var value doc)
+  "Defines VAR as a local variable."
+  (declare (indent defun))
   `(progn
      (defvar ,var ,value ,doc)
      (make-variable-buffer-local ',var)
@@ -258,6 +260,8 @@ It needs to be killed when we quit the session.")
 ;; Doesn't save the point and mark.
 ;; This is `with-current-buffer' with the added test for live buffers."
 (defmacro ediff-with-current-buffer (buffer &rest body)
+  "Evaluates BODY in BUFFER."
+  (declare (indent 1) (debug (form body)))
   `(if (ediff-buffer-live-p ,buffer)
        (save-current-buffer
         (set-buffer ,buffer)
@@ -393,17 +397,17 @@ It needs to be killed when we quit the session.")
             this-command)))
 
 (defgroup ediff-highlighting nil
-  "Hilighting of difference regions in Ediff"
+  "Hilighting of difference regions in Ediff."
   :prefix "ediff-"
   :group 'ediff)
 
 (defgroup ediff-merge nil
-  "Merging utilities"
+  "Merging utilities."
   :prefix "ediff-"
   :group 'ediff)
 
 (defgroup ediff-hook nil
-  "Hooks run by Ediff"
+  "Hooks run by Ediff."
   :prefix "ediff-"
   :group 'ediff)
 
@@ -559,24 +563,24 @@ See the documentation string of `ediff-focus-on-regexp-matches' for details.")
 
 
 ;; Highlighting
-(defcustom ediff-before-flag-bol (if ediff-xemacs-p (make-glyph "->>") "->>")
+(defcustom ediff-before-flag-bol (if (featurep 'xemacs) (make-glyph "->>") "->>")
   "*Flag placed before a highlighted block of differences, if block starts at beginning of a line."
   :type 'string
   :tag  "Region before-flag at beginning of line"
   :group 'ediff)
 
-(defcustom ediff-after-flag-eol  (if ediff-xemacs-p (make-glyph "<<-") "<<-")
+(defcustom ediff-after-flag-eol  (if (featurep 'xemacs) (make-glyph "<<-") "<<-")
   "*Flag placed after a highlighted block of differences, if block ends at end of a line."
   :type 'string
   :tag  "Region after-flag at end of line"
   :group 'ediff)
 
-(defcustom ediff-before-flag-mol (if ediff-xemacs-p (make-glyph "->>") "->>")
+(defcustom ediff-before-flag-mol (if (featurep 'xemacs) (make-glyph "->>") "->>")
   "*Flag placed before a highlighted block of differences, if block starts in mid-line."
   :type 'string
   :tag  "Region before-flag in the middle of line"
   :group 'ediff)
-(defcustom ediff-after-flag-mol  (if ediff-xemacs-p (make-glyph "<<-") "<<-")
+(defcustom ediff-after-flag-mol  (if (featurep 'xemacs) (make-glyph "<<-") "<<-")
   "*Flag placed after a highlighted block of differences, if block ends in mid-line."
   :type 'string
   :tag  "Region after-flag in the middle of line"
@@ -854,10 +858,10 @@ to temp files when Ediff needs to find fine differences."
 
 ;; A-list of current-diff-face-* symbols associated with buf types
 (defconst ediff-current-diff-face-alist
-  '((A . ediff-current-diff-face-A)
-    (B . ediff-current-diff-face-B)
-    (C . ediff-current-diff-face-C)
-    (Ancestor . ediff-current-diff-face-Ancestor)))
+  '((A . ediff-current-diff-A)
+    (B . ediff-current-diff-B)
+    (C . ediff-current-diff-C)
+    (Ancestor . ediff-current-diff-Ancestor)))
 
 
 (defun ediff-set-overlay-face (extent face)
@@ -915,8 +919,6 @@ to temp files when Ediff needs to find fine differences."
       (t                    (:inverse-video t))))
   "Face for highlighting the selected difference in buffer A."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-current-diff-face-A 'face-alias 'ediff-current-diff-A)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-current-diff-face-A 'ediff-current-diff-A
@@ -924,13 +926,13 @@ to temp files when Ediff needs to find fine differences."
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-current-diff-A'
 this variable represents.")
-(ediff-hide-face 'ediff-current-diff-A)
+(ediff-hide-face ediff-current-diff-face-A)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; This means that some user customization may be trashed.
 (if (and ediff-xemacs-p
         (ediff-has-face-support-p)
         (not (ediff-color-display-p)))
-    (copy-face 'modeline 'ediff-current-diff-A))
+    (copy-face 'modeline ediff-current-diff-face-A))
 
 
 
@@ -948,8 +950,6 @@ this variable represents.")
       (t                    (:inverse-video t))))
   "Face for highlighting the selected difference in buffer B."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-current-diff-face-B 'face-alias 'ediff-current-diff-B)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-current-diff-face-B 'ediff-current-diff-B
@@ -957,13 +957,13 @@ this variable represents.")
  this variable.  Instead, use the customization
 widget to customize the actual face `ediff-current-diff-B'
 this variable represents.")
-(ediff-hide-face 'ediff-current-diff-B)
+(ediff-hide-face ediff-current-diff-face-B)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; This means that some user customization may be trashed.
 (if (and ediff-xemacs-p
         (ediff-has-face-support-p)
         (not (ediff-color-display-p)))
-    (copy-face 'modeline 'ediff-current-diff-B))
+    (copy-face 'modeline ediff-current-diff-face-B))
 
 
 (defface ediff-current-diff-C
@@ -978,8 +978,6 @@ this variable represents.")
       (t                    (:inverse-video t))))
   "Face for highlighting the selected difference in buffer C."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-current-diff-face-C 'face-alias 'ediff-current-diff-C)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-current-diff-face-C 'ediff-current-diff-C
@@ -987,13 +985,13 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-current-diff-C'
 this variable represents.")
-(ediff-hide-face 'ediff-current-diff-C)
+(ediff-hide-face ediff-current-diff-face-C)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; This means that some user customization may be trashed.
 (if (and ediff-xemacs-p
         (ediff-has-face-support-p)
         (not (ediff-color-display-p)))
-    (copy-face 'modeline 'ediff-current-diff-C))
+    (copy-face 'modeline ediff-current-diff-face-C))
 
 
 (defface ediff-current-diff-Ancestor
@@ -1008,8 +1006,6 @@ this variable represents.")
       (t (:inverse-video t))))
   "Face for highlighting the selected difference in buffer Ancestor."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-current-diff-face-Ancestor 'face-alias 'ediff-current-diff-Ancestor)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-current-diff-face-Ancestor 'ediff-current-diff-Ancestor
@@ -1017,13 +1013,13 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-current-diff-Ancestor'
 this variable represents.")
-(ediff-hide-face 'ediff-current-diff-Ancestor)
+(ediff-hide-face ediff-current-diff-face-Ancestor)
 ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
 ;; This means that some user customization may be trashed.
 (if (and ediff-xemacs-p
         (ediff-has-face-support-p)
         (not (ediff-color-display-p)))
-    (copy-face 'modeline 'ediff-current-diff-Ancestor))
+    (copy-face 'modeline ediff-current-diff-face-Ancestor))
 
 
 (defface ediff-fine-diff-A
@@ -1038,8 +1034,6 @@ this variable represents.")
       (t (:underline t :stipple "gray3"))))
   "Face for highlighting the refinement of the selected diff in buffer A."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-fine-diff-face-A 'face-alias 'ediff-fine-diff-A)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-fine-diff-face-A 'ediff-fine-diff-A
@@ -1047,7 +1041,7 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-fine-diff-A'
 this variable represents.")
-(ediff-hide-face 'ediff-fine-diff-A)
+(ediff-hide-face ediff-fine-diff-face-A)
 
 (defface ediff-fine-diff-B
   (if ediff-emacs-p
@@ -1061,8 +1055,6 @@ this variable represents.")
       (t                    (:underline t :stipple "gray3"))))
   "Face for highlighting the refinement of the selected diff in buffer B."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-fine-diff-face-B 'face-alias 'ediff-fine-diff-B)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-fine-diff-face-B 'ediff-fine-diff-B
@@ -1070,7 +1062,7 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-fine-diff-B'
 this variable represents.")
-(ediff-hide-face 'ediff-fine-diff-B)
+(ediff-hide-face ediff-fine-diff-face-B)
 
 (defface ediff-fine-diff-C
   (if ediff-emacs-p
@@ -1089,8 +1081,6 @@ this variable represents.")
       (t (:underline t :stipple "gray3"))))
   "Face for highlighting the refinement of the selected diff in buffer C."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-fine-diff-face-C 'face-alias 'ediff-fine-diff-C)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-fine-diff-face-C 'ediff-fine-diff-C
@@ -1098,7 +1088,7 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-fine-diff-C'
 this variable represents.")
-(ediff-hide-face 'ediff-fine-diff-C)
+(ediff-hide-face ediff-fine-diff-face-C)
 
 (defface ediff-fine-diff-Ancestor
   (if ediff-emacs-p
@@ -1114,8 +1104,6 @@ this variable represents.")
 At present, this face is not used and no fine differences are computed for the
 ancestor buffer."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-fine-diff-face-Ancestor 'face-alias 'ediff-fine-diff-Ancestor)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-fine-diff-face-Ancestor 'ediff-fine-diff-Ancestor
@@ -1123,7 +1111,7 @@ ancestor buffer."
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-fine-diff-Ancestor'
 this variable represents.")
-(ediff-hide-face 'ediff-fine-diff-Ancestor)
+(ediff-hide-face ediff-fine-diff-face-Ancestor)
 
 ;; Some installs don't have stipple or Stipple. So, try them in turn.
 (defvar stipple-pixmap
@@ -1151,8 +1139,6 @@ this variable represents.")
       (t                    (:italic t :stipple ,stipple-pixmap))))
   "Face for highlighting even-numbered non-current differences in buffer A."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-even-diff-face-A 'face-alias 'ediff-even-diff-A)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-even-diff-face-A 'ediff-even-diff-A
@@ -1160,7 +1146,7 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-even-diff-A'
 this variable represents.")
-(ediff-hide-face 'ediff-even-diff-A)
+(ediff-hide-face ediff-even-diff-face-A)
 
 (defface ediff-even-diff-B
   (if ediff-emacs-p
@@ -1174,8 +1160,6 @@ this variable represents.")
       (t                    (:italic t :stipple ,stipple-pixmap))))
   "Face for highlighting even-numbered non-current differences in buffer B."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-even-diff-face-B 'face-alias 'ediff-even-diff-B)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-even-diff-face-B 'ediff-even-diff-B
@@ -1183,7 +1167,7 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-even-diff-B'
 this variable represents.")
-(ediff-hide-face 'ediff-even-diff-B)
+(ediff-hide-face ediff-even-diff-face-B)
 
 (defface ediff-even-diff-C
   (if ediff-emacs-p
@@ -1202,8 +1186,6 @@ this variable represents.")
       (t                    (:italic t :stipple ,stipple-pixmap))))
   "Face for highlighting even-numbered non-current differences in buffer C."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-even-diff-face-C 'face-alias 'ediff-even-diff-C)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-even-diff-face-C 'ediff-even-diff-C
@@ -1211,7 +1193,7 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-even-diff-C'
 this variable represents.")
-(ediff-hide-face 'ediff-even-diff-C)
+(ediff-hide-face ediff-even-diff-face-C)
 
 (defface ediff-even-diff-Ancestor
   (if ediff-emacs-p
@@ -1230,8 +1212,6 @@ this variable represents.")
       (t (:italic t :stipple ,stipple-pixmap))))
   "Face for highlighting even-numbered non-current differences in the ancestor buffer."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-even-diff-face-Ancestor 'face-alias 'ediff-even-diff-Ancestor)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-even-diff-face-Ancestor 'ediff-even-diff-Ancestor
@@ -1239,7 +1219,7 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-even-diff-Ancestor'
 this variable represents.")
-(ediff-hide-face 'ediff-even-diff-Ancestor)
+(ediff-hide-face ediff-even-diff-face-Ancestor)
 
 ;; Association between buffer types and even-diff-face symbols
 (defconst ediff-even-diff-face-alist
@@ -1263,8 +1243,6 @@ this variable represents.")
       (t                    (:italic t :stipple "gray1"))))
   "Face for highlighting odd-numbered non-current differences in buffer A."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-odd-diff-face-A 'face-alias 'ediff-odd-diff-A)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-odd-diff-face-A 'ediff-odd-diff-A
@@ -1272,7 +1250,7 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-odd-diff-A'
 this variable represents.")
-(ediff-hide-face 'ediff-odd-diff-A)
+(ediff-hide-face ediff-odd-diff-face-A)
 
 
 (defface ediff-odd-diff-B
@@ -1290,8 +1268,6 @@ this variable represents.")
       (t                    (:italic t :stipple "gray1"))))
   "Face for highlighting odd-numbered non-current differences in buffer B."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-odd-diff-face-B 'face-alias 'ediff-odd-diff-B)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-odd-diff-face-B 'ediff-odd-diff-B
@@ -1299,7 +1275,7 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-odd-diff-B'
 this variable represents.")
-(ediff-hide-face 'ediff-odd-diff-B)
+(ediff-hide-face ediff-odd-diff-face-B)
 
 (defface ediff-odd-diff-C
   (if ediff-emacs-p
@@ -1316,8 +1292,6 @@ this variable represents.")
       (t                    (:italic t :stipple "gray1"))))
   "Face for highlighting odd-numbered non-current differences in buffer C."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-odd-diff-face-C 'face-alias 'ediff-odd-diff-C)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-odd-diff-face-C 'ediff-odd-diff-C
@@ -1325,7 +1299,7 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-odd-diff-C'
 this variable represents.")
-(ediff-hide-face 'ediff-odd-diff-C)
+(ediff-hide-face ediff-odd-diff-face-C)
 
 (defface ediff-odd-diff-Ancestor
   (if ediff-emacs-p
@@ -1339,8 +1313,6 @@ this variable represents.")
       (t                    (:italic t :stipple "gray1"))))
   "Face for highlighting odd-numbered non-current differences in the ancestor buffer."
   :group 'ediff-highlighting)
-;; backward-compatibility alias
-(put 'ediff-odd-diff-face-Ancestor 'face-alias 'ediff-odd-diff-Ancestor)
 ;; An internal variable.  Ediff takes the face from here.  When unhighlighting,
 ;; this variable is set to nil, then again to the appropriate face.
 (defvar ediff-odd-diff-face-Ancestor 'ediff-odd-diff-Ancestor
@@ -1348,30 +1320,30 @@ this variable represents.")
 DO NOT CHANGE this variable.  Instead, use the customization
 widget to customize the actual face object `ediff-odd-diff-Ancestor'
 this variable represents.")
-(ediff-hide-face 'ediff-odd-diff-Ancestor)
+(ediff-hide-face ediff-odd-diff-face-Ancestor)
 
 ;; Association between buffer types and odd-diff-face symbols
 (defconst ediff-odd-diff-face-alist
-  '((A . ediff-odd-diff-face-A)
-    (B . ediff-odd-diff-face-B)
-    (C . ediff-odd-diff-face-C)
-    (Ancestor . ediff-odd-diff-face-Ancestor)))
+  '((A . ediff-odd-diff-A)
+    (B . ediff-odd-diff-B)
+    (C . ediff-odd-diff-C)
+    (Ancestor . ediff-odd-diff-Ancestor)))
 
 ;; A-list of fine-diff face symbols associated with buffer types
 (defconst ediff-fine-diff-face-alist
-  '((A . ediff-fine-diff-face-A)
-    (B . ediff-fine-diff-face-B)
-    (C . ediff-fine-diff-face-C)
-    (Ancestor . ediff-fine-diff-face-Ancestor)))
+  '((A . ediff-fine-diff-A)
+    (B . ediff-fine-diff-B)
+    (C . ediff-fine-diff-C)
+    (Ancestor . ediff-fine-diff-Ancestor)))
 
 ;; Help echo
-(put 'ediff-fine-diff-A 'ediff-help-echo
+(put ediff-fine-diff-face-A 'ediff-help-echo
      "A `refinement' of the current difference region")
-(put 'ediff-fine-diff-B 'ediff-help-echo
+(put ediff-fine-diff-face-B 'ediff-help-echo
      "A `refinement' of the current difference region")
-(put 'ediff-fine-diff-C 'ediff-help-echo
+(put ediff-fine-diff-face-C 'ediff-help-echo
      "A `refinement' of the current difference region")
-(put 'ediff-fine-diff-Ancestor 'ediff-help-echo
+(put ediff-fine-diff-face-Ancestor 'ediff-help-echo
      "A `refinement' of the current difference region")
 
 (add-hook 'ediff-quit-hook 'ediff-cleanup-mess)
@@ -1438,13 +1410,14 @@ This property can be toggled interactively."
 ;;; Misc
 
 ;; if nil, this silences some messages
-(defconst ediff-verbose-p t)
+(defvar ediff-verbose-p t)
 
 (defcustom ediff-autostore-merges  'group-jobs-only
   "*Save the results of merge jobs automatically.
-nil means don't save automatically.  t means always save.  Anything else
-means save automatically only if the merge job is part of a group of jobs, such
-as `ediff-merge-directory' or `ediff-merge-directory-revisions'."
+With value nil, don't save automatically.  With value t, always
+save.  Anything else means save automatically only if the merge
+job is part of a group of jobs, such as `ediff-merge-directory'
+or `ediff-merge-directory-revisions'."
   :type '(choice (const nil) (const t) (const group-jobs-only))
   :group 'ediff-merge)
 (make-variable-buffer-local 'ediff-autostore-merges)
@@ -1496,7 +1469,7 @@ This default should work without changes."
   :group 'ediff)
 
 ;; needed to simulate frame-char-width in XEmacs.
-(defvar ediff-H-glyph (if ediff-xemacs-p (make-glyph "H")))
+(defvar ediff-H-glyph (if (featurep 'xemacs) (make-glyph "H")))
 
 
 ;; Temporary file used for refining difference regions in buffer A.
@@ -1840,7 +1813,7 @@ Unless optional argument INPLACE is non-nil, return a new string."
         "Merge dir versions via ancestors")
        (t
         (capitalize
-         (subst-char-in-string ?- ?\  (substring (symbol-name jobname) 6))))
+         (subst-char-in-string ?- ?\s (substring (symbol-name jobname) 6))))
        ))
 
 
@@ -1900,14 +1873,15 @@ Unless optional argument INPLACE is non-nil, return a new string."
             (set-syntax-table ,old-table)))))))
 
 
+(provide 'ediff-init)
 
-;;; Local Variables:
-;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
-;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
-;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
-;;; End:
 
-(provide 'ediff-init)
 
-;;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5
+;; Local Variables:
+;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
+;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
+;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
+;; End:
+
+;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5
 ;;; ediff-init.el ends here