emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/ediff-util.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/ediff-util.el,v
Date: Wed, 05 Mar 2008 08:52:23 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/03/05 08:52:22

Index: ediff-util.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/ediff-util.el,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -b -r1.86 -r1.87
--- ediff-util.el       3 Feb 2008 11:58:58 -0000       1.86
+++ ediff-util.el       5 Mar 2008 08:52:22 -0000       1.87
@@ -306,10 +306,8 @@
       (make-local-variable 'ediff-window-setup-function)
       (make-local-variable 'ediff-keep-variants)
 
-      (ediff-cond-compile-for-xemacs-or-emacs
-       (make-local-hook 'ediff-after-quit-hook-internal) ; xemacs form
-       nil ; emacs form
-       )
+      (if (featurep 'xemacs)
+         (make-local-hook 'ediff-after-quit-hook-internal))
 
       ;; unwrap set up parameters passed as argument
       (while setup-parameters
@@ -332,10 +330,8 @@
       (if (string-match "buffer" (symbol-name ediff-job-name))
          (setq ediff-keep-variants t))
 
-      (ediff-cond-compile-for-xemacs-or-emacs
-       (make-local-hook 'pre-command-hook) ; xemacs form
-       nil                                 ; emacs form
-       )
+      (if (featurep 'xemacs)
+         (make-local-hook 'pre-command-hook))
 
       (if (ediff-window-display-p)
          (add-hook 'pre-command-hook 'ediff-spy-after-mouse nil 'local))
@@ -1360,25 +1356,19 @@
   ;; The problem with this is that any previous bottom-toolbar
   ;; will not re-appear after our cleanup here.  Is there a way
   ;; to do "push" and "pop" toolbars ?  --marcpa
-  (if (ediff-use-toolbar-p)
-      (ediff-cond-compile-for-xemacs-or-emacs
-       (progn ; xemacs
+  (if (featurep 'xemacs)
+      (when (ediff-use-toolbar-p)
         (set-specifier bottom-toolbar (list (selected-frame) nil))
-        (set-specifier bottom-toolbar-visible-p (list (selected-frame) nil)))
-       nil  ; emacs
-       )
-    ))
+       (set-specifier bottom-toolbar-visible-p (list (selected-frame) nil)))))
 
 ;; If wants to use toolbar, make it.
 ;; If not, zero the toolbar for XEmacs.
 ;; Do nothing for Emacs.
 (defun ediff-make-bottom-toolbar (&optional frame)
-  (if (ediff-window-display-p)
-      (progn
+  (when (ediff-window-display-p)
        (setq frame (or frame (selected-frame)))
+    (if (featurep 'xemacs)
        (cond ((ediff-use-toolbar-p) ; this checks for XEmacs
-              (ediff-cond-compile-for-xemacs-or-emacs
-               (progn ; xemacs
                  (set-specifier
                   bottom-toolbar
                   (list frame (if (ediff-3way-comparison-job)
@@ -1386,17 +1376,8 @@
                  (set-specifier bottom-toolbar-visible-p (list frame t))
                  (set-specifier bottom-toolbar-height
                                 (list frame ediff-toolbar-height)))
-               nil ; emacs
-               )
-              )
              ((ediff-has-toolbar-support-p)
-              (ediff-cond-compile-for-xemacs-or-emacs
-               (set-specifier bottom-toolbar-height (list frame 0)) ; xemacs
-               nil                                                  ; emacs
-               )
-              )
-             ))
-    ))
+              (set-specifier bottom-toolbar-height (list frame 0)))))))
 
 ;; Merging
 
@@ -3408,15 +3389,13 @@
 (defun ediff-make-cloned-buffer (buff region-name)
   (ediff-make-indirect-buffer
    buff (generate-new-buffer-name
-         (concat (if (stringp buff) buff (buffer-name buff)) region-name))
-   ))
+         (concat (if (stringp buff) buff (buffer-name buff)) region-name))))
 
 
 (defun ediff-make-indirect-buffer (base-buf indirect-buf-name)
-  (ediff-cond-compile-for-xemacs-or-emacs
-   (make-indirect-buffer base-buf indirect-buf-name) ; xemacs
-   (make-indirect-buffer base-buf indirect-buf-name 'clone) ; emacs
-   ))
+  (if (featurep 'xemacs)
+      (make-indirect-buffer base-buf indirect-buf-name)
+    (make-indirect-buffer base-buf indirect-buf-name 'clone)))
 
 
 ;; This function operates only from an ediff control buffer
@@ -3787,21 +3766,19 @@
          (or (number-or-marker-p end)
              (setq end (eval end)))
          (setq overl
-               (ediff-cond-compile-for-xemacs-or-emacs
-                (make-extent beg end buff)                     ; xemacs
+               (if (featurep 'xemacs)
+                   (make-extent beg end buff)
                 ;; advance front and rear of the overlay
-                (make-overlay beg end buff nil 'rear-advance)  ; emacs
-                ))
+                 (make-overlay beg end buff nil 'rear-advance)))
 
          ;; never detach
          (ediff-overlay-put
           overl (if (featurep 'emacs) 'evaporate 'detachable) nil)
          ;; make overlay open-ended
          ;; In emacs, it is made open ended at creation time
-         (if (featurep 'xemacs)
-             (progn
+         (when (featurep 'xemacs)
                (ediff-overlay-put overl 'start-open nil)
-               (ediff-overlay-put overl 'end-open nil)))
+           (ediff-overlay-put overl 'end-open nil))
          (ediff-overlay-put overl 'ediff-diff-num 0)
          overl))))
 
@@ -4065,19 +4042,16 @@
 
 
 (defun ediff-deactivate-mark ()
-  (ediff-cond-compile-for-xemacs-or-emacs
-   (zmacs-deactivate-region) ; xemacs
-   (deactivate-mark) ; emacs
-   ))
+  (if (featurep 'xemacs)
+      (zmacs-deactivate-region)
+    (deactivate-mark)))
 (defun ediff-activate-mark ()
-  (ediff-cond-compile-for-xemacs-or-emacs
-   (zmacs-activate-region) ; xemacs
+  (if (featurep 'xemacs)
+      (zmacs-activate-region)
    (progn
      (make-local-variable 'transient-mark-mode)
      (setq mark-active t
-          transient-mark-mode t) ; emacs
-     )
-   ))
+           transient-mark-mode t))))
 
 (defun ediff-nuke-selective-display ()
   (if (featurep 'xemacs)
@@ -4187,10 +4161,8 @@
   (interactive)
   (ediff-barf-if-not-control-buffer)
 
-  (ediff-cond-compile-for-xemacs-or-emacs
-   (make-local-hook 'post-command-hook) ; xemacs form
-   nil                                  ; emacs form
-   )
+  (if (featurep 'xemacs)
+      (make-local-hook 'post-command-hook))
 
   (let ((pre-hook 'pre-command-hook)
        (post-hook 'post-command-hook))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]