]> code.delx.au - gnu-emacs/blobdiff - lisp/ediff-hook.el
(Abbrevs): A @node line without explicit Prev, Next, and Up links.
[gnu-emacs] / lisp / ediff-hook.el
index 634850334662228571b203a6e718693ccbae2787..fcf261efd06fbed567626a2a50e3ff844909868e 100644 (file)
@@ -1,6 +1,7 @@
 ;;; ediff-hook.el --- setup for Ediff's menus and autoloads
 
-;; Copyright (C) 1995, 96, 97, 98, 99, 2000, 01, 02 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+;;   2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
 
@@ -18,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:
 
 ;;;###autoload
 (defvar ediff-window-setup-function)
 
-;; This is used to avoid compilation warnings. When emacs/xemacs forms can
-;; generate compile time warnings, we use this macro.
-;; In this case, the macro will expand into the form that is appropriate to the
-;; compiler at hand.
-;; Suggested by rms.
+;; This macro is used to avoid compilation warnings.
+;; The macro will expand into the form that is appropriate to the
+;; compiler at hand (emacs or xemacs).
+;; The autoload, below, is useless in Emacs because ediff-hook.el
+;; is dumped with emacs, but it is needed in XEmacs
+;;;###autoload (defmacro ediff-cond-compile-for-xemacs-or-emacs (xemacs-form emacs-form) (if (string-match "XEmacs" emacs-version) xemacs-form emacs-form))
+
 (defmacro ediff-cond-compile-for-xemacs-or-emacs (xemacs-form emacs-form)
   (if (string-match "XEmacs" emacs-version)
       xemacs-form emacs-form))
-;; Note we wrap this in a progn so that we pick up the whole def
-;; for auto-autoload. That way we do not load ediff-hook.el when defining
-;; the menus.
-;;;###autoload
-(progn
-  (ediff-cond-compile-for-xemacs-or-emacs
-   ;; xemacs form
-   (defun ediff-xemacs-init-menus ()
-     (if (featurep 'menubar)
-        (progn
-          (add-submenu
-           '("Tools") ediff-menu "OO-Browser...")
-          (add-submenu
-           '("Tools") ediff-merge-menu "OO-Browser...")
-          (add-submenu
-           '("Tools") epatch-menu "OO-Browser...")
-          (add-submenu
-           '("Tools") ediff-misc-menu "OO-Browser...")
-          (add-menu-button
-           '("Tools") "-------" "OO-Browser...")
-          )))
-   nil ; emacs form
-   ))
-
 
+;; This autoload is useless in Emacs because ediff-hook.el is dumped with
+;; emacs, but it is needed in XEmacs
+;;;###autoload
+(ediff-cond-compile-for-xemacs-or-emacs
+ ;; xemacs form
+ (defun ediff-xemacs-init-menus ()
+   (if (featurep 'menubar)
+       (progn
+        (add-submenu
+         '("Tools") ediff-menu "OO-Browser...")
+        (add-submenu
+         '("Tools") ediff-merge-menu "OO-Browser...")
+        (add-submenu
+         '("Tools") epatch-menu "OO-Browser...")
+        (add-submenu
+         '("Tools") ediff-misc-menu "OO-Browser...")
+        (add-menu-button
+         '("Tools") "-------" "OO-Browser...")
+        )))
+ nil ; emacs form
+ )
+
+
+;; This autoload is useless in Emacs because ediff-hook.el is dumped with
+;; emacs, but it is needed in XEmacs
 ;;;###autoload
 (ediff-cond-compile-for-xemacs-or-emacs
  (progn
        ))
    (defvar ediff-misc-menu
      '("Ediff Miscellanea"
-       ["Ediff Manual..." ediff-documentation t]
-       ["Customize Ediff..." ediff-customize t]
-       ["List Ediff Sessions..." ediff-show-registry t]
-       ["Use separate frame for Ediff control buffer..."
+       ["Ediff Manual" ediff-documentation t]
+       ["Customize Ediff" ediff-customize t]
+       ["List Ediff Sessions" ediff-show-registry t]
+       ["Use separate frame for Ediff control buffer"
        ediff-toggle-multiframe
        :style toggle
        :selected (if (and (featurep 'ediff-util)
        :selected (if (featurep 'ediff-tbar)
                      (ediff-use-toolbar-p))]
        ))
-   
+
    ;; put these menus before Object-Oriented-Browser in Tools menu
    (if (and (featurep 'menubar) (not (featurep 'infodock))
            (not (featurep 'ediff-hook)))
           (ediff-xemacs-init-menus)))
+
  ;; Emacs--only if menu-bar is loaded
  (if (featurep 'menu-bar)
      (progn
        (defvar menu-bar-epatch-menu (make-sparse-keymap "Apply Patch"))
        (fset 'menu-bar-epatch-menu (symbol-value 'menu-bar-epatch-menu))
        (defvar menu-bar-ediff-merge-menu (make-sparse-keymap "Merge"))
-       (fset 'menu-bar-ediff-merge-menu 
+       (fset 'menu-bar-ediff-merge-menu
             (symbol-value 'menu-bar-ediff-merge-menu))
        (defvar menu-bar-ediff-menu (make-sparse-keymap "Compare"))
        (fset 'menu-bar-ediff-menu (symbol-value 'menu-bar-ediff-menu))
           . ediff-merge-directories-with-ancestor))
        (define-key menu-bar-ediff-merge-menu [ediff-merge-directories]
         '("Directories..." . ediff-merge-directories))
-       (define-key 
+       (define-key
         menu-bar-ediff-merge-menu [separator-ediff-merge-dirs] '("--"))
        (define-key
         menu-bar-ediff-merge-menu [ediff-merge-buffers-with-ancestor]
 
        ;; define ediff miscellanea
        (define-key menu-bar-ediff-misc-menu [emultiframe]
-        '("Toggle use of separate control buffer frame..."
+        '("Toggle use of separate control buffer frame"
           . ediff-toggle-multiframe))
        (define-key menu-bar-ediff-misc-menu [eregistry]
-        '("List Ediff Sessions..." . ediff-show-registry))
+        '("List Ediff Sessions" . ediff-show-registry))
        (define-key menu-bar-ediff-misc-menu [ediff-cust]
-        '("Customize Ediff..." . ediff-customize))
+        '("Customize Ediff" . ediff-customize))
        (define-key menu-bar-ediff-misc-menu [ediff-doc]
-        '("Ediff Manual..." . ediff-documentation))
+        '("Ediff Manual" . ediff-documentation))
        )
-      
+
       ) ; emacs case
  ) ; ediff-cond-compile-for-xemacs-or-emacs
 
   (autoload 'ediff-revision "ediff" "Compare versions of a file" t)
 
   ;; compare regions and windows
-  (autoload 'ediff-windows-wordwise 
+  (autoload 'ediff-windows-wordwise
     "ediff" "Compare two windows word-by-word." t)
-  (autoload 'ediff-regions-wordwise 
+  (autoload 'ediff-regions-wordwise
     "ediff" "Compare two regions word-by-word." t)
-  (autoload 'ediff-windows-linewise 
+  (autoload 'ediff-windows-linewise
     "ediff" "Compare two windows line-by-line." t)
-  (autoload 'ediff-regions-linewise 
+  (autoload 'ediff-regions-linewise
     "ediff" "Compare two regions line-by-line." t)
 
   ;; patch
   (autoload
     'ediff-directories3 "ediff" "Compare files in three directories." t)
 
-  (autoload 'edir-revisions 
+  (autoload 'edir-revisions
     "ediff" "Compare two versions of a file." t)
-  (autoload 'ediff-directory-revisions 
+  (autoload 'ediff-directory-revisions
     "ediff" "Compare two versions of a file." t)
 
   ;; merge directories
     "Merge files in two directories using files in a third dir as ancestors."
     t)
 
-  (autoload 'edir-merge-revisions 
+  (autoload 'edir-merge-revisions
     "ediff" "Merge versions of files in a directory." t)
-  (autoload 'ediff-merge-directory-revisions 
+  (autoload 'ediff-merge-directory-revisions
     "ediff" "Merge versions of files in a directory." t)
   (autoload 'ediff-merge-directory-revisions-with-ancestor
     "ediff"
     "ediff-util"
     "Toggle the use of Ediff toolbar."
     t)
-  
+
   ) ; if purify-flag
 
 
 (provide 'ediff-hook)
 
+
+;;; arch-tag: 512f8656-8a4b-4789-af5d-5c6144498df3
 ;;; ediff-hook.el ends here