summaryrefslogtreecommitdiff
path: root/lisp/vc/ediff-init.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-10-04 15:20:41 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-10-04 15:20:48 +0200
commit8ef09cb30a526f34236f6696d06a2848043685ae (patch)
tree9aa39b5cab931781cf4ae758c07b7e0fee71d1f9 /lisp/vc/ediff-init.el
parentf1d9e41ab022358c5086227d5b267f3f35d27666 (diff)
downloademacs-8ef09cb30a526f34236f6696d06a2848043685ae.tar.gz
Remove some XEmacs compat code from ediff*.el
* lisp/vc/ediff-diff.el (ediff-goto-word): Ditto. * lisp/vc/ediff-init.el (ediff-has-face-support-p) (ediff-current-diff-A, ediff-current-diff-B) (ediff-current-diff-C, ediff-current-diff-Ancestor) (ediff-fine-diff-A, ediff-fine-diff-B, ediff-fine-diff-C) (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-with-syntax-table): Ditto. * lisp/vc/ediff-mult.el (ediff-dir-diffs-buffer-map) (ediff-setup-meta-map, ediff-set-meta-overlay): Ditto. * lisp/vc/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-make-bullet-proof-overlay): Ditto. * lisp/vc/ediff-wind.el (ediff-setup-control-frame) (ediff-refresh-control-frame): Remove XEmacs compat code.
Diffstat (limited to 'lisp/vc/ediff-init.el')
-rw-r--r--lisp/vc/ediff-init.el402
1 files changed, 154 insertions, 248 deletions
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index f98a7ed560c..c007d934483 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -58,9 +58,7 @@ that Ediff doesn't know about.")
(cond ((ediff-window-display-p))
(ediff-force-faces)
((ediff-color-display-p))
- ((featurep 'emacs) (memq (ediff-device-type) '(pc)))
- ((featurep 'xemacs) (memq (ediff-device-type) '(tty pc)))
- ))
+ (t (memq (ediff-device-type) '(pc)))))
;; toolbar support for emacs hasn't been implemented in ediff
(defun ediff-has-toolbar-support-p ()
@@ -822,19 +820,15 @@ to temp files in buffer jobs and when Ediff needs to find fine differences."
(defface ediff-current-diff-A
- (if (featurep 'emacs)
- '((((class color) (min-colors 88) (background light))
- :background "#ffdddd")
- (((class color) (min-colors 88) (background dark))
- :background "#553333")
- (((class color) (min-colors 16))
- (:foreground "firebrick" :background "pale green"))
- (((class color))
- (:foreground "blue3" :background "yellow3"))
- (t (:inverse-video t)))
- '((((type tty)) (:foreground "blue3" :background "yellow3"))
- (((class color)) (:foreground "firebrick" :background "pale green"))
- (t (:inverse-video t))))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ffdddd")
+ (((class color) (min-colors 88) (background dark))
+ :background "#553333")
+ (((class color) (min-colors 16))
+ (:foreground "firebrick" :background "pale green"))
+ (((class color))
+ (:foreground "blue3" :background "yellow3"))
+ (t (:inverse-video t)))
"Face for highlighting the selected difference in buffer A."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -855,21 +849,16 @@ this variable represents.")
(defface ediff-current-diff-B
- (if (featurep 'emacs)
- '((((class color) (min-colors 88) (background light))
- :background "#ddffdd")
- (((class color) (min-colors 88) (background dark))
- :background "#335533")
- (((class color) (min-colors 16))
- (:foreground "DarkOrchid" :background "Yellow"))
- (((class color))
- (:foreground "magenta3" :background "yellow3"
- :weight bold))
- (t (:inverse-video t)))
- '((((type tty)) (:foreground "magenta3" :background "yellow3"
- :weight bold))
- (((class color)) (:foreground "DarkOrchid" :background "Yellow"))
- (t (:inverse-video t))))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ddffdd")
+ (((class color) (min-colors 88) (background dark))
+ :background "#335533")
+ (((class color) (min-colors 16))
+ (:foreground "DarkOrchid" :background "Yellow"))
+ (((class color))
+ (:foreground "magenta3" :background "yellow3"
+ :weight bold))
+ (t (:inverse-video t)))
"Face for highlighting the selected difference in buffer B."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -889,19 +878,15 @@ this variable represents.")
(defface ediff-current-diff-C
- (if (featurep 'emacs)
- '((((class color) (min-colors 88) (background light))
- :background "#ffffaa")
- (((class color) (min-colors 88) (background dark))
- :background "#888833")
- (((class color) (min-colors 16))
- (:foreground "Navy" :background "Pink"))
- (((class color))
- (:foreground "cyan3" :background "yellow3" :weight bold))
- (t (:inverse-video t)))
- '((((type tty)) (:foreground "cyan3" :background "yellow3" :weight bold))
- (((class color)) (:foreground "Navy" :background "Pink"))
- (t (:inverse-video t))))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ffffaa")
+ (((class color) (min-colors 88) (background dark))
+ :background "#888833")
+ (((class color) (min-colors 16))
+ (:foreground "Navy" :background "Pink"))
+ (((class color))
+ (:foreground "cyan3" :background "yellow3" :weight bold))
+ (t (:inverse-video t)))
"Face for highlighting the selected difference in buffer C."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -921,21 +906,17 @@ this variable represents.")
(defface ediff-current-diff-Ancestor
- (if (featurep 'emacs)
- '((((class color) (min-colors 88) (background light))
- :background "#cfdeee")
- (((class color) (min-colors 88) (background dark))
- :background "#004151")
- (((class color) (min-colors 16) (background light))
- :background "#cfdeee")
- (((class color) (min-colors 16) (background dark))
- :background "#004151")
- (((class color))
- (:foreground "black" :background "magenta3"))
- (t (:inverse-video t)))
- '((((type tty)) (:foreground "black" :background "magenta3"))
- (((class color)) (:foreground "Black" :background "VioletRed"))
- (t (:inverse-video t))))
+ '((((class color) (min-colors 88) (background light))
+ :background "#cfdeee")
+ (((class color) (min-colors 88) (background dark))
+ :background "#004151")
+ (((class color) (min-colors 16) (background light))
+ :background "#cfdeee")
+ (((class color) (min-colors 16) (background dark))
+ :background "#004151")
+ (((class color))
+ (:foreground "black" :background "magenta3"))
+ (t (:inverse-video t)))
"Face for highlighting the selected difference in buffer Ancestor."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -955,19 +936,15 @@ this variable represents.")
(defface ediff-fine-diff-A
- (if (featurep 'emacs)
- '((((class color) (min-colors 88) (background light))
- :background "#ffbbbb")
- (((class color) (min-colors 88) (background dark))
- :background "#aa2222")
- (((class color) (min-colors 16))
- (:foreground "Navy" :background "sky blue"))
- (((class color))
- (:foreground "white" :background "sky blue" :weight bold))
- (t (:underline t :stipple "gray3")))
- '((((type tty)) (:foreground "white" :background "sky blue" :weight bold))
- (((class color)) (:foreground "Navy" :background "sky blue"))
- (t (:underline t :stipple "gray3"))))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ffbbbb")
+ (((class color) (min-colors 88) (background dark))
+ :background "#aa2222")
+ (((class color) (min-colors 16))
+ (:foreground "Navy" :background "sky blue"))
+ (((class color))
+ (:foreground "white" :background "sky blue" :weight bold))
+ (t (:underline t :stipple "gray3")))
"Face for highlighting the refinement of the selected diff in buffer A."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -980,19 +957,15 @@ this variable represents.")
(ediff-hide-face ediff-fine-diff-face-A)
(defface ediff-fine-diff-B
- (if (featurep 'emacs)
- '((((class color) (min-colors 88) (background light))
- :background "#aaffaa")
- (((class color) (min-colors 88) (background dark))
- :background "#22aa22")
- (((class color) (min-colors 16))
- (:foreground "Black" :background "cyan"))
- (((class color))
- (:foreground "magenta3" :background "cyan3"))
- (t (:underline t :stipple "gray3")))
- '((((type tty)) (:foreground "magenta3" :background "cyan3"))
- (((class color)) (:foreground "Black" :background "cyan"))
- (t (:underline t :stipple "gray3"))))
+ '((((class color) (min-colors 88) (background light))
+ :background "#aaffaa")
+ (((class color) (min-colors 88) (background dark))
+ :background "#22aa22")
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "cyan"))
+ (((class color))
+ (:foreground "magenta3" :background "cyan3"))
+ (t (:underline t :stipple "gray3")))
"Face for highlighting the refinement of the selected diff in buffer B."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1005,24 +978,18 @@ this variable represents.")
(ediff-hide-face ediff-fine-diff-face-B)
(defface ediff-fine-diff-C
- (if (featurep 'emacs)
- '((((class color) (min-colors 88) (background light))
- :background "#ffff55")
- (((class color) (min-colors 88) (background dark))
- :background "#aaaa22")
- (((type pc))
- (:foreground "white" :background "Turquoise"))
- (((class color) (min-colors 16))
- (:foreground "Black" :background "Turquoise"))
- (((class color))
- (:foreground "yellow3" :background "Turquoise"
- :weight bold))
- (t (:underline t :stipple "gray3")))
- '((((type tty)) (:foreground "yellow3" :background "Turquoise"
- :weight bold))
- (((type pc)) (:foreground "white" :background "Turquoise"))
- (((class color)) (:foreground "Black" :background "Turquoise"))
- (t (:underline t :stipple "gray3"))))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ffff55")
+ (((class color) (min-colors 88) (background dark))
+ :background "#aaaa22")
+ (((type pc))
+ (:foreground "white" :background "Turquoise"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "Turquoise"))
+ (((class color))
+ (:foreground "yellow3" :background "Turquoise"
+ :weight bold))
+ (t (:underline t :stipple "gray3")))
"Face for highlighting the refinement of the selected diff in buffer C."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1035,21 +1002,17 @@ this variable represents.")
(ediff-hide-face ediff-fine-diff-face-C)
(defface ediff-fine-diff-Ancestor
- (if (featurep 'emacs)
- '((((class color) (min-colors 88) (background light))
- :background "#00c5c0")
- (((class color) (min-colors 88) (background dark))
- :background "#009591")
- (((class color) (min-colors 16) (background light))
- :background "#00c5c0")
- (((class color) (min-colors 16) (background dark))
- :background "#009591")
- (((class color))
- (:foreground "red3" :background "green"))
- (t (:underline t :stipple "gray3")))
- '((((type tty)) (:foreground "red3" :background "green"))
- (((class color)) (:foreground "Black" :background "Green"))
- (t (:underline t :stipple "gray3"))))
+ '((((class color) (min-colors 88) (background light))
+ :background "#00c5c0")
+ (((class color) (min-colors 88) (background dark))
+ :background "#009591")
+ (((class color) (min-colors 16) (background light))
+ :background "#00c5c0")
+ (((class color) (min-colors 16) (background dark))
+ :background "#009591")
+ (((class color))
+ (:foreground "red3" :background "green"))
+ (t (:underline t :stipple "gray3")))
"Face for highlighting the refinement of the selected diff in the ancestor buffer.
At present, this face is not used and no fine differences are computed for the
ancestor buffer."
@@ -1073,22 +1036,16 @@ this variable represents.")
(t "Stipple")))
(defface ediff-even-diff-A
- (if (featurep 'emacs)
- `((((type pc))
- (:foreground "green3" :background "light grey"))
- (((class color) (min-colors 88))
- (:background "light grey"))
- (((class color) (min-colors 16))
- (:foreground "Black" :background "light grey"))
- (((class color))
- (:foreground "red3" :background "light grey"
- :weight bold))
- (t (:italic t :stipple ,stipple-pixmap)))
- `((((type tty)) (:foreground "red3" :background "light grey"
- :weight bold))
- (((type pc)) (:foreground "green3" :background "light grey"))
- (((class color)) (:foreground "Black" :background "light grey"))
- (t (:italic t :stipple ,stipple-pixmap))))
+ `((((type pc))
+ (:foreground "green3" :background "light grey"))
+ (((class color) (min-colors 88))
+ (:background "light grey"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "light grey"))
+ (((class color))
+ (:foreground "red3" :background "light grey"
+ :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
"Face for highlighting even-numbered non-current differences in buffer A."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1101,17 +1058,13 @@ this variable represents.")
(ediff-hide-face ediff-even-diff-face-A)
(defface ediff-even-diff-B
- (if (featurep 'emacs)
- `((((class color) (min-colors 88))
- (:background "Grey"))
- (((class color) (min-colors 16))
- (:foreground "White" :background "Grey"))
- (((class color))
- (:foreground "blue3" :background "Grey" :weight bold))
- (t (:italic t :stipple ,stipple-pixmap)))
- `((((type tty)) (:foreground "blue3" :background "Grey" :weight bold))
- (((class color)) (:foreground "White" :background "Grey"))
- (t (:italic t :stipple ,stipple-pixmap))))
+ `((((class color) (min-colors 88))
+ (:background "Grey"))
+ (((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "blue3" :background "Grey" :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
"Face for highlighting even-numbered non-current differences in buffer B."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1124,22 +1077,16 @@ this variable represents.")
(ediff-hide-face ediff-even-diff-face-B)
(defface ediff-even-diff-C
- (if (featurep 'emacs)
- `((((type pc))
- (:foreground "yellow3" :background "light grey"))
- (((class color) (min-colors 88))
- (:background "light grey"))
- (((class color) (min-colors 16))
- (:foreground "Black" :background "light grey"))
- (((class color))
- (:foreground "yellow3" :background "light grey"
- :weight bold))
- (t (:italic t :stipple ,stipple-pixmap)))
- `((((type tty)) (:foreground "yellow3" :background "light grey"
- :weight bold))
- (((type pc)) (:foreground "yellow3" :background "light grey"))
- (((class color)) (:foreground "Black" :background "light grey"))
- (t (:italic t :stipple ,stipple-pixmap))))
+ `((((type pc))
+ (:foreground "yellow3" :background "light grey"))
+ (((class color) (min-colors 88))
+ (:background "light grey"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "light grey"))
+ (((class color))
+ (:foreground "yellow3" :background "light grey"
+ :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
"Face for highlighting even-numbered non-current differences in buffer C."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1152,22 +1099,16 @@ this variable represents.")
(ediff-hide-face ediff-even-diff-face-C)
(defface ediff-even-diff-Ancestor
- (if (featurep 'emacs)
- `((((type pc))
- (:foreground "cyan3" :background "light grey"))
- (((class color) (min-colors 88))
- (:background "Grey"))
- (((class color) (min-colors 16))
- (:foreground "White" :background "Grey"))
- (((class color))
- (:foreground "cyan3" :background "light grey"
- :weight bold))
- (t (:italic t :stipple ,stipple-pixmap)))
- `((((type tty)) (:foreground "cyan3" :background "light grey"
- :weight bold))
- (((type pc)) (:foreground "cyan3" :background "light grey"))
- (((class color)) (:foreground "White" :background "Grey"))
- (t (:italic t :stipple ,stipple-pixmap))))
+ `((((type pc))
+ (:foreground "cyan3" :background "light grey"))
+ (((class color) (min-colors 88))
+ (:background "Grey"))
+ (((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "cyan3" :background "light grey"
+ :weight bold))
+ (t (:italic t :stipple ,stipple-pixmap)))
"Face for highlighting even-numbered non-current differences in the ancestor buffer."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1187,20 +1128,15 @@ this variable represents.")
(Ancestor . ediff-even-diff-Ancestor)))
(defface ediff-odd-diff-A
- (if (featurep 'emacs)
- '((((type pc))
- (:foreground "green3" :background "gray40"))
- (((class color) (min-colors 88))
- (:background "Grey"))
- (((class color) (min-colors 16))
- (:foreground "White" :background "Grey"))
- (((class color))
- (:foreground "red3" :background "black" :weight bold))
- (t (:italic t :stipple "gray1")))
- '((((type tty)) (:foreground "red3" :background "black" :weight bold))
- (((type pc)) (:foreground "green3" :background "gray40"))
- (((class color)) (:foreground "White" :background "Grey"))
- (t (:italic t :stipple "gray1"))))
+ '((((type pc))
+ (:foreground "green3" :background "gray40"))
+ (((class color) (min-colors 88))
+ (:background "Grey"))
+ (((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "red3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
"Face for highlighting odd-numbered non-current differences in buffer A."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1214,20 +1150,15 @@ this variable represents.")
(defface ediff-odd-diff-B
- (if (featurep 'emacs)
- '((((type pc))
- (:foreground "White" :background "gray40"))
- (((class color) (min-colors 88))
- (:background "light grey"))
- (((class color) (min-colors 16))
- (:foreground "Black" :background "light grey"))
- (((class color))
- (:foreground "cyan3" :background "black" :weight bold))
- (t (:italic t :stipple "gray1")))
- '((((type tty)) (:foreground "cyan3" :background "black" :weight bold))
- (((type pc)) (:foreground "White" :background "gray40"))
- (((class color)) (:foreground "Black" :background "light grey"))
- (t (:italic t :stipple "gray1"))))
+ '((((type pc))
+ (:foreground "White" :background "gray40"))
+ (((class color) (min-colors 88))
+ (:background "light grey"))
+ (((class color) (min-colors 16))
+ (:foreground "Black" :background "light grey"))
+ (((class color))
+ (:foreground "cyan3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
"Face for highlighting odd-numbered non-current differences in buffer B."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1240,20 +1171,15 @@ this variable represents.")
(ediff-hide-face ediff-odd-diff-face-B)
(defface ediff-odd-diff-C
- (if (featurep 'emacs)
- '((((type pc))
- (:foreground "yellow3" :background "gray40"))
- (((class color) (min-colors 88))
- (:background "Grey"))
- (((class color) (min-colors 16))
- (:foreground "White" :background "Grey"))
- (((class color))
- (:foreground "yellow3" :background "black" :weight bold))
- (t (:italic t :stipple "gray1")))
- '((((type tty)) (:foreground "yellow3" :background "black" :weight bold))
- (((type pc)) (:foreground "yellow3" :background "gray40"))
- (((class color)) (:foreground "White" :background "Grey"))
- (t (:italic t :stipple "gray1"))))
+ '((((type pc))
+ (:foreground "yellow3" :background "gray40"))
+ (((class color) (min-colors 88))
+ (:background "Grey"))
+ (((class color) (min-colors 16))
+ (:foreground "White" :background "Grey"))
+ (((class color))
+ (:foreground "yellow3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
"Face for highlighting odd-numbered non-current differences in buffer C."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1266,17 +1192,13 @@ this variable represents.")
(ediff-hide-face ediff-odd-diff-face-C)
(defface ediff-odd-diff-Ancestor
- (if (featurep 'emacs)
- '((((class color) (min-colors 88))
- (:background "gray40"))
- (((class color) (min-colors 16))
- (:foreground "cyan3" :background "gray40"))
- (((class color))
- (:foreground "green3" :background "black" :weight bold))
- (t (:italic t :stipple "gray1")))
- '((((type tty)) (:foreground "green3" :background "black" :weight bold))
- (((class color)) (:foreground "cyan3" :background "gray40"))
- (t (:italic t :stipple "gray1"))))
+ '((((class color) (min-colors 88))
+ (:background "gray40"))
+ (((class color) (min-colors 16))
+ (:foreground "cyan3" :background "gray40"))
+ (((class color))
+ (:foreground "green3" :background "black" :weight bold))
+ (t (:italic t :stipple "gray1")))
"Face for highlighting odd-numbered non-current differences in the ancestor buffer."
:group 'ediff-highlighting)
;; An internal variable. Ediff takes the face from here. When unhighlighting,
@@ -1778,24 +1700,8 @@ Unless optional argument INPLACE is non-nil, return a new string."
(convert-standard-filename fname)
fname))
-(if (featurep 'emacs)
- (defalias 'ediff-with-syntax-table 'with-syntax-table)
- (if (fboundp 'with-syntax-table)
- (defalias 'ediff-with-syntax-table 'with-syntax-table)
- ;; stolen from subr.el in emacs 21
- (defmacro ediff-with-syntax-table (table &rest body)
- (let ((old-table (make-symbol "table"))
- (old-buffer (make-symbol "buffer")))
- `(let ((,old-table (syntax-table))
- (,old-buffer (current-buffer)))
- (unwind-protect
- (progn
- (set-syntax-table (copy-syntax-table ,table))
- ,@body)
- (save-current-buffer
- (set-buffer ,old-buffer)
- (set-syntax-table ,old-table))))))))
-
+(define-obsolete-function-alias 'ediff-with-syntax-table
+ #'with-syntax-table "27.1")
(provide 'ediff-init)
;;; ediff-init.el ends here