]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove XEmacs compat code from lisp/obsolete/*.el
authorStefan Kangas <stefan@marxist.se>
Fri, 8 Oct 2021 20:50:49 +0000 (22:50 +0200)
committerStefan Kangas <stefan@marxist.se>
Fri, 8 Oct 2021 20:50:49 +0000 (22:50 +0200)
* 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
lisp/obsolete/eudcb-ph.el
lisp/obsolete/fast-lock.el
lisp/obsolete/iswitchb.el
lisp/obsolete/otodo-mode.el
lisp/obsolete/pgg-parse.el
lisp/obsolete/pgg.el
lisp/obsolete/tpu-edt.el
lisp/obsolete/tpu-mapper.el

index 69bf3ed12bcfaceace55b4188fb6543861d030c2..ccf9aaa2b6aaf2defd05066f866f8429f0291bc8 100644 (file)
@@ -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.
index 187879ce2f76d8fb85bd7fc22b89ef9ae8d1eb6c..51a6780d903296e88bb9157151afd92f70598d3a 100644 (file)
@@ -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))
index 960233d5627ab0bbca9f579d6fc4bbef26246dd2..1dee7120c0e9504e0043c791f35fd53b0615bdbd 100644 (file)
@@ -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.")
 \f
@@ -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))))))))
-\f
-;; 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 ()
-    ""))
+
 \f
 ;; Install ourselves:
 
index a630baf3543284f273e61ae51701f82c2268caf2..807f5485d5fe3b4d50900c84158bec77ed91bf79 100644 (file)
@@ -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
index 47f5089452f34c7970deb833980ab1f88b56c27d..a71d2b82e4cb80691a8957c572dedcf6d5406afc 100644 (file)
@@ -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)
index 2c76365a415240a479f87e2673ebc2761d1ae108..3e4c216abefcfdd4326dd38859f7608e1a3ab2a1 100644 (file)
 (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))))
 
index 5ed59933f23d10793aba139819f614aaa1f628cb..127e1dc15c0811f488cc80cdf962c793794f22fd 100644 (file)
@@ -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)))))))
index e0e89c390ea470a1244cfc6b64cf8b58b50168c2..b59fb8c868c44341f008c907a2b779721ac7e631 100644 (file)
@@ -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))
index 5ae0a6558d5b909b0666d779bdeb022e47596aa7..02ba36325049b7c32d562eb2147d9ade6c7b32d2 100644 (file)
 ;;;
 (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)