emacs-diffs
[Top][All Lists]
Advanced

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

master 0a22747 2/2: Remove more XEmacs compat code from ediff*.el


From: Stefan Kangas
Subject: master 0a22747 2/2: Remove more XEmacs compat code from ediff*.el
Date: Sat, 21 Mar 2020 03:18:58 -0400 (EDT)

branch: master
commit 0a22747c3f17da0e64cbb6d82aab3a14e716f0fd
Author: Stefan Kangas <address@hidden>
Commit: Stefan Kangas <address@hidden>

    Remove more XEmacs compat code from ediff*.el
    
    * lisp/vc/ediff-init.el (ediff-H-glyph):
    * lisp/vc/ediff-util.el (ediff-inferior-compare-regions)
    (ediff-setup-keymap):
    * lisp/vc/ediff-wind.el (ediff-control-frame-parameters)
    (ediff-prefer-iconified-control-frame)
    (ediff-setup-control-frame, ediff-xemacs-select-frame-hook): Remove
    XEmacs compat code and declare compatibility functions obsolete.
    
    * lisp/vc/ediff-init.el (ediff-temp-file-prefix): Redefine as
    obsolete variable alias for 'temporary-file-directory'.
    * lisp/vc/ediff-util.el (ediff-make-temp-file): Don't use obsolete
    variable name.
---
 lisp/vc/ediff-init.el | 22 ++++------------------
 lisp/vc/ediff-util.el |  7 ++-----
 lisp/vc/ediff-wind.el | 21 +++++++++------------
 3 files changed, 15 insertions(+), 35 deletions(-)

diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index cbd8c0d..e59d4b5 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -1257,22 +1257,8 @@ Instead, C-h would jump to previous difference."
   :type 'boolean
   :group 'ediff)
 
-;; This is the same as temporary-file-directory from Emacs 20.3.
-;; Copied over here because XEmacs doesn't have this variable.
-(defcustom ediff-temp-file-prefix
-  (file-name-as-directory
-   (cond ((boundp 'temporary-file-directory) temporary-file-directory)
-        ((fboundp 'temp-directory) (temp-directory))
-        (t "/tmp/")))
-;;;  (file-name-as-directory
-;;;   (cond ((memq system-type '(ms-dos windows-nt))
-;;;      (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp"))
-;;;     (t
-;;;      (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp"))))
-  "Prefix to put on Ediff temporary file names.
-Do not start with `~/' or `~USERNAME/'."
-  :type 'string
-  :group 'ediff)
+(define-obsolete-variable-alias 'ediff-temp-file-prefix
+  'temporary-file-directory "28.1")
 
 (defcustom ediff-temp-file-mode 384    ; u=rw only
   "Mode for Ediff temporary files."
@@ -1287,8 +1273,8 @@ This default should work without changes."
   :type 'regexp
   :group 'ediff)
 
-;; needed to simulate frame-char-width in XEmacs.
-(defvar ediff-H-glyph (if (featurep 'xemacs) (make-glyph "H")))
+(defvar ediff-H-glyph nil)
+(make-obsolete-variable 'ediff-H-glyph nil "28.1")
 
 
 ;; Temporary file used for refining difference regions in buffer A.
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el
index 5f8a4a8..4a84c1e 100644
--- a/lisp/vc/ediff-util.el
+++ b/lisp/vc/ediff-util.el
@@ -131,7 +131,6 @@ to invocation.")
   (define-key ediff-mode-map [delete] 'ediff-previous-difference)
   (define-key ediff-mode-map "\C-h" (if ediff-no-emacs-help-in-control-buffer
                                        'ediff-previous-difference nil))
-  ;; must come after C-h, or else C-h wipes out backspace's binding in XEmacs
   (define-key ediff-mode-map [backspace] 'ediff-previous-difference)
   (define-key ediff-mode-map [?\S-\ ] 'ediff-previous-difference)
   (define-key ediff-mode-map "n" 'ediff-next-difference)
@@ -3144,8 +3143,8 @@ Hit \\[ediff-recenter] to reset the windows afterward."
             (> (length p) 2))
        (setq short-p (substring p 0 2)))
 
-    (setq f (concat ediff-temp-file-prefix p)
-         short-f (concat ediff-temp-file-prefix short-p)
+    (setq f (concat temporary-file-directory p)
+          short-f (concat temporary-file-directory short-p)
          f (cond (given-file)
                  ((find-file-name-handler f 'insert-file-contents)
                   ;; to thwart file name handlers in write-region,
@@ -3449,7 +3448,6 @@ Without an argument, it saves customized diff argument, 
if available
 (declare-function ediff-regions-internal "ediff"
                  (buffer-a beg-a end-a buffer-b beg-b end-b
                            startup-hooks job-name word-mode setup-parameters))
-(defvar zmacs-regions) ;;XEmacs'ism.
 
 (defun ediff-inferior-compare-regions ()
   "Compare regions in an active Ediff session.
@@ -3461,7 +3459,6 @@ Ediff Control Panel to restore highlighting."
   (interactive)
   (let ((answer "")
        (possibilities (list ?A ?B ?C))
-       (zmacs-regions t)
        use-current-diff-p
        begA begB endA endB bufA bufB)
 
diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el
index 7b2e110..a23d720 100644
--- a/lisp/vc/ediff-wind.el
+++ b/lisp/vc/ediff-wind.el
@@ -156,12 +156,10 @@ In this case, Ediff will use those frames to display 
these buffers."
    '(name . "Ediff")
    ;;'(unsplittable . t)
    '(minibuffer . nil)
-   '(user-position . t)              ; Emacs only
-   '(vertical-scroll-bars . nil)  ; Emacs only
-   '(scrollbar-width . 0)         ; XEmacs only
-   '(scrollbar-height . 0)        ; XEmacs only
-   '(menu-bar-lines . 0)          ; Emacs only
-   '(tool-bar-lines . 0)          ; Emacs 21+ only
+   '(user-position . t)
+   '(vertical-scroll-bars . nil)
+   '(menu-bar-lines . 0)
+   '(tool-bar-lines . 0)
    '(left-fringe    . 0)
    '(right-fringe   . 0)
    ;; don't lower but auto-raise
@@ -260,10 +258,9 @@ the frame used for the wide display.")
 This has effect only on a windowing system.
 If t, hitting `?' to toggle control panel off iconifies it.
 
-This is only useful in Emacs and only for certain kinds of window managers,
-such as TWM and its derivatives, since the window manager must permit
-keyboard input to go into icons.  XEmacs completely ignores keyboard input
-into icons, regardless of the window manager."
+This is only useful for certain kinds of window managers, such as
+TWM and its derivatives, since the window manager must permit
+keyboard input to go into icons."
   :type 'boolean)
 
 ;;; Functions
@@ -952,8 +949,7 @@ create a new splittable frame if none is found."
     ;; just a precaution--we should be in ctl-buffer already
     (with-current-buffer ctl-buffer
       (make-local-variable 'frame-title-format)
-      (make-local-variable 'frame-icon-title-format)   ; XEmacs
-      (make-local-variable 'icon-title-format))        ; Emacs
+      (make-local-variable 'icon-title-format))
 
     (ediff-setup-control-buffer ctl-buffer)
     (setq dont-iconify-ctl-frame
@@ -1098,6 +1094,7 @@ create a new splittable frame if none is found."
       )))
 
 (defun ediff-xemacs-select-frame-hook ()
+  (declare (obsolete nil "28.1"))
   (if (and (equal (selected-frame) ediff-control-frame)
           (not ediff-use-long-help-message))
       (raise-frame ediff-control-frame)))



reply via email to

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