* 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.
This commit is contained in:
Dan Nicolaescu 2007-11-09 05:20:57 +00:00
parent 1da7a8c539
commit e83d1fe875
16 changed files with 230 additions and 193 deletions

View file

@ -1,3 +1,64 @@
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> 2007-11-08 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-maybe-open-connection): Use a local copy of * net/tramp.el (tramp-maybe-open-connection): Use a local copy of

View file

@ -165,7 +165,7 @@ the value of this variable and the variables `ediff-help-message-*' in
(define-key (define-key
ediff-help-region-map ediff-help-region-map
(if ediff-emacs-p [mouse-2] [button2]) (if (featurep 'emacs) [mouse-2] [button2])
'ediff-help-for-quick-help) 'ediff-help-for-quick-help)
;; runs in the control buffer ;; 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) end (match-end 0)
cmd (buffer-substring (match-beginning 1) (match-end 1))) cmd (buffer-substring (match-beginning 1) (match-end 1)))
(setq overl (ediff-make-overlay beg end)) (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 'mouse-face 'highlight)
(ediff-overlay-put overl 'highlight t)) (ediff-overlay-put overl 'highlight t))
(ediff-overlay-put overl 'ediff-help-info cmd)))) (ediff-overlay-put overl 'ediff-help-info cmd))))

View file

@ -43,11 +43,6 @@
(load "ange-ftp" 'noerror))) (load "ange-ftp" 'noerror)))
;; end pacifier ;; 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 ;; This is used to avoid compilation warnings. When emacs/xemacs forms can
;; generate compile time warnings, we use this macro. ;; generate compile time warnings, we use this macro.
;; In this case, the macro will expand into the form that is appropriate to the ;; 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)) (cond ((ediff-window-display-p))
(ediff-force-faces) (ediff-force-faces)
((ediff-color-display-p)) ((ediff-color-display-p))
(ediff-emacs-p (memq (ediff-device-type) '(pc))) ((featurep 'emacs) (memq (ediff-device-type) '(pc)))
(ediff-xemacs-p (memq (ediff-device-type) '(tty pc))) ((featurep 'xemacs) (memq (ediff-device-type) '(tty pc)))
)) ))
;; toolbar support for emacs hasn't been implemented in ediff ;; 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. *** of %sEmacs, does not seem to be properly installed.
*** ***
*** Please contact your system administrator. " *** Please contact your system administrator. "
(if ediff-xemacs-p "X" ""))) (if (featurep 'xemacs) "X" "")))
;; Selective browsing ;; Selective browsing
@ -785,8 +780,8 @@ to temp files when Ediff needs to find fine differences."
;; testing for sufficiently high Emacs versions. ;; testing for sufficiently high Emacs versions.
(defun ediff-check-version (op major minor &optional type-of-emacs) (defun ediff-check-version (op major minor &optional type-of-emacs)
(if (and (boundp 'emacs-major-version) (boundp 'emacs-minor-version)) (if (and (boundp 'emacs-major-version) (boundp 'emacs-minor-version))
(and (cond ((eq type-of-emacs 'xemacs) ediff-xemacs-p) (and (cond ((eq type-of-emacs 'xemacs) (featurep 'xemacs))
((eq type-of-emacs 'emacs) ediff-emacs-p) ((eq type-of-emacs 'emacs) (featurep 'emacs))
(t t)) (t t))
(cond ((eq op '=) (and (= emacs-minor-version minor) (cond ((eq op '=) (and (= emacs-minor-version minor)
(= emacs-major-version major))) (= emacs-major-version major)))
@ -908,7 +903,7 @@ to temp files when Ediff needs to find fine differences."
(defface ediff-current-diff-A (defface ediff-current-diff-A
(if ediff-emacs-p (if (featurep 'emacs)
'((((class color) (min-colors 16)) '((((class color) (min-colors 16))
(:foreground "firebrick" :background "pale green")) (:foreground "firebrick" :background "pale green"))
(((class color)) (((class color))
@ -929,7 +924,7 @@ this variable represents.")
(ediff-hide-face ediff-current-diff-face-A) (ediff-hide-face ediff-current-diff-face-A)
;; Until custom.el for XEmacs starts supporting :inverse-video we do this. ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
;; This means that some user customization may be trashed. ;; This means that some user customization may be trashed.
(if (and ediff-xemacs-p (if (and (featurep 'xemacs)
(ediff-has-face-support-p) (ediff-has-face-support-p)
(not (ediff-color-display-p))) (not (ediff-color-display-p)))
(copy-face 'modeline ediff-current-diff-face-A)) (copy-face 'modeline ediff-current-diff-face-A))
@ -937,7 +932,7 @@ this variable represents.")
(defface ediff-current-diff-B (defface ediff-current-diff-B
(if ediff-emacs-p (if (featurep 'emacs)
'((((class color) (min-colors 16)) '((((class color) (min-colors 16))
(:foreground "DarkOrchid" :background "Yellow")) (:foreground "DarkOrchid" :background "Yellow"))
(((class color)) (((class color))
@ -960,14 +955,14 @@ this variable represents.")
(ediff-hide-face ediff-current-diff-face-B) (ediff-hide-face ediff-current-diff-face-B)
;; Until custom.el for XEmacs starts supporting :inverse-video we do this. ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
;; This means that some user customization may be trashed. ;; This means that some user customization may be trashed.
(if (and ediff-xemacs-p (if (and (featurep 'xemacs)
(ediff-has-face-support-p) (ediff-has-face-support-p)
(not (ediff-color-display-p))) (not (ediff-color-display-p)))
(copy-face 'modeline ediff-current-diff-face-B)) (copy-face 'modeline ediff-current-diff-face-B))
(defface ediff-current-diff-C (defface ediff-current-diff-C
(if ediff-emacs-p (if (featurep 'emacs)
'((((class color) (min-colors 16)) '((((class color) (min-colors 16))
(:foreground "Navy" :background "Pink")) (:foreground "Navy" :background "Pink"))
(((class color)) (((class color))
@ -988,14 +983,14 @@ this variable represents.")
(ediff-hide-face ediff-current-diff-face-C) (ediff-hide-face ediff-current-diff-face-C)
;; Until custom.el for XEmacs starts supporting :inverse-video we do this. ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
;; This means that some user customization may be trashed. ;; This means that some user customization may be trashed.
(if (and ediff-xemacs-p (if (and (featurep 'xemacs)
(ediff-has-face-support-p) (ediff-has-face-support-p)
(not (ediff-color-display-p))) (not (ediff-color-display-p)))
(copy-face 'modeline ediff-current-diff-face-C)) (copy-face 'modeline ediff-current-diff-face-C))
(defface ediff-current-diff-Ancestor (defface ediff-current-diff-Ancestor
(if ediff-emacs-p (if (featurep 'emacs)
'((((class color) (min-colors 16)) '((((class color) (min-colors 16))
(:foreground "Black" :background "VioletRed")) (:foreground "Black" :background "VioletRed"))
(((class color)) (((class color))
@ -1016,14 +1011,14 @@ this variable represents.")
(ediff-hide-face ediff-current-diff-face-Ancestor) (ediff-hide-face ediff-current-diff-face-Ancestor)
;; Until custom.el for XEmacs starts supporting :inverse-video we do this. ;; Until custom.el for XEmacs starts supporting :inverse-video we do this.
;; This means that some user customization may be trashed. ;; This means that some user customization may be trashed.
(if (and ediff-xemacs-p (if (and (featurep 'xemacs)
(ediff-has-face-support-p) (ediff-has-face-support-p)
(not (ediff-color-display-p))) (not (ediff-color-display-p)))
(copy-face 'modeline ediff-current-diff-face-Ancestor)) (copy-face 'modeline ediff-current-diff-face-Ancestor))
(defface ediff-fine-diff-A (defface ediff-fine-diff-A
(if ediff-emacs-p (if (featurep 'emacs)
'((((class color) (min-colors 16)) '((((class color) (min-colors 16))
(:foreground "Navy" :background "sky blue")) (:foreground "Navy" :background "sky blue"))
(((class color)) (((class color))
@ -1044,7 +1039,7 @@ this variable represents.")
(ediff-hide-face ediff-fine-diff-face-A) (ediff-hide-face ediff-fine-diff-face-A)
(defface ediff-fine-diff-B (defface ediff-fine-diff-B
(if ediff-emacs-p (if (featurep 'emacs)
'((((class color) (min-colors 16)) '((((class color) (min-colors 16))
(:foreground "Black" :background "cyan")) (:foreground "Black" :background "cyan"))
(((class color)) (((class color))
@ -1065,7 +1060,7 @@ this variable represents.")
(ediff-hide-face ediff-fine-diff-face-B) (ediff-hide-face ediff-fine-diff-face-B)
(defface ediff-fine-diff-C (defface ediff-fine-diff-C
(if ediff-emacs-p (if (featurep 'emacs)
'((((type pc)) '((((type pc))
(:foreground "white" :background "Turquoise")) (:foreground "white" :background "Turquoise"))
(((class color) (min-colors 16)) (((class color) (min-colors 16))
@ -1091,7 +1086,7 @@ this variable represents.")
(ediff-hide-face ediff-fine-diff-face-C) (ediff-hide-face ediff-fine-diff-face-C)
(defface ediff-fine-diff-Ancestor (defface ediff-fine-diff-Ancestor
(if ediff-emacs-p (if (featurep 'emacs)
'((((class color) (min-colors 16)) '((((class color) (min-colors 16))
(:foreground "Black" :background "Green")) (:foreground "Black" :background "Green"))
(((class color)) (((class color))
@ -1123,7 +1118,7 @@ this variable represents.")
(t "Stipple"))) (t "Stipple")))
(defface ediff-even-diff-A (defface ediff-even-diff-A
(if ediff-emacs-p (if (featurep 'emacs)
`((((type pc)) `((((type pc))
(:foreground "green3" :background "light grey")) (:foreground "green3" :background "light grey"))
(((class color) (min-colors 16)) (((class color) (min-colors 16))
@ -1149,7 +1144,7 @@ this variable represents.")
(ediff-hide-face ediff-even-diff-face-A) (ediff-hide-face ediff-even-diff-face-A)
(defface ediff-even-diff-B (defface ediff-even-diff-B
(if ediff-emacs-p (if (featurep 'emacs)
`((((class color) (min-colors 16)) `((((class color) (min-colors 16))
(:foreground "White" :background "Grey")) (:foreground "White" :background "Grey"))
(((class color)) (((class color))
@ -1170,7 +1165,7 @@ this variable represents.")
(ediff-hide-face ediff-even-diff-face-B) (ediff-hide-face ediff-even-diff-face-B)
(defface ediff-even-diff-C (defface ediff-even-diff-C
(if ediff-emacs-p (if (featurep 'emacs)
`((((type pc)) `((((type pc))
(:foreground "yellow3" :background "light grey")) (:foreground "yellow3" :background "light grey"))
(((class color) (min-colors 16)) (((class color) (min-colors 16))
@ -1196,7 +1191,7 @@ this variable represents.")
(ediff-hide-face ediff-even-diff-face-C) (ediff-hide-face ediff-even-diff-face-C)
(defface ediff-even-diff-Ancestor (defface ediff-even-diff-Ancestor
(if ediff-emacs-p (if (featurep 'emacs)
`((((type pc)) `((((type pc))
(:foreground "cyan3" :background "light grey")) (:foreground "cyan3" :background "light grey"))
(((class color) (min-colors 16)) (((class color) (min-colors 16))
@ -1229,7 +1224,7 @@ this variable represents.")
(Ancestor . ediff-even-diff-Ancestor))) (Ancestor . ediff-even-diff-Ancestor)))
(defface ediff-odd-diff-A (defface ediff-odd-diff-A
(if ediff-emacs-p (if (featurep 'emacs)
'((((type pc)) '((((type pc))
(:foreground "green3" :background "gray40")) (:foreground "green3" :background "gray40"))
(((class color) (min-colors 16)) (((class color) (min-colors 16))
@ -1254,7 +1249,7 @@ this variable represents.")
(defface ediff-odd-diff-B (defface ediff-odd-diff-B
(if ediff-emacs-p (if (featurep 'emacs)
'((((type pc)) '((((type pc))
(:foreground "White" :background "gray40")) (:foreground "White" :background "gray40"))
(((class color) (min-colors 16)) (((class color) (min-colors 16))
@ -1278,7 +1273,7 @@ this variable represents.")
(ediff-hide-face ediff-odd-diff-face-B) (ediff-hide-face ediff-odd-diff-face-B)
(defface ediff-odd-diff-C (defface ediff-odd-diff-C
(if ediff-emacs-p (if (featurep 'emacs)
'((((type pc)) '((((type pc))
(:foreground "yellow3" :background "gray40")) (:foreground "yellow3" :background "gray40"))
(((class color) (min-colors 16)) (((class color) (min-colors 16))
@ -1302,7 +1297,7 @@ this variable represents.")
(ediff-hide-face ediff-odd-diff-face-C) (ediff-hide-face ediff-odd-diff-face-C)
(defface ediff-odd-diff-Ancestor (defface ediff-odd-diff-Ancestor
(if ediff-emacs-p (if (featurep 'emacs)
'((((class color) (min-colors 16)) '((((class color) (min-colors 16))
(:foreground "cyan3" :background "gray40")) (:foreground "cyan3" :background "gray40"))
(((class color)) (((class color))
@ -1630,7 +1625,7 @@ This default should work without changes."
(or frame (setq frame (selected-frame))) (or frame (setq frame (selected-frame)))
(if (ediff-window-display-p) (if (ediff-window-display-p)
(let ((frame-or-wind frame)) (let ((frame-or-wind frame))
(if ediff-xemacs-p (if (featurep 'xemacs)
(setq frame-or-wind (frame-selected-window frame))) (setq frame-or-wind (frame-selected-window frame)))
(or do-not-grab-mouse (or do-not-grab-mouse
;; don't set mouse if the user said to never do this ;; don't set mouse if the user said to never do this

View file

@ -404,7 +404,7 @@ Toggled by ediff-toggle-verbose-help-meta-buffer" )
(define-key ediff-meta-buffer-map "=h" 'ediff-meta-mark-equal-files))) (define-key ediff-meta-buffer-map "=h" 'ediff-meta-mark-equal-files)))
(if ediff-no-emacs-help-in-control-buffer (if ediff-no-emacs-help-in-control-buffer
(define-key ediff-meta-buffer-map "\C-h" 'ediff-previous-meta-item)) (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 [mouse-2] ediff-meta-action-function)
(define-key ediff-meta-buffer-map [button2] 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 "\C-?" 'previous-line)
(define-key ediff-dir-diffs-buffer-map "p" '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) (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 [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 [button2] 'ediff-dir-diff-copy-file))
(define-key ediff-dir-diffs-buffer-map [delete] 'previous-line) (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) (defun ediff-set-meta-overlay (b e prop &optional session-number hidden)
(let (overl) (let (overl)
(setq overl (ediff-make-overlay b e)) (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 'mouse-face 'highlight)
(ediff-overlay-put overl 'highlight t)) (ediff-overlay-put overl 'highlight t))
(ediff-overlay-put overl 'ediff-meta-info prop) (ediff-overlay-put overl 'ediff-meta-info prop)

View file

@ -38,7 +38,6 @@
(defvar bottom-toolbar-visible-p) (defvar bottom-toolbar-visible-p)
(defvar bottom-toolbar-height) (defvar bottom-toolbar-height)
(defvar mark-active) (defvar mark-active)
(defvar ediff-emacs-p)
(defvar ediff-after-quit-hook-internal nil) (defvar ediff-after-quit-hook-internal nil)
@ -64,7 +63,7 @@
(or (featurep 'ediff) (or (featurep 'ediff)
(load "ediff.el" nil nil 'nosuffix)) (load "ediff.el" nil nil 'nosuffix))
(or (featurep 'ediff-tbar) (or (featurep 'ediff-tbar)
ediff-emacs-p (featurep 'emacs)
(load "ediff-tbar.el" 'noerror nil 'nosuffix)) (load "ediff-tbar.el" 'noerror nil 'nosuffix))
)) ))
;; end pacifier ;; end pacifier
@ -77,7 +76,7 @@
(require 'ediff-diff) (require 'ediff-diff)
(require 'ediff-merg) (require 'ediff-merg)
(if ediff-xemacs-p (if (featurep 'xemacs)
(require 'ediff-tbar)) (require 'ediff-tbar))
@ -154,7 +153,7 @@ to invocation.")
(suppress-keymap ediff-mode-map) (suppress-keymap ediff-mode-map)
(define-key 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 "\C-m" 'ediff-help-for-quick-help)
(define-key ediff-mode-map "p" 'ediff-previous-difference) (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) (ediff-barf-if-not-control-buffer)
(or (ediff-window-display-p) (or (ediff-window-display-p)
(error "%sEmacs is not running as a window application" (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 (ediff-recenter 'no-rehighlight) ; make sure buffs are displayed in windows
(let ((ctl-buf ediff-control-buffer)) (let ((ctl-buf ediff-control-buffer))
(setq ediff-wide-display-p (not ediff-wide-display-p)) (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 (ediff-with-current-buffer ctl-buf
(modify-frame-parameters (modify-frame-parameters
ediff-wide-display-frame ediff-wide-display-orig-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 ;; restore control buf, since ctl window may have been deleted
;; during resizing ;; during resizing
(set-buffer ctl-buf) (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-window-B nil) ; force update of window config
(ediff-recenter 'no-rehighlight)) (ediff-recenter 'no-rehighlight))
(funcall ediff-make-wide-display-function) (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 (ediff-with-current-buffer ctl-buf
(setq ediff-window-B nil) ; force update of window config (setq ediff-window-B nil) ; force update of window config
(ediff-recenter 'no-rehighlight))))) (ediff-recenter 'no-rehighlight)))))
@ -1305,7 +1304,7 @@ which see."
(let (window-setup-func) (let (window-setup-func)
(or (ediff-window-display-p) (or (ediff-window-display-p)
(error "%sEmacs is not running as a window application" (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) (cond ((eq ediff-window-setup-function 'ediff-setup-windows-multiframe)
(setq window-setup-func 'ediff-setup-windows-plain)) (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 (progn
(or (ediff-window-display-p) (or (ediff-window-display-p)
(error "%sEmacs is not running as a window application" (error "%sEmacs is not running as a window application"
(if ediff-emacs-p "" "X"))) (if (featurep 'emacs) "" "X")))
(if (ediff-use-toolbar-p) (if (ediff-use-toolbar-p)
(ediff-kill-bottom-toolbar)) (ediff-kill-bottom-toolbar))
;; do this only after killing the 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)) (cond ((ediff-good-frame-under-mouse))
(t warp-frame))) (t warp-frame)))
(if (and (ediff-window-display-p) (frame-live-p warp-frame) ediff-grab-mouse) (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 warp-frame
(frame-selected-window warp-frame)) (frame-selected-window warp-frame))
2 1)) 2 1))
@ -2544,11 +2543,11 @@ temporarily reverses the meaning of this variable."
(buf-name "") (buf-name "")
frame obj-ok) frame obj-ok)
(setq obj-ok (setq obj-ok
(if ediff-emacs-p (if (featurep 'emacs)
(frame-live-p frame-or-win) (frame-live-p frame-or-win)
(window-live-p frame-or-win))) (window-live-p frame-or-win)))
(if obj-ok (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 buf-name
(buffer-name (window-buffer (frame-selected-window frame))))) (buffer-name (window-buffer (frame-selected-window frame)))))
(if (string-match "Minibuf" buf-name) (if (string-match "Minibuf" buf-name)
@ -3031,7 +3030,7 @@ Hit \\[ediff-recenter] to reset the windows afterward."
(ediff-get-symbol-from-alist (ediff-get-symbol-from-alist
buf-type ediff-current-diff-overlay-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)
(ediff-move-overlay current-diff-overlay begin end-hilit buff)) (ediff-move-overlay current-diff-overlay begin end-hilit buff))
(ediff-overlay-put current-diff-overlay 'priority (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) (defun ediff-remove-flags-from-buffer (buffer overlay)
(ediff-with-current-buffer buffer (ediff-with-current-buffer buffer
(let ((inhibit-read-only t)) (let ((inhibit-read-only t))
(if ediff-xemacs-p (if (featurep 'xemacs)
(ediff-overlay-put overlay 'begin-glyph nil) (ediff-overlay-put overlay 'begin-glyph nil)
(ediff-overlay-put overlay 'before-string 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 'end-glyph nil)
(ediff-overlay-put overlay 'after-string 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)))) ediff-before-flag-bol ediff-before-flag-mol))))
;; insert the flag itself ;; insert the flag itself
(if ediff-xemacs-p (if (featurep 'xemacs)
(ediff-overlay-put curr-overl 'begin-glyph flag) (ediff-overlay-put curr-overl 'begin-glyph flag)
(ediff-overlay-put curr-overl 'before-string 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)))) ediff-after-flag-eol ediff-after-flag-mol))))
;; insert the flag itself ;; insert the flag itself
(if ediff-xemacs-p (if (featurep 'xemacs)
(ediff-overlay-put curr-overl 'end-glyph flag) (ediff-overlay-put curr-overl 'end-glyph flag)
(ediff-overlay-put curr-overl 'after-string flag)) (ediff-overlay-put curr-overl 'after-string flag))
)) ))
@ -3786,10 +3785,10 @@ Ediff Control Panel to restore highlighting."
;; never detach ;; never detach
(ediff-overlay-put (ediff-overlay-put
overl (if ediff-emacs-p 'evaporate 'detachable) nil) overl (if (featurep 'emacs) 'evaporate 'detachable) nil)
;; make overlay open-ended ;; make overlay open-ended
;; In emacs, it is made open ended at creation time ;; In emacs, it is made open ended at creation time
(if ediff-xemacs-p (if (featurep 'xemacs)
(progn (progn
(ediff-overlay-put overl 'start-open nil) (ediff-overlay-put overl 'start-open nil)
(ediff-overlay-put overl 'end-open nil))) (ediff-overlay-put overl 'end-open nil)))

View file

@ -39,7 +39,6 @@
(defvar top-gutter) (defvar top-gutter)
(defvar frame-icon-title-format) (defvar frame-icon-title-format)
(defvar ediff-diff-status) (defvar ediff-diff-status)
(defvar ediff-emacs-p)
(eval-when-compile (eval-when-compile
(let ((load-path (cons (expand-file-name ".") load-path))) (let ((load-path (cons (expand-file-name ".") load-path)))
@ -50,7 +49,7 @@
(or (featurep 'ediff-help) (or (featurep 'ediff-help)
(load "ediff-help.el" nil nil 'nosuffix)) (load "ediff-help.el" nil nil 'nosuffix))
(or (featurep 'ediff-tbar) (or (featurep 'ediff-tbar)
ediff-emacs-p (featurep 'emacs)
(load "ediff-tbar.el" 'noerror nil 'nosuffix)) (load "ediff-tbar.el" 'noerror nil 'nosuffix))
)) ))
;; end pacifier ;; end pacifier
@ -58,7 +57,7 @@
(require 'ediff-init) (require 'ediff-init)
;; be careful with ediff-tbar ;; be careful with ediff-tbar
(if ediff-xemacs-p (if (featurep 'xemacs)
(condition-case nil (condition-case nil
(require 'ediff-tbar) (require 'ediff-tbar)
(error (error
@ -213,7 +212,7 @@ customization of the default control frame positioning."
:type 'integer :type 'integer
:group 'ediff-window) :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. "*The leftward shift of control frame from the right edge of buf A's frame.
Measured in characters. Measured in characters.
This is used by the default control frame positioning function, 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 ;; XEmacs used to have a lot of trouble with display
;; It did't set things right unless we tell it to sit still ;; It did't set things right unless we tell it to sit still
;; 19.12 seems ok. ;; 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))) (split-window-vertically (max 2 (- (window-height) merge-window-lines)))
(if (eq (selected-window) wind-A) (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 ;; XEmacs used to have a lot of trouble with display
;; It did't set things right unless we told it to sit still ;; It did't set things right unless we told it to sit still
;; 19.12 seems ok. ;; 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) (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) (or (eq this-command 'ediff-quit)
(not (eq ediff-grab-mouse t))))) (not (eq ediff-grab-mouse t)))))
(if ediff-xemacs-p (if (featurep 'xemacs)
(ediff-with-current-buffer ctl-buffer (ediff-with-current-buffer ctl-buffer
(ediff-cond-compile-for-xemacs-or-emacs (ediff-cond-compile-for-xemacs-or-emacs
(make-local-hook 'select-frame-hook) ; xemacs (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 () (defun ediff-refresh-control-frame ()
(if ediff-emacs-p (if (featurep 'emacs)
;; set frame/icon titles for Emacs ;; set frame/icon titles for Emacs
(modify-frame-parameters (modify-frame-parameters
ediff-control-frame 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 ;; If buff is not live, return nil
(defun ediff-get-visible-buffer-window (buff) (defun ediff-get-visible-buffer-window (buff)
(if (ediff-buffer-live-p buff) (if (ediff-buffer-live-p buff)
(if ediff-xemacs-p (if (featurep 'xemacs)
(get-buffer-window buff t) (get-buffer-window buff t)
(get-buffer-window buff 'visible)))) (get-buffer-window buff 'visible))))

View file

@ -1440,7 +1440,7 @@ With optional NODE, goes to that node."
(condition-case nil (condition-case nil
(progn (progn
(pop-to-buffer (get-buffer-create "*info*")) (pop-to-buffer (get-buffer-create "*info*"))
(info (if ediff-xemacs-p "ediff.info" "ediff")) (info (if (featurep 'xemacs) "ediff.info" "ediff"))
(if node (if node
(Info-goto-node node) (Info-goto-node node)
(message "Type `i' to search for a specific topic")) (message "Type `i' to search for a specific topic"))

View file

@ -834,7 +834,7 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
viper-emacs-kbd-minor-mode viper-emacs-kbd-minor-mode
ch) ch)
(cond ((and viper-special-input-method (cond ((and viper-special-input-method
viper-emacs-p (featurep 'emacs)
(fboundp 'quail-input-method)) (fboundp 'quail-input-method))
;; (let ...) is used to restore unread-command-events to the ;; (let ...) is used to restore unread-command-events to the
;; original state. We don't want anything left in there after ;; 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))))) (1- (length quail-current-str)))))
)) ))
((and viper-special-input-method ((and viper-special-input-method
viper-xemacs-p (featurep 'xemacs)
(fboundp 'quail-start-translation)) (fboundp 'quail-start-translation))
;; same as above but for XEmacs, which doesn't have ;; same as above but for XEmacs, which doesn't have
;; quail-input-method ;; quail-input-method
@ -893,7 +893,7 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
(t (t
;;(setq ch (read-char-exclusive)) ;;(setq ch (read-char-exclusive))
(setq ch (aref (read-key-sequence nil) 0)) (setq ch (aref (read-key-sequence nil) 0))
(if viper-xemacs-p (if (featurep 'xemacs)
(setq ch (event-to-character ch))) (setq ch (event-to-character ch)))
;; replace ^M with the newline ;; replace ^M with the newline
(if (eq ch ?\C-m) (setq ch ?\n)) (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 (progn
;;(setq ch (read-char-exclusive)) ;;(setq ch (read-char-exclusive))
(setq ch (aref (read-key-sequence nil) 0)) (setq ch (aref (read-key-sequence nil) 0))
(if viper-xemacs-p (if (featurep 'xemacs)
(setq ch (event-to-character ch)))) (setq ch (event-to-character ch))))
) )
(insert ch)) (insert ch))
) )
(setq last-command-event (setq last-command-event
(viper-copy-event (if viper-xemacs-p (viper-copy-event (if (featurep 'xemacs)
(character-to-event ch) ch))) (character-to-event ch) ch)))
) ; let ) ; let
(error nil) (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 ;; and return ESC as the key-sequence
(viper-set-unread-command-events (viper-subseq keyseq 1)) (viper-set-unread-command-events (viper-subseq keyseq 1))
(setq last-input-event event (setq last-input-event event
keyseq (if viper-emacs-p keyseq (if (featurep 'emacs)
"\e" "\e"
(vector (character-to-event ?\e))))) (vector (character-to-event ?\e)))))
((and viper-xemacs-p ((and (featurep 'xemacs)
(key-press-event-p first-key) (key-press-event-p first-key)
(equal '(meta) key-mod)) (equal '(meta) key-mod))
(viper-set-unread-command-events (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-char char)
(setq last-command-event (setq last-command-event
(viper-copy-event (viper-copy-event
(if viper-xemacs-p (character-to-event char) char))) (if (featurep 'xemacs) (character-to-event char) char)))
(condition-case err (condition-case err
(funcall cmd-to-exec-at-end cmd-info) (funcall cmd-to-exec-at-end cmd-info)
(error (error
@ -2791,7 +2791,7 @@ On reaching beginning of line, stop and signal error."
(defun viper-next-line-carefully (arg) (defun viper-next-line-carefully (arg)
(condition-case nil (condition-case nil
;; do not use forward-line! need to keep column ;; do not use forward-line! need to keep column
(next-line arg) (with-no-warnings (next-line arg))
(error nil))) (error nil)))
@ -3091,7 +3091,7 @@ On reaching beginning of line, stop and signal error."
(com (viper-getCom arg))) (com (viper-getCom arg)))
(if com (viper-move-marker-locally 'viper-com-point (point))) (if com (viper-move-marker-locally 'viper-com-point (point)))
;; do not use forward-line! need to keep column ;; do not use forward-line! need to keep column
(next-line val) (with-no-warnings (next-line val))
(if viper-ex-style-motion (if viper-ex-style-motion
(if (and (eolp) (not (bolp))) (backward-char 1))) (if (and (eolp) (not (bolp))) (backward-char 1)))
(setq this-command 'next-line) (setq this-command 'next-line)
@ -3135,7 +3135,7 @@ If point is on a widget or a button, simulate clicking on that widget/button."
(com (viper-getCom arg))) (com (viper-getCom arg)))
(if com (viper-move-marker-locally 'viper-com-point (point))) (if com (viper-move-marker-locally 'viper-com-point (point)))
;; do not use forward-line! need to keep column ;; do not use forward-line! need to keep column
(previous-line val) (with-no-warnings (previous-line val))
(if viper-ex-style-motion (if viper-ex-style-motion
(if (and (eolp) (not (bolp))) (backward-char 1))) (if (and (eolp) (not (bolp))) (backward-char 1)))
(setq this-command 'previous-line) (setq this-command 'previous-line)

View file

@ -1103,7 +1103,7 @@ reversed."
beg end cont val) beg end cont val)
(viper-add-keymap ex-read-filename-map (viper-add-keymap ex-read-filename-map
(if viper-emacs-p (if (featurep 'emacs)
minibuffer-local-completion-map minibuffer-local-completion-map
read-file-name-map)) read-file-name-map))
@ -1558,7 +1558,7 @@ reversed."
;; setup buffer ;; setup buffer
(if (setq wind (viper-get-visible-buffer-window buf)) (if (setq wind (viper-get-visible-buffer-window buf))
() ()
(setq wind (get-lru-window (if viper-xemacs-p nil 'visible))) (setq wind (get-lru-window (if (featurep 'xemacs) nil 'visible)))
(set-window-buffer wind buf)) (set-window-buffer wind buf))
(if (viper-window-display-p) (if (viper-window-display-p)
@ -1878,7 +1878,7 @@ reversed."
(condition-case nil (condition-case nil
(progn (progn
(pop-to-buffer (get-buffer-create "*info*")) (pop-to-buffer (get-buffer-create "*info*"))
(info (if viper-xemacs-p "viper.info" "viper")) (info (if (featurep 'xemacs) "viper.info" "viper"))
(message "Type `i' to search for a specific topic")) (message "Type `i' to search for a specific topic"))
(error (beep 1) (error (beep 1)
(with-output-to-temp-buffer " *viper-info*" (with-output-to-temp-buffer " *viper-info*"
@ -1887,7 +1887,7 @@ The Info file for Viper does not seem to be installed.
This file is part of the standard distribution of %sEmacs. This file is part of the standard distribution of %sEmacs.
Please contact your system administrator. " Please contact your system administrator. "
(if viper-xemacs-p "X" "") (if (featurep 'xemacs) "X" "")
)))))) ))))))
;; Ex source command. Loads the file specified as argument or `~/.viper' ;; Ex source command. Loads the file specified as argument or `~/.viper'

View file

@ -49,10 +49,6 @@
(interactive) (interactive)
(message "Viper version is %s" viper-version)) (message "Viper version is %s" viper-version))
;; Is it XEmacs?
(defconst viper-xemacs-p (featurep 'xemacs))
;; Is it Emacs?
(defconst viper-emacs-p (not viper-xemacs-p))
;; Tell whether we are running as a window application or on a TTY ;; Tell whether we are running as a window application or on a TTY
;; This is used to avoid compilation warnings. When emacs/xemacs forms can ;; This is used to avoid compilation warnings. When emacs/xemacs forms can
@ -116,8 +112,8 @@ In all likelihood, you don't need to bother with this setting."
(cond ((viper-window-display-p)) (cond ((viper-window-display-p))
(viper-force-faces) (viper-force-faces)
((viper-color-display-p)) ((viper-color-display-p))
(viper-emacs-p (memq (viper-device-type) '(pc))) ((featurep 'emacs) (memq (viper-device-type) '(pc)))
(viper-xemacs-p (memq (viper-device-type) '(tty pc))))) ((featurep 'xemacs) (memq (viper-device-type) '(tty pc)))))
;;; Macros ;;; Macros
@ -356,9 +352,9 @@ Use `M-x viper-set-expert-level' to change this.")
""))))) "")))))
(defun viper-inactivate-input-method () (defun viper-inactivate-input-method ()
(cond ((and viper-emacs-p (fboundp 'inactivate-input-method)) (cond ((and (featurep 'emacs) (fboundp 'inactivate-input-method))
(inactivate-input-method)) (inactivate-input-method))
((and viper-xemacs-p (boundp 'current-input-method)) ((and (featurep 'xemacs) (boundp 'current-input-method))
;; XEmacs had broken quil-mode for some time, so we are working around ;; XEmacs had broken quil-mode for some time, so we are working around
;; it here ;; it here
(setq quail-mode nil) (setq quail-mode nil)
@ -370,7 +366,7 @@ Use `M-x viper-set-expert-level' to change this.")
(force-mode-line-update)) (force-mode-line-update))
)) ))
(defun viper-activate-input-method () (defun viper-activate-input-method ()
(cond ((and viper-emacs-p (fboundp 'activate-input-method)) (cond ((and (featurep 'emacs) (fboundp 'activate-input-method))
(activate-input-method default-input-method)) (activate-input-method default-input-method))
((featurep 'xemacs) ((featurep 'xemacs)
(if (fboundp 'quail-mode) (quail-mode 1))))) (if (fboundp 'quail-mode) (quail-mode 1)))))
@ -475,7 +471,7 @@ is non-nil."
:group 'viper) :group 'viper)
(defcustom viper-use-replace-region-delimiters (defcustom viper-use-replace-region-delimiters
(or (not (viper-has-face-support-p)) (or (not (viper-has-face-support-p))
(and viper-xemacs-p (eq (viper-device-type) 'tty))) (and (featurep 'xemacs) (eq (viper-device-type) 'tty)))
"*If non-nil, Viper will always use `viper-replace-region-end-delimiter' and "*If non-nil, Viper will always use `viper-replace-region-end-delimiter' and
`viper-replace-region-start-delimiter' to delimit replacement regions, even on `viper-replace-region-start-delimiter' to delimit replacement regions, even on
color displays. By default, the delimiters are used only on TTYs." color displays. By default, the delimiters are used only on TTYs."
@ -1018,13 +1014,13 @@ Should be set in `~/.viper' file."
(defun viper-restore-cursor-type () (defun viper-restore-cursor-type ()
(condition-case nil (condition-case nil
(if viper-xemacs-p (if (featurep 'xemacs)
(set (make-local-variable 'bar-cursor) nil) (set (make-local-variable 'bar-cursor) nil)
(setq cursor-type default-cursor-type)) (setq cursor-type default-cursor-type))
(error nil))) (error nil)))
(defun viper-set-insert-cursor-type () (defun viper-set-insert-cursor-type ()
(if viper-xemacs-p (if (featurep 'xemacs)
(set (make-local-variable 'bar-cursor) 2) (set (make-local-variable 'bar-cursor) 2)
(setq cursor-type '(bar . 2)))) (setq cursor-type '(bar . 2))))

View file

@ -826,7 +826,7 @@ name from there."
(defun viper-char-array-to-macro (array) (defun viper-char-array-to-macro (array)
(let ((vec (vconcat array)) (let ((vec (vconcat array))
macro) macro)
(if viper-xemacs-p (if (featurep 'xemacs)
(setq macro (mapcar 'character-to-event vec)) (setq macro (mapcar 'character-to-event vec))
(setq macro vec)) (setq macro vec))
(vconcat (mapcar 'viper-event-key macro)))) (vconcat (mapcar 'viper-event-key macro))))

View file

@ -79,7 +79,7 @@ or a tripple-click."
;; time interval in millisecond within which successive clicks are ;; time interval in millisecond within which successive clicks are
;; considered related ;; considered related
(defcustom viper-multiclick-timeout (if (viper-window-display-p) (defcustom viper-multiclick-timeout (if (viper-window-display-p)
(if viper-xemacs-p (if (featurep 'xemacs)
mouse-track-multi-click-time mouse-track-multi-click-time
double-click-time) double-click-time)
500) 500)
@ -227,7 +227,7 @@ is ignored."
) ; if ) ; if
;; XEmacs doesn't have set-text-properties, but there buffer-substring ;; XEmacs doesn't have set-text-properties, but there buffer-substring
;; doesn't return properties together with the string, so it's not needed. ;; doesn't return properties together with the string, so it's not needed.
(if viper-emacs-p (if (featurep 'emacs)
(set-text-properties 0 (length result) nil result)) (set-text-properties 0 (length result) nil result))
result result
)) ))
@ -273,7 +273,7 @@ See `viper-surrounding-word' for the definition of a word in this case."
'viper-mouse-catch-frame-switch)) 'viper-mouse-catch-frame-switch))
(not (eq (key-binding viper-mouse-up-insert-key-parsed) (not (eq (key-binding viper-mouse-up-insert-key-parsed)
'viper-mouse-click-insert-word)) 'viper-mouse-click-insert-word))
(and viper-xemacs-p (not (event-over-text-area-p click))))) (and (featurep 'xemacs) (not (event-over-text-area-p click)))))
() ; do nothing, if binding isn't right or not over text () ; do nothing, if binding isn't right or not over text
;; turn arg into a number ;; turn arg into a number
(cond ((integerp arg) nil) (cond ((integerp arg) nil)
@ -364,7 +364,7 @@ this command."
'viper-mouse-catch-frame-switch)) 'viper-mouse-catch-frame-switch))
(not (eq (key-binding viper-mouse-up-search-key-parsed) (not (eq (key-binding viper-mouse-up-search-key-parsed)
'viper-mouse-click-search-word)) 'viper-mouse-click-search-word))
(and viper-xemacs-p (not (event-over-text-area-p click))))) (and (featurep 'xemacs) (not (event-over-text-area-p click)))))
() ; do nothing, if binding isn't right or not over text () ; do nothing, if binding isn't right or not over text
(let ((previous-search-string viper-s-string) (let ((previous-search-string viper-s-string)
click-word click-count) click-word click-count)
@ -507,19 +507,19 @@ bindings in the Viper manual."
() ()
(setq button-spec (setq button-spec
(cond ((memq 1 key) (cond ((memq 1 key)
(if viper-emacs-p (if (featurep 'emacs)
(if (eq 'up event-type) (if (eq 'up event-type)
"mouse-1" "down-mouse-1") "mouse-1" "down-mouse-1")
(if (eq 'up event-type) (if (eq 'up event-type)
'button1up 'button1))) 'button1up 'button1)))
((memq 2 key) ((memq 2 key)
(if viper-emacs-p (if (featurep 'emacs)
(if (eq 'up event-type) (if (eq 'up event-type)
"mouse-2" "down-mouse-2") "mouse-2" "down-mouse-2")
(if (eq 'up event-type) (if (eq 'up event-type)
'button2up 'button2))) 'button2up 'button2)))
((memq 3 key) ((memq 3 key)
(if viper-emacs-p (if (featurep 'emacs)
(if (eq 'up event-type) (if (eq 'up event-type)
"mouse-3" "down-mouse-3") "mouse-3" "down-mouse-3")
(if (eq 'up event-type) (if (eq 'up event-type)
@ -528,18 +528,18 @@ bindings in the Viper manual."
"%S: invalid button number, %S" key-var key))) "%S: invalid button number, %S" key-var key)))
meta-spec meta-spec
(if (memq 'meta key) (if (memq 'meta key)
(if viper-emacs-p "M-" 'meta) (if (featurep 'emacs) "M-" 'meta)
(if viper-emacs-p "" nil)) (if (featurep 'emacs) "" nil))
shift-spec shift-spec
(if (memq 'shift key) (if (memq 'shift key)
(if viper-emacs-p "S-" 'shift) (if (featurep 'emacs) "S-" 'shift)
(if viper-emacs-p "" nil)) (if (featurep 'emacs) "" nil))
control-spec control-spec
(if (memq 'control key) (if (memq 'control key)
(if viper-emacs-p "C-" 'control) (if (featurep 'emacs) "C-" 'control)
(if viper-emacs-p "" nil))) (if (featurep 'emacs) "" nil)))
(setq key-spec (if viper-emacs-p (setq key-spec (if (featurep 'emacs)
(vector (vector
(intern (intern
(concat (concat

View file

@ -64,48 +64,34 @@
(fset 'x-color-defined-p (symbol-function 'ns-color-defined-p))) (fset 'x-color-defined-p (symbol-function 'ns-color-defined-p)))
;;; XEmacs support (defalias 'viper-overlay-p
(if (featurep 'xemacs) 'extentp 'overlayp))
(defalias 'viper-make-overlay
(viper-cond-compile-for-xemacs-or-emacs (if (featurep 'xemacs) 'make-extent 'make-overlay))
(progn ; xemacs (defalias 'viper-overlay-live-p
(fset 'viper-overlay-p (symbol-function 'extentp)) (if (featurep 'xemacs) 'extent-live-p 'overlayp))
(fset 'viper-make-overlay (symbol-function 'make-extent)) (defalias 'viper-move-overlay
(fset 'viper-overlay-live-p (symbol-function 'extent-live-p)) (if (featurep 'xemacs) 'set-extent-endpoints 'move-overlay))
(fset 'viper-move-overlay (symbol-function 'set-extent-endpoints)) (defalias 'viper-overlay-start
(fset 'viper-overlay-start (symbol-function 'extent-start-position)) (if (featurep 'xemacs) 'extent-start-position 'overlay-start))
(fset 'viper-overlay-end (symbol-function 'extent-end-position)) (defalias 'viper-overlay-end
(fset 'viper-overlay-get (symbol-function 'extent-property)) (if (featurep 'xemacs) 'extent-end-position 'overlay-end))
(fset 'viper-overlay-put (symbol-function 'set-extent-property)) (defalias 'viper-overlay-get
(fset 'viper-read-event (symbol-function 'next-command-event)) (if (featurep 'xemacs) 'extent-property 'overlay-get))
(fset 'viper-characterp (symbol-function 'characterp)) (defalias 'viper-overlay-put
(fset 'viper-int-to-char (symbol-function 'int-to-char)) (if (featurep 'xemacs) 'set-extent-property 'overlay-put))
(if (viper-window-display-p) (defalias 'viper-read-event
(fset 'viper-iconify (symbol-function 'iconify-frame))) (if (featurep 'xemacs) 'next-command-event 'read-event))
(cond ((viper-has-face-support-p) (defalias 'viper-characterp
(fset 'viper-get-face (symbol-function 'get-face)) (if (featurep 'xemacs) 'characterp 'integerp))
(fset 'viper-color-defined-p (symbol-function 'valid-color-name-p)) (defalias 'viper-int-to-char
))) (if (featurep 'xemacs) 'int-to-char 'identity))
(progn ; emacs (defalias 'viper-get-face
(fset 'viper-overlay-p (symbol-function 'overlayp)) (if (featurep 'xemacs) 'get-face 'internal-get-face))
(fset 'viper-make-overlay (symbol-function 'make-overlay)) (defalias 'viper-color-defined-p
(fset 'viper-overlay-live-p (symbol-function 'overlayp)) (if (featurep 'xemacs) 'valid-color-name-p 'x-color-defined-p))
(fset 'viper-move-overlay (symbol-function 'move-overlay)) (defalias 'viper-iconify
(fset 'viper-overlay-start (symbol-function 'overlay-start)) (if (featurep 'xemacs) 'iconify-frame 'iconify-or-deiconify-frame))
(fset 'viper-overlay-end (symbol-function 'overlay-end))
(fset 'viper-overlay-get (symbol-function 'overlay-get))
(fset 'viper-overlay-put (symbol-function 'overlay-put))
(fset 'viper-read-event (symbol-function 'read-event))
(fset 'viper-characterp (symbol-function 'integerp))
(fset 'viper-int-to-char (symbol-function 'identity))
(if (viper-window-display-p)
(fset 'viper-iconify (symbol-function 'iconify-or-deiconify-frame)))
(cond ((viper-has-face-support-p)
(fset 'viper-get-face (symbol-function 'internal-get-face))
(fset 'viper-color-defined-p (symbol-function 'x-color-defined-p))
)))
)
;; CHAR is supposed to be a char or an integer (positive or negative) ;; CHAR is supposed to be a char or an integer (positive or negative)
@ -201,7 +187,7 @@
(defsubst viper-get-saved-cursor-color-in-replace-mode () (defsubst viper-get-saved-cursor-color-in-replace-mode ()
(or (or
(funcall (funcall
(if viper-emacs-p 'frame-parameter 'frame-property) (if (featurep 'emacs) 'frame-parameter 'frame-property)
(selected-frame) (selected-frame)
'viper-saved-cursor-color-in-replace-mode) 'viper-saved-cursor-color-in-replace-mode)
(if (and (eq viper-current-state 'emacs-mode) viper-emacs-state-cursor-color) (if (and (eq viper-current-state 'emacs-mode) viper-emacs-state-cursor-color)
@ -211,7 +197,7 @@
(defsubst viper-get-saved-cursor-color-in-insert-mode () (defsubst viper-get-saved-cursor-color-in-insert-mode ()
(or (or
(funcall (funcall
(if viper-emacs-p 'frame-parameter 'frame-property) (if (featurep 'emacs) 'frame-parameter 'frame-property)
(selected-frame) (selected-frame)
'viper-saved-cursor-color-in-insert-mode) 'viper-saved-cursor-color-in-insert-mode)
(if (and (eq viper-current-state 'emacs-mode) viper-emacs-state-cursor-color) (if (and (eq viper-current-state 'emacs-mode) viper-emacs-state-cursor-color)
@ -221,7 +207,7 @@
(defsubst viper-get-saved-cursor-color-in-emacs-mode () (defsubst viper-get-saved-cursor-color-in-emacs-mode ()
(or (or
(funcall (funcall
(if viper-emacs-p 'frame-parameter 'frame-property) (if (featurep 'emacs) 'frame-parameter 'frame-property)
(selected-frame) (selected-frame)
'viper-saved-cursor-color-in-emacs-mode) 'viper-saved-cursor-color-in-emacs-mode)
viper-vi-state-cursor-color)) viper-vi-state-cursor-color))
@ -249,8 +235,8 @@
;; testing for sufficiently high Emacs versions. ;; testing for sufficiently high Emacs versions.
(defun viper-check-version (op major minor &optional type-of-emacs) (defun viper-check-version (op major minor &optional type-of-emacs)
(if (and (boundp 'emacs-major-version) (boundp 'emacs-minor-version)) (if (and (boundp 'emacs-major-version) (boundp 'emacs-minor-version))
(and (cond ((eq type-of-emacs 'xemacs) viper-xemacs-p) (and (cond ((eq type-of-emacs 'xemacs) (featurep 'xemacs))
((eq type-of-emacs 'emacs) viper-emacs-p) ((eq type-of-emacs 'emacs) (featurep 'emacs))
(t t)) (t t))
(cond ((eq op '=) (and (= emacs-minor-version minor) (cond ((eq op '=) (and (= emacs-minor-version minor)
(= emacs-major-version major))) (= emacs-major-version major)))
@ -267,7 +253,7 @@
(defun viper-get-visible-buffer-window (wind) (defun viper-get-visible-buffer-window (wind)
(if viper-xemacs-p (if (featurep 'xemacs)
(get-buffer-window wind t) (get-buffer-window wind t)
(get-buffer-window wind 'visible))) (get-buffer-window wind 'visible)))
@ -724,13 +710,14 @@
(defsubst viper-file-checked-in-p (file) (defsubst viper-file-checked-in-p (file)
(and (featurep 'vc-hooks) (and (featurep 'vc-hooks)
;; CVS files are considered not checked in ;; CVS files are considered not checked in
;; FIXME: Should this deal with more than CVS?
(not (memq (vc-backend file) '(nil CVS))) (not (memq (vc-backend file) '(nil CVS)))
(if (fboundp 'vc-state) (if (fboundp 'vc-state)
(and (and
(not (memq (vc-state file) '(edited needs-merge))) (not (memq (vc-state file) '(edited needs-merge)))
(not (stringp (vc-state file)))) (not (stringp (vc-state file))))
;; XEmacs has no vc-state ;; XEmacs has no vc-state
(not (vc-locking-user file))) (if (featurep 'xemacs)(not (vc-locking-user file))))
)) ))
;; checkout if visited file is checked in ;; checkout if visited file is checked in
@ -787,7 +774,7 @@
(setq viper-replace-overlay (viper-make-overlay beg end (current-buffer))) (setq viper-replace-overlay (viper-make-overlay beg end (current-buffer)))
;; never detach ;; never detach
(viper-overlay-put (viper-overlay-put
viper-replace-overlay (if viper-emacs-p 'evaporate 'detachable) nil) viper-replace-overlay (if (featurep 'emacs) 'evaporate 'detachable) nil)
(viper-overlay-put (viper-overlay-put
viper-replace-overlay 'priority viper-replace-overlay-priority) viper-replace-overlay 'priority viper-replace-overlay-priority)
;; If Emacs will start supporting overlay maps, as it currently supports ;; If Emacs will start supporting overlay maps, as it currently supports
@ -795,7 +782,7 @@
;; just have keymap attached to replace overlay. ;; just have keymap attached to replace overlay.
;;(viper-overlay-put ;;(viper-overlay-put
;; viper-replace-overlay ;; viper-replace-overlay
;; (if viper-xemacs-p 'keymap 'local-map) ;; (if (featurep 'xemacs) 'keymap 'local-map)
;; viper-replace-map) ;; viper-replace-map)
) )
(if (viper-has-face-support-p) (if (viper-has-face-support-p)
@ -811,8 +798,8 @@
(viper-set-replace-overlay (point-min) (point-min))) (viper-set-replace-overlay (point-min) (point-min)))
(if (or (not (viper-has-face-support-p)) (if (or (not (viper-has-face-support-p))
viper-use-replace-region-delimiters) viper-use-replace-region-delimiters)
(let ((before-name (if viper-xemacs-p 'begin-glyph 'before-string)) (let ((before-name (if (featurep 'xemacs) 'begin-glyph 'before-string))
(after-name (if viper-xemacs-p 'end-glyph 'after-string))) (after-name (if (featurep 'xemacs) 'end-glyph 'after-string)))
(viper-overlay-put viper-replace-overlay before-name before-glyph) (viper-overlay-put viper-replace-overlay before-name before-glyph)
(viper-overlay-put viper-replace-overlay after-name after-glyph)))) (viper-overlay-put viper-replace-overlay after-name after-glyph))))
@ -843,11 +830,11 @@
;; never detach ;; never detach
(viper-overlay-put (viper-overlay-put
viper-minibuffer-overlay viper-minibuffer-overlay
(if viper-emacs-p 'evaporate 'detachable) (if (featurep 'emacs) 'evaporate 'detachable)
nil) nil)
;; make viper-minibuffer-overlay open-ended ;; make viper-minibuffer-overlay open-ended
;; In emacs, it is made open ended at creation time ;; In emacs, it is made open ended at creation time
(if viper-xemacs-p (if (featurep 'xemacs)
(progn (progn
(viper-overlay-put viper-minibuffer-overlay 'start-open nil) (viper-overlay-put viper-minibuffer-overlay 'start-open nil)
(viper-overlay-put viper-minibuffer-overlay 'end-open nil))) (viper-overlay-put viper-minibuffer-overlay 'end-open nil)))
@ -860,7 +847,7 @@
(if (fboundp 'minibuffer-prompt-end) (minibuffer-prompt-end) 1) (if (fboundp 'minibuffer-prompt-end) (minibuffer-prompt-end) 1)
(1+ (buffer-size))) (1+ (buffer-size)))
(setq viper-minibuffer-overlay (setq viper-minibuffer-overlay
(if viper-xemacs-p (if (featurep 'xemacs)
(viper-make-overlay 1 (1+ (buffer-size)) (current-buffer)) (viper-make-overlay 1 (1+ (buffer-size)) (current-buffer))
;; make overlay open-ended ;; make overlay open-ended
(viper-make-overlay (viper-make-overlay
@ -983,7 +970,7 @@
(defun viper-read-key-sequence (prompt &optional continue-echo) (defun viper-read-key-sequence (prompt &optional continue-echo)
(let (inhibit-quit event keyseq) (let (inhibit-quit event keyseq)
(setq keyseq (read-key-sequence prompt continue-echo)) (setq keyseq (read-key-sequence prompt continue-echo))
(setq event (if viper-xemacs-p (setq event (if (featurep 'xemacs)
(elt keyseq 0) ; XEmacs returns vector of events (elt keyseq 0) ; XEmacs returns vector of events
(elt (listify-key-sequence keyseq) 0))) (elt (listify-key-sequence keyseq) 0)))
(if (viper-ESC-event-p event) (if (viper-ESC-event-p event)
@ -1078,7 +1065,7 @@
(defun viper-key-to-emacs-key (key) (defun viper-key-to-emacs-key (key)
(let (key-name char-p modifiers mod-char-list base-key base-key-name) (let (key-name char-p modifiers mod-char-list base-key base-key-name)
(cond (viper-xemacs-p key) (cond ((featurep 'xemacs) key)
((symbolp key) ((symbolp key)
(setq key-name (symbol-name key)) (setq key-name (symbol-name key))
@ -1086,10 +1073,10 @@
(string-to-char key-name)) (string-to-char key-name))
;; Emacs doesn't recognize `return' and `escape' as events on ;; Emacs doesn't recognize `return' and `escape' as events on
;; dumb terminals, so we translate them into characters ;; dumb terminals, so we translate them into characters
((and viper-emacs-p (not (viper-window-display-p)) ((and (featurep 'emacs) (not (viper-window-display-p))
(string= key-name "return")) (string= key-name "return"))
?\C-m) ?\C-m)
((and viper-emacs-p (not (viper-window-display-p)) ((and (featurep 'emacs) (not (viper-window-display-p))
(string= key-name "escape")) (string= key-name "escape"))
?\e) ?\e)
;; pass symbol-event as is ;; pass symbol-event as is
@ -1123,14 +1110,15 @@
;; LIS is assumed to be a list of events of characters ;; LIS is assumed to be a list of events of characters
(defun viper-eventify-list-xemacs (lis) (defun viper-eventify-list-xemacs (lis)
(mapcar (if (featurep 'xemacs)
(lambda (elt) (mapcar
(cond ((viper-characterp elt) (character-to-event elt)) (lambda (elt)
((eventp elt) elt) (cond ((viper-characterp elt) (character-to-event elt))
(t (error ((eventp elt) elt)
"viper-eventify-list-xemacs: can't convert to event, %S" (t (error
elt)))) "viper-eventify-list-xemacs: can't convert to event, %S"
lis)) elt))))
lis)))
;; Smoothes out the difference between Emacs' unread-command-events ;; Smoothes out the difference between Emacs' unread-command-events
@ -1142,7 +1130,7 @@
;; into an event. Below, we delete nil from event lists, since nil is the most ;; into an event. Below, we delete nil from event lists, since nil is the most
;; common symbol that might appear in this wrong context. ;; common symbol that might appear in this wrong context.
(defun viper-set-unread-command-events (arg) (defun viper-set-unread-command-events (arg)
(if viper-emacs-p (if (featurep 'emacs)
(setq (setq
unread-command-events unread-command-events
(let ((new-events (let ((new-events

View file

@ -690,7 +690,7 @@ It also can't undo some Viper settings."
(setq default-major-mode (setq default-major-mode
(viper-standard-value 'default-major-mode viper-saved-non-viper-variables)) (viper-standard-value 'default-major-mode viper-saved-non-viper-variables))
(if viper-emacs-p (if (featurep 'emacs)
(setq-default (setq-default
mark-even-if-inactive mark-even-if-inactive
(viper-standard-value (viper-standard-value
@ -701,7 +701,7 @@ It also can't undo some Viper settings."
(and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists)) (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists))
(viper-delocalize-var 'minor-mode-map-alist)) (viper-delocalize-var 'minor-mode-map-alist))
(viper-delocalize-var 'require-final-newline) (viper-delocalize-var 'require-final-newline)
(if viper-xemacs-p (viper-delocalize-var 'bar-cursor)) (if (featurep 'xemacs) (viper-delocalize-var 'bar-cursor))
;; deactivate all advices done by Viper. ;; deactivate all advices done by Viper.
@ -788,7 +788,7 @@ It also can't undo some Viper settings."
;; In emacs, we have to advice handle-switch-frame ;; In emacs, we have to advice handle-switch-frame
;; This advice is undone earlier, when all advices matchine "viper-" are ;; This advice is undone earlier, when all advices matchine "viper-" are
;; deactivated. ;; deactivated.
(if viper-xemacs-p (if (featurep 'xemacs)
(remove-hook 'mouse-leave-frame-hook 'viper-remember-current-frame)) (remove-hook 'mouse-leave-frame-hook 'viper-remember-current-frame))
) ; end viper-go-away ) ; end viper-go-away
@ -981,7 +981,7 @@ It also can't undo some Viper settings."
))) )))
;; International input methods ;; International input methods
(if viper-emacs-p (if (featurep 'emacs)
(eval-after-load "mule-cmds" (eval-after-load "mule-cmds"
'(progn '(progn
(defadvice inactivate-input-method (after viper-mule-advice activate) (defadvice inactivate-input-method (after viper-mule-advice activate)
@ -1022,7 +1022,7 @@ It also can't undo some Viper settings."
require-final-newline t) require-final-newline t)
;; don't bark when mark is inactive ;; don't bark when mark is inactive
(if viper-emacs-p (if (featurep 'emacs)
(setq mark-even-if-inactive t)) (setq mark-even-if-inactive t))
(setq scroll-step 1) (setq scroll-step 1)
@ -1094,12 +1094,12 @@ It also can't undo some Viper settings."
"Use `read-file-name' for reading arguments." "Use `read-file-name' for reading arguments."
(interactive (cons (read-file-name "Find file: " nil default-directory) (interactive (cons (read-file-name "Find file: " nil default-directory)
;; XEmacs: if Mule & prefix arg, ask for coding system ;; XEmacs: if Mule & prefix arg, ask for coding system
(cond ((and viper-xemacs-p (featurep 'mule)) (cond ((and (featurep 'xemacs) (featurep 'mule))
(list (list
(and current-prefix-arg (and current-prefix-arg
(read-coding-system "Coding-system: ")))) (read-coding-system "Coding-system: "))))
;; Emacs: do wildcards ;; Emacs: do wildcards
((and viper-emacs-p (boundp 'find-file-wildcards)) ((and (featurep 'emacs) (boundp 'find-file-wildcards))
(list find-file-wildcards)))) (list find-file-wildcards))))
)) ))
@ -1108,12 +1108,12 @@ It also can't undo some Viper settings."
(interactive (cons (read-file-name "Find file in other window: " (interactive (cons (read-file-name "Find file in other window: "
nil default-directory) nil default-directory)
;; XEmacs: if Mule & prefix arg, ask for coding system ;; XEmacs: if Mule & prefix arg, ask for coding system
(cond ((and viper-xemacs-p (featurep 'mule)) (cond ((and (featurep 'xemacs) (featurep 'mule))
(list (list
(and current-prefix-arg (and current-prefix-arg
(read-coding-system "Coding-system: ")))) (read-coding-system "Coding-system: "))))
;; Emacs: do wildcards ;; Emacs: do wildcards
((and viper-emacs-p (boundp 'find-file-wildcards)) ((and (featurep 'emacs) (boundp 'find-file-wildcards))
(list find-file-wildcards)))) (list find-file-wildcards))))
)) ))
@ -1123,12 +1123,12 @@ It also can't undo some Viper settings."
(interactive (cons (read-file-name "Find file in other frame: " (interactive (cons (read-file-name "Find file in other frame: "
nil default-directory) nil default-directory)
;; XEmacs: if Mule & prefix arg, ask for coding system ;; XEmacs: if Mule & prefix arg, ask for coding system
(cond ((and viper-xemacs-p (featurep 'mule)) (cond ((and (featurep 'xemacs) (featurep 'mule))
(list (list
(and current-prefix-arg (and current-prefix-arg
(read-coding-system "Coding-system: ")))) (read-coding-system "Coding-system: "))))
;; Emacs: do wildcards ;; Emacs: do wildcards
((and viper-emacs-p (boundp 'find-file-wildcards)) ((and (featurep 'emacs) (boundp 'find-file-wildcards))
(list find-file-wildcards)))) (list find-file-wildcards))))
)) ))
@ -1159,7 +1159,7 @@ It also can't undo some Viper settings."
;; catch frame switching event ;; catch frame switching event
(if (viper-window-display-p) (if (viper-window-display-p)
(if viper-xemacs-p (if (featurep 'xemacs)
(add-hook 'mouse-leave-frame-hook (add-hook 'mouse-leave-frame-hook
'viper-remember-current-frame) 'viper-remember-current-frame)
(defadvice handle-switch-frame (before viper-frame-advice activate) (defadvice handle-switch-frame (before viper-frame-advice activate)
@ -1227,7 +1227,7 @@ These two lines must come in the order given.
(cons 'mode-line-buffer-identification (cons 'mode-line-buffer-identification
(list (default-value 'mode-line-buffer-identification))) (list (default-value 'mode-line-buffer-identification)))
(cons 'global-mode-string (list global-mode-string)) (cons 'global-mode-string (list global-mode-string))
(if viper-emacs-p (if (featurep 'emacs)
(cons 'mark-even-if-inactive (list mark-even-if-inactive))) (cons 'mark-even-if-inactive (list mark-even-if-inactive)))
))) )))

View file

@ -59,7 +59,8 @@
(defvar gud-find-expr-function) (defvar gud-find-expr-function)
(defvar imenu-case-fold-search) (defvar imenu-case-fold-search)
(defvar imenu-syntax-alist) (defvar imenu-syntax-alist)
(defvar comment-region-function)
(defvar uncomment-region-function)
(defgroup fortran nil (defgroup fortran nil
"Major mode for editing fixed format Fortran code." "Major mode for editing fixed format Fortran code."

View file

@ -1930,9 +1930,7 @@ returns t if the buffer had changes, nil otherwise."
(message "No changes between %s and %s" rev1-name rev2-name) (message "No changes between %s and %s" rev1-name rev2-name)
nil) nil)
(pop-to-buffer (current-buffer)) (pop-to-buffer (current-buffer))
;; Gnus-5.8.5 sets up an autoload for diff-mode, even if it's (diff-mode)
;; not available. Work around that.
(if (require 'diff-mode nil t) (diff-mode))
(vc-exec-after `(vc-diff-sentinel ,verbose ,rev1-name ,rev2-name)) (vc-exec-after `(vc-diff-sentinel ,verbose ,rev1-name ,rev2-name))
;; In the async case, we return t even if there are no differences ;; In the async case, we return t even if there are no differences
;; because we don't know that yet. ;; because we don't know that yet.