From 8ef09cb30a526f34236f6696d06a2848043685ae Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 4 Oct 2019 15:20:41 +0200 Subject: [PATCH] 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. --- lisp/vc/ediff-diff.el | 2 +- lisp/vc/ediff-init.el | 402 ++++++++++++++++-------------------------- lisp/vc/ediff-mult.el | 11 +- lisp/vc/ediff-util.el | 29 +-- lisp/vc/ediff-wind.el | 19 +- 5 files changed, 173 insertions(+), 290 deletions(-) diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index d22c9399ac1..0c8c89610fb 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el @@ -1326,7 +1326,7 @@ arguments to `skip-chars-forward'." (syntax-tbl ediff-syntax-table)) (ediff-with-current-buffer buf (skip-chars-forward ediff-whitespace) - (ediff-with-syntax-table syntax-tbl + (with-syntax-table syntax-tbl (while (> n 1) (funcall fwd-word-fun) (skip-chars-forward ediff-whitespace) 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 diff --git a/lisp/vc/ediff-mult.el b/lisp/vc/ediff-mult.el index 66d14e6b06d..3a869bff3e4 100644 --- a/lisp/vc/ediff-mult.el +++ b/lisp/vc/ediff-mult.el @@ -154,8 +154,7 @@ Useful commands (type ? to hide them and free up screen): (define-key map "\C-?" 'previous-line) (define-key map "p" 'previous-line) (define-key map "C" 'ediff-dir-diff-copy-file) - (define-key map (if (featurep 'emacs) [mouse-2] [button2]) - 'ediff-dir-diff-copy-file) + (define-key map [mouse-2] 'ediff-dir-diff-copy-file) (define-key map [delete] 'previous-line) (define-key map [backspace] 'previous-line) map) @@ -433,9 +432,7 @@ Toggled by ediff-toggle-verbose-help-meta-buffer" ) (if ediff-no-emacs-help-in-control-buffer (define-key ediff-meta-buffer-map "\C-h" 'ediff-previous-meta-item)) - (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)) + (define-key ediff-meta-buffer-map [mouse-2] ediff-meta-action-function) (use-local-map ediff-meta-buffer-map) ;; modify ediff-meta-buffer-map here @@ -1542,9 +1539,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 (featurep 'emacs) - (ediff-overlay-put overl 'mouse-face 'highlight) - (ediff-overlay-put overl 'highlight t)) + (ediff-overlay-put overl 'mouse-face 'highlight) (ediff-overlay-put overl 'ediff-meta-info prop) (ediff-overlay-put overl 'invisible hidden) (ediff-overlay-put overl 'follow-link t) diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index ee6631dc3a2..6b2f023a222 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -126,8 +126,7 @@ to invocation.") (setq ediff-mode-map (make-sparse-keymap)) (suppress-keymap ediff-mode-map) - (define-key ediff-mode-map - (if (featurep 'emacs) [mouse-2] [button2]) 'ediff-help-for-quick-help) + (define-key ediff-mode-map [mouse-2] '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) @@ -1267,8 +1266,7 @@ This is especially useful when comparing buffers side-by-side." (interactive) (ediff-barf-if-not-control-buffer) (or (ediff-window-display-p) - (user-error "%sEmacs is not running as a window application" - (if (featurep 'emacs) "" "X"))) + (user-error "Emacs is not running as a window application")) (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)) @@ -1297,8 +1295,7 @@ which see." (interactive) (let (window-setup-func) (or (ediff-window-display-p) - (user-error "%sEmacs is not running as a window application" - (if (featurep 'emacs) "" "X"))) + (user-error "Emacs is not running as a window application")) (cond ((eq ediff-window-setup-function #'ediff-setup-windows-multiframe) (setq ediff-multiframe nil) @@ -1344,8 +1341,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see." (if (featurep 'ediff-tbar) (progn (or (ediff-window-display-p) - (user-error "%sEmacs is not running as a window application" - (if (featurep 'emacs) "" "X"))) + (user-error "Emacs is not running as a window application")) (if (ediff-use-toolbar-p) (ediff-kill-bottom-toolbar)) ;; do this only after killing the toolbar @@ -2562,10 +2558,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 (featurep 'emacs) - warp-frame - (frame-selected-window warp-frame)) - 2 1)) + (set-mouse-position warp-frame 2 1)) (mapc #'funcall after-quit-hook-internal) )) @@ -2576,14 +2569,11 @@ temporarily reverses the meaning of this variable." (let ((frame-or-win (car (mouse-position))) (buf-name "") frame obj-ok) - (setq obj-ok - (if (featurep 'emacs) - (frame-live-p frame-or-win) - (window-live-p frame-or-win))) + (setq obj-ok (frame-live-p frame-or-win)) (if obj-ok - (setq frame (if (featurep 'emacs) frame-or-win (window-frame frame-or-win)) + (setq frame frame-or-win buf-name - (buffer-name (window-buffer (frame-selected-window frame))))) + (buffer-name (window-buffer (frame-selected-window frame))))) (if (string-match "Minibuf" buf-name) nil frame))) @@ -3830,8 +3820,7 @@ Ediff Control Panel to restore highlighting." (make-overlay beg end buff nil 'rear-advance))) ;; never detach - (ediff-overlay-put - overl (if (featurep 'emacs) 'evaporate 'detachable) nil) + (ediff-overlay-put overl 'evaporate nil) ;; make overlay open-ended ;; In emacs, it is made open ended at creation time (when (featurep 'xemacs) diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index d4a60a16df1..7ca3941a375 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -959,7 +959,7 @@ create a new splittable frame if none is found." ediff-control-frame ctl-frame) ;; protect against undefined face-attribute (condition-case nil - (if (and (featurep 'emacs) (face-attribute 'mode-line :box)) + (if (face-attribute 'mode-line :box) (set-face-attribute 'mode-line ctl-frame :box nil)) (error))) @@ -1257,18 +1257,11 @@ It assumes that it is called from within the control buffer." (defun ediff-refresh-control-frame () - (if (featurep 'emacs) - ;; set frame/icon titles for Emacs - (modify-frame-parameters - ediff-control-frame - (list (cons 'title (ediff-make-base-title)) - (cons 'icon-name (ediff-make-narrow-control-buffer-id)) - )) - ;; set frame/icon titles for XEmacs - (setq frame-title-format (ediff-make-base-title) - frame-icon-title-format (ediff-make-narrow-control-buffer-id)) - ;; force an update of the frame title - (modify-frame-parameters ediff-control-frame '(())))) + ;; Set frame/icon titles. + (modify-frame-parameters + ediff-control-frame + (list (cons 'title (ediff-make-base-title)) + (cons 'icon-name (ediff-make-narrow-control-buffer-id))))) (defun ediff-make-narrow-control-buffer-id (&optional skip-name) -- 2.39.2