emacs-diffs
[Top][All Lists]
Advanced

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

master d51f684 2/2: Remove XEmacs compat code from lisp/obsolete/*.el


From: Stefan Kangas
Subject: master d51f684 2/2: Remove XEmacs compat code from lisp/obsolete/*.el
Date: Fri, 8 Oct 2021 16:51:51 -0400 (EDT)

branch: master
commit d51f684aef8e4283377014cc544c1b214a958d35
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Remove XEmacs compat code from lisp/obsolete/*.el
    
    * lisp/obsolete/crisp.el (crisp-kill-region)
    (crisp-region-active):
    * lisp/obsolete/eudcb-ph.el (eudc-ph-open-session):
    * lisp/obsolete/fast-lock.el (fast-lock-save-faces):
    * lisp/obsolete/iswitchb.el (iswitchb-completion-help)
    (iswitchb-case):
    * lisp/obsolete/otodo-mode.el (todo-mode):
    * lisp/obsolete/pgg-parse.el (pgg-parse-armor):
    * lisp/obsolete/pgg.el (pgg-verify-region):
    * lisp/obsolete/tpu-edt.el (activate-mark-hook, tpu-mark)
    (tpu-set-mark, tpu-load-xkeys):
    * lisp/obsolete/tpu-mapper.el (tpu-map-key, tpu-mapper): Remove XEmacs
    compat code.
---
 lisp/obsolete/crisp.el      | 22 ++++--------------
 lisp/obsolete/eudcb-ph.el   |  4 +---
 lisp/obsolete/fast-lock.el  | 35 ++---------------------------
 lisp/obsolete/iswitchb.el   | 16 ++------------
 lisp/obsolete/otodo-mode.el |  3 +--
 lisp/obsolete/pgg-parse.el  |  3 +--
 lisp/obsolete/pgg.el        |  3 +--
 lisp/obsolete/tpu-edt.el    | 23 ++++++-------------
 lisp/obsolete/tpu-mapper.el | 54 ++++++++++++---------------------------------
 9 files changed, 33 insertions(+), 130 deletions(-)

diff --git a/lisp/obsolete/crisp.el b/lisp/obsolete/crisp.el
index 69bf3ed..ccf9aaa 100644
--- a/lisp/obsolete/crisp.el
+++ b/lisp/obsolete/crisp.el
@@ -231,27 +231,13 @@ does not load the scroll-all package."
 
 ;; The cut and paste routines are different between XEmacs and Emacs
 ;; so we need to set up aliases for the functions.
-
-(defalias 'crisp-set-clipboard
-  (if (fboundp 'clipboard-kill-ring-save)
-      'clipboard-kill-ring-save
-    'copy-primary-selection))
-
-(defalias 'crisp-kill-region
-  (if (fboundp 'clipboard-kill-region)
-      'clipboard-kill-region
-    'kill-primary-selection))
-
-(defalias 'crisp-yank-clipboard
-  (if (fboundp 'clipboard-yank)
-      'clipboard-yank
-    'yank-clipboard-selection))
+(defalias 'crisp-set-clipboard 'clipboard-kill-ring-save)
+(defalias 'crisp-kill-region 'clipboard-kill-region)
+(defalias 'crisp-yank-clipboard 'clipboard-yank)
 
 (defun crisp-region-active ()
   "Compatibility function to test for an active region."
-  (if (featurep 'xemacs)
-      zmacs-region-active-p
-    mark-active))
+  mark-active)
 
 (defun crisp-version (&optional arg)
   "Version number of the CRiSP emulator package.
diff --git a/lisp/obsolete/eudcb-ph.el b/lisp/obsolete/eudcb-ph.el
index 187879c..51a6780 100644
--- a/lisp/obsolete/eudcb-ph.el
+++ b/lisp/obsolete/eudcb-ph.el
@@ -176,9 +176,7 @@ SERVER is either a string naming the server or a list (NAME 
PORT)."
       (setq eudc-ph-process-buffer (get-buffer-create (format " *PH-%s*" 
host)))
       (with-current-buffer eudc-ph-process-buffer
        (erase-buffer)
-       (setq eudc-ph-read-point (point))
-       (and (featurep 'xemacs) (featurep 'mule)
-            (set-buffer-file-coding-system 'binary t)))
+        (setq eudc-ph-read-point (point)))
       (setq process (open-network-stream "ph" eudc-ph-process-buffer host 
port))
       (if (null process)
          (throw 'done nil))
diff --git a/lisp/obsolete/fast-lock.el b/lisp/obsolete/fast-lock.el
index 960233d..1dee712 100644
--- a/lisp/obsolete/fast-lock.el
+++ b/lisp/obsolete/fast-lock.el
@@ -283,10 +283,7 @@ If a number, only buffers greater than this size have 
processing messages."
                 (other :tag "always" t)
                 (integer :tag "size")))
 
-(defvar fast-lock-save-faces
-  (when (featurep 'xemacs)
-    ;; XEmacs uses extents for everything, so we have to pick the right ones.
-    font-lock-face-list)
+(defvar fast-lock-save-faces nil
   "Faces that will be saved in a Font Lock cache file.
 If nil, means information for all faces will be saved.")
 
@@ -707,35 +704,7 @@ See `fast-lock-get-face-properties'."
          (while regions
            (add-text-properties (nth 0 regions) (nth 1 regions) plist)
            (setq regions (nthcdr 2 regions))))))))
-
-;; Functions for XEmacs:
-
-(unless (boundp 'font-lock-syntactic-keywords)
-  (defvar font-lock-syntactic-keywords nil))
-
-(unless (boundp 'font-lock-inhibit-thing-lock)
-  (defvar font-lock-inhibit-thing-lock nil))
-
-(unless (fboundp 'font-lock-compile-keywords)
-  (defalias 'font-lock-compile-keywords #'identity))
-
-(unless (fboundp 'font-lock-eval-keywords)
-  (defun font-lock-eval-keywords (keywords)
-    (if (symbolp keywords)
-       (font-lock-eval-keywords (if (fboundp keywords)
-                                    (funcall keywords)
-                                  (eval keywords t)))
-      keywords)))
-
-(unless (fboundp 'font-lock-value-in-major-mode)
-  (defun font-lock-value-in-major-mode (alist)
-    (if (consp alist)
-       (cdr (or (assq major-mode alist) (assq t alist)))
-      alist)))
-
-(unless (fboundp 'current-message)
-  (defun current-message ()
-    ""))
+
 
 ;; Install ourselves:
 
diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el
index a630baf..807f548 100644
--- a/lisp/obsolete/iswitchb.el
+++ b/lisp/obsolete/iswitchb.el
@@ -977,17 +977,7 @@ Return the modified list with the last element prepended 
to it."
          (set-buffer buf))
 
       (with-output-to-temp-buffer temp-buf
-       (if (featurep 'xemacs)
-
-           ;; XEmacs extents are put on by default, doesn't seem to be
-           ;; any way of switching them off.
-           (display-completion-list (or iswitchb-matches iswitchb-buflist)
-                                    :help-string "iswitchb "
-                                    :activate-callback
-                                    (lambda (_x _y _z)
-                                      (message "doesn't work yet, sorry!")))
-         ;; else running Emacs
-         (display-completion-list (or iswitchb-matches iswitchb-buflist))))
+        (display-completion-list (or iswitchb-matches iswitchb-buflist)))
       (setq iswitchb-common-match-inserted nil))))
 
 ;;; KILL CURRENT BUFFER
@@ -1326,9 +1316,7 @@ This is an example function which can be hooked on to
   "Return non-nil if we should ignore case when matching.
 See the variable `iswitchb-case' for details."
   (if iswitchb-case
-      (if (featurep 'xemacs)
-         (isearch-no-upper-case-p iswitchb-text)
-       (isearch-no-upper-case-p iswitchb-text t))))
+      (isearch-no-upper-case-p iswitchb-text t)))
 
 ;;;###autoload
 (define-minor-mode iswitchb-mode
diff --git a/lisp/obsolete/otodo-mode.el b/lisp/obsolete/otodo-mode.el
index 47f5089..a71d2b8 100644
--- a/lisp/obsolete/otodo-mode.el
+++ b/lisp/obsolete/otodo-mode.el
@@ -908,8 +908,7 @@ If INCLUDE-SEP is non-nil, return point after the 
separator."
 ;;;###autoload
 (define-derived-mode todo-mode nil "TODO"
   "Major mode for editing TODO lists."
-  (when (featurep 'xemacs)
-    (easy-menu-add todo-menu)))
+  nil)
 
 (with-suppressed-warnings ((lexical date entry))
   (defvar date)
diff --git a/lisp/obsolete/pgg-parse.el b/lisp/obsolete/pgg-parse.el
index 2c76365..3e4c216 100644
--- a/lisp/obsolete/pgg-parse.el
+++ b/lisp/obsolete/pgg-parse.el
@@ -496,8 +496,7 @@
 (defun pgg-parse-armor (string)
   (with-temp-buffer
     (buffer-disable-undo)
-    (unless (featurep 'xemacs)
-      (set-buffer-multibyte nil))
+    (set-buffer-multibyte nil)
     (insert string)
     (pgg-decode-armor-region (point-min)(point))))
 
diff --git a/lisp/obsolete/pgg.el b/lisp/obsolete/pgg.el
index 5ed5993..127e1dc 100644
--- a/lisp/obsolete/pgg.el
+++ b/lisp/obsolete/pgg.el
@@ -376,8 +376,7 @@ signer's public key from `pgg-default-keyserver-address'."
          (if (null signature) nil
            (with-temp-buffer
              (buffer-disable-undo)
-             (unless (featurep 'xemacs)
-               (set-buffer-multibyte nil))
+              (set-buffer-multibyte nil)
              (insert-file-contents signature)
              (cdr (assq 2 (pgg-decode-armor-region
                            (point-min)(point-max)))))))
diff --git a/lisp/obsolete/tpu-edt.el b/lisp/obsolete/tpu-edt.el
index e0e89c3..b59fb8c 100644
--- a/lisp/obsolete/tpu-edt.el
+++ b/lisp/obsolete/tpu-edt.el
@@ -650,12 +650,8 @@ GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
   (setq tpu-mark-flag (if transient-mark-mode "" (if (tpu-mark) " @" "  ")))
   (force-mode-line-update))
 
-(cond ((featurep 'xemacs)
-       (add-hook 'zmacs-deactivate-region-hook 'tpu-update-mode-line)
-       (add-hook 'zmacs-activate-region-hook 'tpu-update-mode-line))
-      (t
-       (add-hook 'activate-mark-hook 'tpu-update-mode-line)
-       (add-hook 'deactivate-mark-hook 'tpu-update-mode-line)))
+(add-hook 'activate-mark-hook 'tpu-update-mode-line)
+(add-hook 'deactivate-mark-hook 'tpu-update-mode-line)
 
 
 ;;;
@@ -727,15 +723,13 @@ Otherwise sets the tpu-match markers to nil and returns 
nil."
   "TPU-edt version of the mark function.
 Return the appropriate value of the mark for the current
 version of Emacs."
-  (cond ((featurep 'xemacs) (mark (not zmacs-regions)))
-       (t (and mark-active (mark (not transient-mark-mode))))))
+  (and mark-active (mark (not transient-mark-mode))))
 
 (defun tpu-set-mark (pos)
   "TPU-edt version of the `set-mark' function.
 Sets the mark at POS and activates the region according to the
 current version of Emacs."
-  (set-mark pos)
-  (when (featurep 'xemacs) (when pos (zmacs-activate-region))))
+  (set-mark pos))
 
 (defun tpu-string-prompt (prompt history-symbol)
   "Read a string with PROMPT."
@@ -2306,17 +2300,14 @@ Accepts a prefix argument for the number of 
tpu-pan-columns to scroll."
 ;;;
 (defun tpu-load-xkeys (file)
   "Load the TPU-edt X-windows key definitions FILE.
-If FILE is nil, try to load a default file.  The default file names are
-`~/.tpu-lucid-keys' for XEmacs, and `~/.tpu-keys' for Emacs."
+If FILE is nil, try to load a default file.  The default file name is
+`~/.tpu-keys'."
   (interactive "fX key definition file: ")
   (cond (file
         (setq file (expand-file-name file)))
        (tpu-xkeys-file
         (setq file (expand-file-name tpu-xkeys-file)))
-       ((featurep 'xemacs)
-        (setq file (convert-standard-filename
-                    (expand-file-name "~/.tpu-lucid-keys"))))
-       (t
+        (t
         (setq file (convert-standard-filename
                     (expand-file-name "~/.tpu-keys")))
         (and (not (file-exists-p file))
diff --git a/lisp/obsolete/tpu-mapper.el b/lisp/obsolete/tpu-mapper.el
index 5ae0a65..02ba363 100644
--- a/lisp/obsolete/tpu-mapper.el
+++ b/lisp/obsolete/tpu-mapper.el
@@ -46,24 +46,14 @@
 ;;;
 (defun tpu-map-key (ident descrip func gold-func)
   (interactive)
-  (if (featurep 'xemacs)
-      (progn
-       (setq tpu-key-seq (read-key-sequence
-                           (format "Press %s%s: " ident descrip))
-              tpu-key (format "[%s]" (event-key (aref tpu-key-seq 0))))
-       (unless (equal tpu-key tpu-return)
-          (set-buffer "Keys")
-          (insert (format"(global-set-key %s %s)\n" tpu-key func))
-          (set-buffer "Gold-Keys")
-          (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key 
gold-func))))
-    (message "Press %s%s: " ident descrip)
-    (setq tpu-key-seq (read-event)
-          tpu-key (format "[%s]" tpu-key-seq))
-    (unless (equal tpu-key tpu-return)
-      (set-buffer "Keys")
-      (insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func))
-      (set-buffer "Gold-Keys")
-      (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func))))
+  (message "Press %s%s: " ident descrip)
+  (setq tpu-key-seq (read-event)
+        tpu-key (format "[%s]" tpu-key-seq))
+  (unless (equal tpu-key tpu-return)
+    (set-buffer "Keys")
+    (insert (format"(define-key tpu-global-map %s %s)\n" tpu-key func))
+    (set-buffer "Gold-Keys")
+    (insert (format "(define-key tpu-gold-map %s %s)\n" tpu-key gold-func)))
   (set-buffer "Directions")
   tpu-key)
 
@@ -103,8 +93,7 @@ your local X guru can try to figure out why the key is being 
ignored."
 
   ;; Make sure the window is big enough to display the instructions
 
-  (if (featurep 'xemacs) (set-screen-size (selected-screen) 80 36)
-    (set-frame-size (selected-frame) 80 36))
+  (set-frame-size (selected-frame) 80 36)
 
   ;; Create buffers - Directions, Keys, Gold-Keys
 
@@ -162,14 +151,9 @@ your local X guru can try to figure out why the key is 
being ignored."
 
   ;; Save <CR> for future reference
 
-  (cond
-   ((featurep 'xemacs)
-    (setq tpu-return-seq (read-key-sequence "Hit carriage-return <CR> to 
continue "))
-    (setq tpu-return (concat "[" (format "%s" (event-key (aref tpu-return-seq 
0))) "]")))
-   (t
-    (message "Hit carriage-return <CR> to continue ")
-    (setq tpu-return-seq (read-event))
-    (setq tpu-return (concat "[" (format "%s" tpu-return-seq) "]"))))
+  (message "Hit carriage-return <CR> to continue ")
+  (setq tpu-return-seq (read-event))
+  (setq tpu-return (concat "[" (format "%s" tpu-return-seq) "]"))
 
   ;; Build the keymap file
 
@@ -308,24 +292,14 @@ your local X guru can try to figure out why the key is 
being ignored."
 ;;
 ")
 
-  (cond ((featurep 'xemacs)
-        (insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter-seq))
-        (insert (format "(setq tpu-help-return \"%s\")\n" tpu-return-seq))
-        (insert "(setq tpu-help-N \"[#<keypress-event N>]\")\n")
-        (insert "(setq tpu-help-n \"[#<keypress-event n>]\")\n")
-        (insert "(setq tpu-help-P \"[#<keypress-event P>]\")\n")
-        (insert "(setq tpu-help-p \"[#<keypress-event p>]\")\n"))
-       (t
-        (insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter))))
+  (insert (format "(setq tpu-help-enter \"%s\")\n" tpu-enter))
 
   (append-to-buffer "Keys" 1 (point))
   (set-buffer "Keys")
 
   ;; Save the key mapping program
 
-  (let ((file
-        (convert-standard-filename
-         (if (featurep 'xemacs) "~/.tpu-lucid-keys" "~/.tpu-keys"))))
+  (let ((file (convert-standard-filename "~/.tpu-keys")))
     (set-visited-file-name
      (read-file-name (format "Save key mapping to file (default %s): " file) 
"" file)))
   (save-buffer)



reply via email to

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