Commit e83d1fe8 authored by Dan Nicolaescu's avatar Dan Nicolaescu
Browse files

* ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove.

(ediff-has-face-support-p, ediff-BAD-INFO, ediff-check-version)
(ediff-current-diff-A, ediff-current-diff-B)
(ediff-current-diff-C, ediff-fine-diff-C, ediff-fine-diff-A)
(ediff-fine-diff-B, ediff-fine-diff-Ancestor, ediff-even-diff-A)
(ediff-even-diff-B, ediff-even-diff-C, ediff-even-diff-Ancestor)
(ediff-odd-diff-A, ediff-odd-diff-B, ediff-odd-diff-C)
(ediff-odd-diff-Ancestor, ediff-reset-mouse):
* ediff-wind.el (ediff-narrow-control-frame-leftward-shift)
(ediff-setup-windows-plain-merge)
(ediff-setup-windows-plain-compare, ediff-setup-control-frame)
(ediff-refresh-control-frame, ediff-get-visible-buffer-window):
* ediff-util.el (ediff-setup-keymap, )
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-really-quit)
(ediff-good-frame-under-mouse)
(ediff-highlight-diff-in-one-buffer)
(ediff-remove-flags-from-buffer, ediff-place-flags-in-buffer1)
(ediff-make-bullet-proof-overlay):
* ediff-mult.el (ediff-setup-meta-map, ediff-emacs-p)
(ediff-set-meta-overlay):
* ediff-help.el (ediff-help-region-map, ediff-set-help-overlays):
* ediff.el (ediff-documentation): Replace ediff-xemacs-p and
ediff-emacs-p with their former definitions.

* emulation/viper-init.el (viper-xemacs-p, viper-emacs-p): Remove.
(viper-has-face-support-p, viper-inactivate-input-method)
(viper-activate-input-method)
(viper-use-replace-region-delimiters, viper-restore-cursor-type):
* emulation/viper-mous.el (viper-multiclick-timeout)
(viper-surrounding-word, viper-mouse-click-insert-word)
(viper-mouse-click-search-word, viper-parse-mouse-key):
* emulation/viper-macs.el (viper-char-array-to-macro):
* emulation/viper.el (viper-go-away, viper-set-hooks)
(viper-non-hook-settings):
* emulation/viper-util.el (viper-get-saved-cursor-color-in-replace-mode)
(viper-get-saved-cursor-color-in-insert-mode)
(viper-get-saved-cursor-color-in-emacs-mode)
(viper-check-version, viper-get-visible-buffer-window)
(viper-file-checked-in-p, viper-set-replace-overlay)
(viper-set-replace-overlay-glyphs, viper-set-minibuffer-overlay)
(viper-check-minibuffer-overlay, viper-read-key-sequence)
(viper-key-to-emacs-key): Replace viper-xemacs-p and viper-emacs-p
with their former definitions.
(viper-eventify-list-xemacs): Only do work for XEmacs.
(viper-set-unread-command-events): Only do work for Emacs.
(viper-overlay-p, viper-make-overlay, viper-overlay-live-p)
(viper-move-overlay, viper-overlay-start, viper-overlay-end)
(viper-overlay-get, viper-overlay-put, viper-read-event)
(viper-characterp, viper-int-to-char, viper-get-face)
(viper-color-defined-p, viper-iconify): New defaliases replacing
the old fsets.

* progmodes/fortran.el (comment-region-function)
(uncomment-region-function): Pacify byte compiler.

* vc.el (vc-diff-internal): Remove code for an old version of
gnus.
parent 1da7a8c5
2007-11-09 Dan Nicolaescu <dann@ics.uci.edu>
* ediff-init.el (ediff-xemacs-p, ediff-emacs-p): Remove.
(ediff-has-face-support-p, ediff-BAD-INFO, ediff-check-version)
(ediff-current-diff-A, ediff-current-diff-B)
(ediff-current-diff-C, ediff-fine-diff-C, ediff-fine-diff-A)
(ediff-fine-diff-B, ediff-fine-diff-Ancestor, ediff-even-diff-A)
(ediff-even-diff-B, ediff-even-diff-C, ediff-even-diff-Ancestor)
(ediff-odd-diff-A, ediff-odd-diff-B, ediff-odd-diff-C)
(ediff-odd-diff-Ancestor, ediff-reset-mouse):
* ediff-wind.el (ediff-narrow-control-frame-leftward-shift)
(ediff-setup-windows-plain-merge)
(ediff-setup-windows-plain-compare, ediff-setup-control-frame)
(ediff-refresh-control-frame, ediff-get-visible-buffer-window):
* ediff-util.el (ediff-setup-keymap, )
(ediff-toggle-wide-display, ediff-toggle-multiframe)
(ediff-toggle-use-toolbar, ediff-really-quit)
(ediff-good-frame-under-mouse)
(ediff-highlight-diff-in-one-buffer)
(ediff-remove-flags-from-buffer, ediff-place-flags-in-buffer1)
(ediff-make-bullet-proof-overlay):
* ediff-mult.el (ediff-setup-meta-map, ediff-emacs-p)
(ediff-set-meta-overlay):
* ediff-help.el (ediff-help-region-map, ediff-set-help-overlays):
* ediff.el (ediff-documentation): Replace ediff-xemacs-p and
ediff-emacs-p with their former definitions.
* emulation/viper-init.el (viper-xemacs-p, viper-emacs-p): Remove.
(viper-has-face-support-p, viper-inactivate-input-method)
(viper-activate-input-method)
(viper-use-replace-region-delimiters, viper-restore-cursor-type):
* emulation/viper-mous.el (viper-multiclick-timeout)
(viper-surrounding-word, viper-mouse-click-insert-word)
(viper-mouse-click-search-word, viper-parse-mouse-key):
* emulation/viper-macs.el (viper-char-array-to-macro):
* emulation/viper.el (viper-go-away, viper-set-hooks)
(viper-non-hook-settings):
* emulation/viper-util.el (viper-get-saved-cursor-color-in-replace-mode)
(viper-get-saved-cursor-color-in-insert-mode)
(viper-get-saved-cursor-color-in-emacs-mode)
(viper-check-version, viper-get-visible-buffer-window)
(viper-file-checked-in-p, viper-set-replace-overlay)
(viper-set-replace-overlay-glyphs, viper-set-minibuffer-overlay)
(viper-check-minibuffer-overlay, viper-read-key-sequence)
(viper-key-to-emacs-key): Replace viper-xemacs-p and viper-emacs-p
with their former definitions.
(viper-eventify-list-xemacs): Only do work for XEmacs.
(viper-set-unread-command-events): Only do work for Emacs.
(viper-overlay-p, viper-make-overlay, viper-overlay-live-p)
(viper-move-overlay, viper-overlay-start, viper-overlay-end)
(viper-overlay-get, viper-overlay-put, viper-read-event)
(viper-characterp, viper-int-to-char, viper-get-face)
(viper-color-defined-p, viper-iconify): New defaliases replacing
the old fsets.
* progmodes/fortran.el (comment-region-function)
(uncomment-region-function): Pacify byte compiler.
* vc.el (vc-diff-internal): Remove code for an old version of
gnus.
2007-11-08 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-maybe-open-connection): Use a local copy of
......
......@@ -165,7 +165,7 @@ the value of this variable and the variables `ediff-help-message-*' in
(define-key
ediff-help-region-map
(if ediff-emacs-p [mouse-2] [button2])
(if (featurep 'emacs) [mouse-2] [button2])
'ediff-help-for-quick-help)
;; runs in the control buffer
......@@ -177,7 +177,7 @@ the value of this variable and the variables `ediff-help-message-*' in
end (match-end 0)
cmd (buffer-substring (match-beginning 1) (match-end 1)))
(setq overl (ediff-make-overlay beg end))
(if ediff-emacs-p
(if (featurep 'emacs)
(ediff-overlay-put overl 'mouse-face 'highlight)
(ediff-overlay-put overl 'highlight t))
(ediff-overlay-put overl 'ediff-help-info cmd))))
......
......@@ -43,11 +43,6 @@
(load "ange-ftp" 'noerror)))
;; end pacifier
;; Is it XEmacs?
(defconst ediff-xemacs-p (featurep 'xemacs))
;; Is it Emacs?
(defconst ediff-emacs-p (not ediff-xemacs-p))
;; 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
......@@ -78,8 +73,8 @@ that Ediff doesn't know about.")
(cond ((ediff-window-display-p))
(ediff-force-faces)
((ediff-color-display-p))
(ediff-emacs-p (memq (ediff-device-type) '(pc)))
(ediff-xemacs-p (memq (ediff-device-type) '(tty pc)))
((featurep 'emacs) (memq (ediff-device-type) '(pc)))
((featurep 'xemacs) (memq (ediff-device-type) '(tty pc)))
))
;; toolbar support for emacs hasn't been implemented in ediff
......@@ -506,7 +501,7 @@ set local variables that determine how the display looks like."
*** of %sEmacs, does not seem to be properly installed.
***
*** Please contact your system administrator. "
(if ediff-xemacs-p "X" "")))
(if (featurep 'xemacs) "X" "")))
;; Selective browsing
......@@ -785,8 +780,8 @@ to temp files when Ediff needs to find fine differences."
;; testing for sufficiently high Emacs versions.
(defun ediff-check-version (op major minor &optional type-of-emacs)
(if (and (boundp 'emacs-major-version) (boundp 'emacs-minor-version))
(and (cond ((eq type-of-emacs 'xemacs) ediff-xemacs-p)
((eq type-of-emacs 'emacs) ediff-emacs-p)
(and (cond ((eq type-of-emacs 'xemacs) (featurep 'xemacs))
((eq type-of-emacs 'emacs) (featurep 'emacs))
(t t))
(cond ((eq op '=) (and (= emacs-minor-version minor)
(= emacs-major-version major)))
......@@ -908,7 +903,7 @@ to temp files when Ediff needs to find fine differences."
(defface ediff-current-diff-A
(if ediff-emacs-p
(if (featurep 'emacs)
'((((class color) (min-colors 16))
(:foreground "firebrick" :background "pale green"))
(((class color))
......@@ -929,7 +924,7 @@ this variable represents.")
(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
(if (and (featurep 'xemacs)
(ediff-has-face-support-p)
(not (ediff-color-display-p)))
(copy-face 'modeline ediff-current-diff-face-A))
......@@ -937,7 +932,7 @@ this variable represents.")
(defface ediff-current-diff-B
(if ediff-emacs-p
(if (featurep 'emacs)
'((((class color) (min-colors 16))
(:foreground "DarkOrchid" :background "Yellow"))
(((class color))
......@@ -960,14 +955,14 @@ this variable represents.")
(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
(if (and (featurep 'xemacs)
(ediff-has-face-support-p)
(not (ediff-color-display-p)))
(copy-face 'modeline ediff-current-diff-face-B))
(defface ediff-current-diff-C
(if ediff-emacs-p
(if (featurep 'emacs)
'((((class color) (min-colors 16))
(:foreground "Navy" :background "Pink"))
(((class color))
......@@ -988,14 +983,14 @@ this variable represents.")
(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
(if (and (featurep 'xemacs)
(ediff-has-face-support-p)
(not (ediff-color-display-p)))
(copy-face 'modeline ediff-current-diff-face-C))
(defface ediff-current-diff-Ancestor
(if ediff-emacs-p
(if (featurep 'emacs)
'((((class color) (min-colors 16))
(:foreground "Black" :background "VioletRed"))
(((class color))
......@@ -1016,14 +1011,14 @@ this variable represents.")
(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
(if (and (featurep 'xemacs)
(ediff-has-face-support-p)
(not (ediff-color-display-p)))
(copy-face 'modeline ediff-current-diff-face-Ancestor))
(defface ediff-fine-diff-A
(if ediff-emacs-p
(if (featurep 'emacs)
'((((class color) (min-colors 16))
(:foreground "Navy" :background "sky blue"))
(((class color))
......@@ -1044,7 +1039,7 @@ this variable represents.")
(ediff-hide-face ediff-fine-diff-face-A)
(defface ediff-fine-diff-B
(if ediff-emacs-p
(if (featurep 'emacs)
'((((class color) (min-colors 16))
(:foreground "Black" :background "cyan"))
(((class color))
......@@ -1065,7 +1060,7 @@ this variable represents.")
(ediff-hide-face ediff-fine-diff-face-B)
(defface ediff-fine-diff-C
(if ediff-emacs-p
(if (featurep 'emacs)
'((((type pc))
(:foreground "white" :background "Turquoise"))
(((class color) (min-colors 16))
......@@ -1091,7 +1086,7 @@ this variable represents.")
(ediff-hide-face ediff-fine-diff-face-C)
(defface ediff-fine-diff-Ancestor
(if ediff-emacs-p
(if (featurep 'emacs)
'((((class color) (min-colors 16))
(:foreground "Black" :background "Green"))
(((class color))
......@@ -1123,7 +1118,7 @@ this variable represents.")
(t "Stipple")))
(defface ediff-even-diff-A
(if ediff-emacs-p
(if (featurep 'emacs)
`((((type pc))
(:foreground "green3" :background "light grey"))
(((class color) (min-colors 16))
......@@ -1149,7 +1144,7 @@ this variable represents.")
(ediff-hide-face ediff-even-diff-face-A)
(defface ediff-even-diff-B
(if ediff-emacs-p
(if (featurep 'emacs)
`((((class color) (min-colors 16))
(:foreground "White" :background "Grey"))
(((class color))
......@@ -1170,7 +1165,7 @@ this variable represents.")
(ediff-hide-face ediff-even-diff-face-B)
(defface ediff-even-diff-C
(if ediff-emacs-p
(if (featurep 'emacs)
`((((type pc))
(:foreground "yellow3" :background "light grey"))
(((class color) (min-colors 16))
......@@ -1196,7 +1191,7 @@ this variable represents.")
(ediff-hide-face ediff-even-diff-face-C)
(defface ediff-even-diff-Ancestor
(if ediff-emacs-p
(if (featurep 'emacs)
`((((type pc))
(:foreground "cyan3" :background "light grey"))
(((class color) (min-colors 16))
......@@ -1229,7 +1224,7 @@ this variable represents.")
(Ancestor . ediff-even-diff-Ancestor)))
(defface ediff-odd-diff-A
(if ediff-emacs-p
(if (featurep 'emacs)
'((((type pc))
(:foreground "green3" :background "gray40"))
(((class color) (min-colors 16))
......@@ -1254,7 +1249,7 @@ this variable represents.")
(defface ediff-odd-diff-B
(if ediff-emacs-p
(if (featurep 'emacs)
'((((type pc))
(:foreground "White" :background "gray40"))
(((class color) (min-colors 16))
......@@ -1278,7 +1273,7 @@ this variable represents.")
(ediff-hide-face ediff-odd-diff-face-B)
(defface ediff-odd-diff-C
(if ediff-emacs-p
(if (featurep 'emacs)
'((((type pc))
(:foreground "yellow3" :background "gray40"))
(((class color) (min-colors 16))
......@@ -1302,7 +1297,7 @@ this variable represents.")
(ediff-hide-face ediff-odd-diff-face-C)
(defface ediff-odd-diff-Ancestor
(if ediff-emacs-p
(if (featurep 'emacs)
'((((class color) (min-colors 16))
(:foreground "cyan3" :background "gray40"))
(((class color))
......@@ -1630,7 +1625,7 @@ This default should work without changes."
(or frame (setq frame (selected-frame)))
(if (ediff-window-display-p)
(let ((frame-or-wind frame))
(if ediff-xemacs-p
(if (featurep 'xemacs)
(setq frame-or-wind (frame-selected-window frame)))
(or do-not-grab-mouse
;; don't set mouse if the user said to never do this
......
......@@ -404,7 +404,7 @@ Toggled by ediff-toggle-verbose-help-meta-buffer" )
(define-key ediff-meta-buffer-map "=h" 'ediff-meta-mark-equal-files)))
(if ediff-no-emacs-help-in-control-buffer
(define-key ediff-meta-buffer-map "\C-h" 'ediff-previous-meta-item))
(if ediff-emacs-p
(if (featurep 'emacs)
(define-key ediff-meta-buffer-map [mouse-2] ediff-meta-action-function)
(define-key ediff-meta-buffer-map [button2] ediff-meta-action-function))
......@@ -448,7 +448,7 @@ Commands:
(define-key ediff-dir-diffs-buffer-map "\C-?" 'previous-line)
(define-key ediff-dir-diffs-buffer-map "p" 'previous-line)
(define-key ediff-dir-diffs-buffer-map "C" 'ediff-dir-diff-copy-file)
(if ediff-emacs-p
(if (featurep 'emacs)
(define-key ediff-dir-diffs-buffer-map [mouse-2] 'ediff-dir-diff-copy-file)
(define-key ediff-dir-diffs-buffer-map [button2] 'ediff-dir-diff-copy-file))
(define-key ediff-dir-diffs-buffer-map [delete] 'previous-line)
......@@ -1493,7 +1493,7 @@ Useful commands:
(defun ediff-set-meta-overlay (b e prop &optional session-number hidden)
(let (overl)
(setq overl (ediff-make-overlay b e))
(if ediff-emacs-p
(if (featurep 'emacs)
(ediff-overlay-put overl 'mouse-face 'highlight)
(ediff-overlay-put overl 'highlight t))
(ediff-overlay-put overl 'ediff-meta-info prop)
......
......@@ -38,7 +38,6 @@
(defvar bottom-toolbar-visible-p)
(defvar bottom-toolbar-height)
(defvar mark-active)
(defvar ediff-emacs-p)
(defvar ediff-after-quit-hook-internal nil)
......@@ -64,7 +63,7 @@
(or (featurep 'ediff)
(load "ediff.el" nil nil 'nosuffix))
(or (featurep 'ediff-tbar)
ediff-emacs-p
(featurep 'emacs)
(load "ediff-tbar.el" 'noerror nil 'nosuffix))
))
;; end pacifier
......@@ -77,7 +76,7 @@
(require 'ediff-diff)
(require 'ediff-merg)
(if ediff-xemacs-p
(if (featurep 'xemacs)
(require 'ediff-tbar))
......@@ -154,7 +153,7 @@ to invocation.")
(suppress-keymap ediff-mode-map)
(define-key ediff-mode-map
(if ediff-emacs-p [mouse-2] [button2]) 'ediff-help-for-quick-help)
(if (featurep 'emacs) [mouse-2] [button2]) 'ediff-help-for-quick-help)
(define-key ediff-mode-map "\C-m" 'ediff-help-for-quick-help)
(define-key ediff-mode-map "p" 'ediff-previous-difference)
......@@ -1275,7 +1274,7 @@ This is especially useful when comparing buffers side-by-side."
(ediff-barf-if-not-control-buffer)
(or (ediff-window-display-p)
(error "%sEmacs is not running as a window application"
(if ediff-emacs-p "" "X")))
(if (featurep 'emacs) "" "X")))
(ediff-recenter 'no-rehighlight) ; make sure buffs are displayed in windows
(let ((ctl-buf ediff-control-buffer))
(setq ediff-wide-display-p (not ediff-wide-display-p))
......@@ -1283,7 +1282,7 @@ This is especially useful when comparing buffers side-by-side."
(ediff-with-current-buffer ctl-buf
(modify-frame-parameters
ediff-wide-display-frame ediff-wide-display-orig-parameters)
;;(sit-for (if ediff-xemacs-p 0.4 0))
;;(sit-for (if (featurep 'xemacs) 0.4 0))
;; restore control buf, since ctl window may have been deleted
;; during resizing
(set-buffer ctl-buf)
......@@ -1291,7 +1290,7 @@ This is especially useful when comparing buffers side-by-side."
ediff-window-B nil) ; force update of window config
(ediff-recenter 'no-rehighlight))
(funcall ediff-make-wide-display-function)
;;(sit-for (if ediff-xemacs-p 0.4 0))
;;(sit-for (if (featurep 'xemacs) 0.4 0))
(ediff-with-current-buffer ctl-buf
(setq ediff-window-B nil) ; force update of window config
(ediff-recenter 'no-rehighlight)))))
......@@ -1305,7 +1304,7 @@ which see."
(let (window-setup-func)
(or (ediff-window-display-p)
(error "%sEmacs is not running as a window application"
(if ediff-emacs-p "" "X")))
(if (featurep 'emacs) "" "X")))
(cond ((eq ediff-window-setup-function 'ediff-setup-windows-multiframe)
(setq window-setup-func 'ediff-setup-windows-plain))
......@@ -1335,7 +1334,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see."
(progn
(or (ediff-window-display-p)
(error "%sEmacs is not running as a window application"
(if ediff-emacs-p "" "X")))
(if (featurep 'emacs) "" "X")))
(if (ediff-use-toolbar-p)
(ediff-kill-bottom-toolbar))
;; do this only after killing the toolbar
......@@ -2529,7 +2528,7 @@ temporarily reverses the meaning of this variable."
(cond ((ediff-good-frame-under-mouse))
(t warp-frame)))
(if (and (ediff-window-display-p) (frame-live-p warp-frame) ediff-grab-mouse)
(set-mouse-position (if ediff-emacs-p
(set-mouse-position (if (featurep 'emacs)
warp-frame
(frame-selected-window warp-frame))
2 1))
......@@ -2544,11 +2543,11 @@ temporarily reverses the meaning of this variable."
(buf-name "")
frame obj-ok)
(setq obj-ok
(if ediff-emacs-p
(if (featurep 'emacs)
(frame-live-p frame-or-win)
(window-live-p frame-or-win)))
(if obj-ok
(setq frame (if ediff-emacs-p frame-or-win (window-frame frame-or-win))
(setq frame (if (featurep 'emacs) frame-or-win (window-frame frame-or-win))
buf-name
(buffer-name (window-buffer (frame-selected-window frame)))))
(if (string-match "Minibuf" buf-name)
......@@ -3031,7 +3030,7 @@ Hit \\[ediff-recenter] to reset the windows afterward."
(ediff-get-symbol-from-alist
buf-type ediff-current-diff-overlay-alist))))
(if ediff-xemacs-p
(if (featurep 'xemacs)
(ediff-move-overlay current-diff-overlay begin end-hilit)
(ediff-move-overlay current-diff-overlay begin end-hilit buff))
(ediff-overlay-put current-diff-overlay 'priority
......@@ -3611,11 +3610,11 @@ Ediff Control Panel to restore highlighting."
(defun ediff-remove-flags-from-buffer (buffer overlay)
(ediff-with-current-buffer buffer
(let ((inhibit-read-only t))
(if ediff-xemacs-p
(if (featurep 'xemacs)
(ediff-overlay-put overlay 'begin-glyph nil)
(ediff-overlay-put overlay 'before-string nil))
(if ediff-xemacs-p
(if (featurep 'xemacs)
(ediff-overlay-put overlay 'end-glyph nil)
(ediff-overlay-put overlay 'after-string nil))
)))
......@@ -3643,7 +3642,7 @@ Ediff Control Panel to restore highlighting."
ediff-before-flag-bol ediff-before-flag-mol))))
;; insert the flag itself
(if ediff-xemacs-p
(if (featurep 'xemacs)
(ediff-overlay-put curr-overl 'begin-glyph flag)
(ediff-overlay-put curr-overl 'before-string flag))
......@@ -3659,7 +3658,7 @@ Ediff Control Panel to restore highlighting."
ediff-after-flag-eol ediff-after-flag-mol))))
;; insert the flag itself
(if ediff-xemacs-p
(if (featurep 'xemacs)
(ediff-overlay-put curr-overl 'end-glyph flag)
(ediff-overlay-put curr-overl 'after-string flag))
))
......@@ -3786,10 +3785,10 @@ Ediff Control Panel to restore highlighting."
;; never detach
(ediff-overlay-put
overl (if ediff-emacs-p 'evaporate 'detachable) nil)
overl (if (featurep 'emacs) 'evaporate 'detachable) nil)
;; make overlay open-ended
;; In emacs, it is made open ended at creation time
(if ediff-xemacs-p
(if (featurep 'xemacs)
(progn
(ediff-overlay-put overl 'start-open nil)
(ediff-overlay-put overl 'end-open nil)))
......
......@@ -39,7 +39,6 @@
(defvar top-gutter)
(defvar frame-icon-title-format)
(defvar ediff-diff-status)
(defvar ediff-emacs-p)
(eval-when-compile
(let ((load-path (cons (expand-file-name ".") load-path)))
......@@ -50,7 +49,7 @@
(or (featurep 'ediff-help)
(load "ediff-help.el" nil nil 'nosuffix))
(or (featurep 'ediff-tbar)
ediff-emacs-p
(featurep 'emacs)
(load "ediff-tbar.el" 'noerror nil 'nosuffix))
))
;; end pacifier
......@@ -58,7 +57,7 @@
(require 'ediff-init)
;; be careful with ediff-tbar
(if ediff-xemacs-p
(if (featurep 'xemacs)
(condition-case nil
(require 'ediff-tbar)
(error
......@@ -213,7 +212,7 @@ customization of the default control frame positioning."
:type 'integer
:group 'ediff-window)
(defcustom ediff-narrow-control-frame-leftward-shift (if ediff-xemacs-p 7 3)
(defcustom ediff-narrow-control-frame-leftward-shift (if (featurep 'xemacs) 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,
......@@ -380,7 +379,7 @@ into icons, regardless of the window manager."
;; XEmacs used to have a lot of trouble with display
;; It did't set things right unless we tell it to sit still
;; 19.12 seems ok.
;;(if ediff-xemacs-p (sit-for 0))
;;(if (featurep 'xemacs) (sit-for 0))
(split-window-vertically (max 2 (- (window-height) merge-window-lines)))
(if (eq (selected-window) wind-A)
......@@ -443,7 +442,7 @@ into icons, regardless of the window manager."
;; XEmacs used to have a lot of trouble with display
;; It did't set things right unless we told it to sit still
;; 19.12 seems ok.
;;(if ediff-xemacs-p (sit-for 0))
;;(if (featurep 'xemacs) (sit-for 0))
(funcall split-window-function wind-width-or-height)
......@@ -1043,7 +1042,7 @@ into icons, regardless of the window manager."
(or (eq this-command 'ediff-quit)
(not (eq ediff-grab-mouse t)))))
(if ediff-xemacs-p
(if (featurep 'xemacs)
(ediff-with-current-buffer ctl-buffer
(ediff-cond-compile-for-xemacs-or-emacs
(make-local-hook 'select-frame-hook) ; xemacs
......@@ -1238,7 +1237,7 @@ It assumes that it is called from within the control buffer."
(defun ediff-refresh-control-frame ()
(if ediff-emacs-p
(if (featurep 'emacs)
;; set frame/icon titles for Emacs
(modify-frame-parameters
ediff-control-frame
......@@ -1288,7 +1287,7 @@ It assumes that it is called from within the control buffer."
;; If buff is not live, return nil
(defun ediff-get-visible-buffer-window (buff)
(if (ediff-buffer-live-p buff)
(if ediff-xemacs-p
(if (featurep 'xemacs)
(get-buffer-window buff t)
(get-buffer-window buff 'visible))))
......
......@@ -1440,7 +1440,7 @@ With optional NODE, goes to that node."
(condition-case nil
(progn
(pop-to-buffer (get-buffer-create "*info*"))
(info (if ediff-xemacs-p "ediff.info" "ediff"))
(info (if (featurep 'xemacs) "ediff.info" "ediff"))
(if node
(Info-goto-node node)
(message "Type `i' to search for a specific topic"))
......
......@@ -834,7 +834,7 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
viper-emacs-kbd-minor-mode
ch)
(cond ((and viper-special-input-method
viper-emacs-p
(featurep 'emacs)
(fboundp 'quail-input-method))
;; (let ...) is used to restore unread-command-events to the
;; original state. We don't want anything left in there after
......@@ -861,7 +861,7 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
(1- (length quail-current-str)))))
))
((and viper-special-input-method
viper-xemacs-p
(featurep 'xemacs)
(fboundp 'quail-start-translation))
;; same as above but for XEmacs, which doesn't have
;; quail-input-method
......@@ -893,7 +893,7 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
(t
;;(setq ch (read-char-exclusive))
(setq ch (aref (read-key-sequence nil) 0))
(if viper-xemacs-p
(if (featurep 'xemacs)
(setq ch (event-to-character ch)))
;; replace ^M with the newline
(if (eq ch ?\C-m) (setq ch ?\n))
......@@ -902,13 +902,13 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
(progn
;;(setq ch (read-char-exclusive))
(setq ch (aref (read-key-sequence nil) 0))
(if viper-xemacs-p
(if (featurep 'xemacs)
(setq ch (event-to-character ch))))
)
(insert ch))
)
(setq last-command-event
(viper-copy-event (if viper-xemacs-p
(viper-copy-event (if (featurep 'xemacs)
(character-to-event ch) ch)))
) ; let
(error nil)
......@@ -1080,10 +1080,10 @@ as a Meta key and any number of multiple escapes is allowed."
;; and return ESC as the key-sequence
(viper-set-unread-command-events (viper-subseq keyseq 1))
(setq last-input-event event
keyseq (if viper-emacs-p
keyseq (if (featurep 'emacs)
"\e"
(vector (character-to-event ?\e)))))
((and viper-xemacs-p
((and (featurep 'xemacs)
(key-press-event-p first-key)
(equal '(meta) key-mod))
(viper-set-unread-command-events
......@@ -1320,7 +1320,7 @@ as a Meta key and any number of multiple escapes is allowed."
(setq last-command-char char)
(setq last-command-event
(viper-copy-event
(if viper-xemacs-p (character-to-event char) char)))