emacs-diffs
[Top][All Lists]
Advanced

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

master 9d14e41 3/3: Delete some XEmacs compat code from mh-e/*.el


From: Stefan Kangas
Subject: master 9d14e41 3/3: Delete some XEmacs compat code from mh-e/*.el
Date: Thu, 7 Oct 2021 10:23:16 -0400 (EDT)

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

    Delete some XEmacs compat code from mh-e/*.el
    
    * lisp/mh-e/mh-acros.el (mh-mark-active-p):
    * lisp/mh-e/mh-comp.el (mh-insert-x-mailer):
    * lisp/mh-e/mh-compat.el (mh-define-obsolete-variable-alias)
    (mh-make-obsolete-variable):
    * lisp/mh-e/mh-folder.el (mh-folder-mode-map)
    (mh-remove-xemacs-horizontal-scrollbar, mh-folder-mode):
    * lisp/mh-e/mh-gnus.el (mh-gnus-local-map-property):
    * lisp/mh-e/mh-show.el (mh-show-mode):
    * lisp/mh-e/mh-utils.el (mh-colors-available-p):
    * lisp/mh-e/mh-xface.el (mh-show-xface-function): Delete some
    XEmacs compat code.
---
 lisp/mh-e/mh-acros.el  | 11 ++++-------
 lisp/mh-e/mh-comp.el   | 14 ++------------
 lisp/mh-e/mh-folder.el | 20 ++++----------------
 lisp/mh-e/mh-gnus.el   |  3 +--
 lisp/mh-e/mh-show.el   |  3 ---
 lisp/mh-e/mh-utils.el  |  6 +++---
 lisp/mh-e/mh-xface.el  |  5 +----
 7 files changed, 15 insertions(+), 47 deletions(-)

diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index 956e42b..f4815ec 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -105,14 +105,11 @@ XEmacs and versions of GNU Emacs before 21.1 require
 
 ;;;###mh-autoload
 (defmacro mh-mark-active-p (check-transient-mark-mode-flag)
-  "A macro that expands into appropriate code in XEmacs and nil in GNU Emacs.
-In GNU Emacs if CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then
-check if variable `transient-mark-mode' is active."
-  (cond ((featurep 'xemacs)             ;XEmacs
-         '(and (boundp 'zmacs-regions) zmacs-regions (region-active-p)))
-        ((not check-transient-mark-mode-flag) ;GNU Emacs
+  "If CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then check if
+variable `transient-mark-mode' is active."
+  (cond ((not check-transient-mark-mode-flag)
          '(and (boundp 'mark-active) mark-active))
-        (t                              ;GNU Emacs
+        (t
          '(and (boundp 'transient-mark-mode) transient-mark-mode
                (boundp 'mark-active) mark-active))))
 
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 404b6b3..cbbfd76 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -1107,18 +1107,8 @@ The versions of MH-E, Emacs, and MH are shown."
   ;; Lazily initialize mh-x-mailer-string.
   (when (and mh-insert-x-mailer-flag (null mh-x-mailer-string))
     (setq mh-x-mailer-string
-          (format "MH-E %s; %s; %sEmacs %s"
-                  mh-version mh-variant-in-use
-                  (if (featurep 'xemacs) "X" "GNU ")
-                  (cond ((not (featurep 'xemacs))
-                         (string-match "[0-9]+\\.[0-9]+\\(\\.[0-9]+\\)?"
-                                       emacs-version)
-                         (match-string 0 emacs-version))
-                        ((string-match "[0-9.]*\\( +([ a-z]+[0-9]+)\\)?"
-                                       emacs-version)
-                         (match-string 0 emacs-version))
-                        (t (format "%s.%s" emacs-major-version
-                                   emacs-minor-version))))))
+          (format "MH-E %s; %s; Emacs %s"
+                  mh-version mh-variant-in-use emacs-version)))
   ;; Insert X-Mailer, but only if it doesn't already exist.
   (save-excursion
     (when (and mh-insert-x-mailer-flag
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 0597698..494dee6 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -343,11 +343,7 @@ annotation.")
   [backtab]     mh-prev-button
   "\M-\t"       mh-prev-button)
 
-(cond
- ((featurep 'xemacs)
-  (define-key mh-folder-mode-map [button2] 'mh-show-mouse))
- (t
-  (define-key mh-folder-mode-map [mouse-2] 'mh-show-mouse)))
+(define-key mh-folder-mode-map [mouse-2] 'mh-show-mouse)
 
 ;; "C-c /" prefix is used in mh-folder-mode by pgp.el and mailcrypt
 
@@ -512,12 +508,8 @@ font-lock is done highlighting.")
 ;;; MH-Folder Mode
 
 (defmacro mh-remove-xemacs-horizontal-scrollbar ()
-  "Get rid of the horizontal scrollbar that XEmacs insists on putting in."
-  (when (featurep 'xemacs)
-    '(if (and (featurep 'scrollbar)
-              (fboundp 'set-specifier))
-         (set-specifier horizontal-scrollbar-visible-p nil
-                        (cons (current-buffer) nil)))))
+  (declare (obsolete nil "29.1"))
+  nil)
 
 ;; Register mh-folder-mode as supporting which-function-mode...
 (eval-and-compile (mh-require 'which-func nil t))
@@ -639,7 +631,6 @@ perform the operation on all messages in that region.
    'imenu-create-index-function 'mh-index-create-imenu-index
                                         ; Setup imenu support
    'mh-previous-window-config nil)      ; Previous window configuration
-  (mh-remove-xemacs-horizontal-scrollbar)
   (setq truncate-lines t)
   (auto-save-mode -1)
   (setq buffer-offer-save t)
@@ -651,10 +642,7 @@ perform the operation on all messages in that region.
   (setq revert-buffer-function #'mh-undo-folder)
   (add-to-list 'minor-mode-alist '(mh-showing-mode " Show"))
   (mh-inc-spool-make)
-  (mh-set-help mh-folder-mode-help-messages)
-  (if (and (featurep 'xemacs)
-           font-lock-auto-fontify)
-      (turn-on-font-lock)))             ; Force font-lock in XEmacs.
+  (mh-set-help mh-folder-mode-help-messages))
 
 
 
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el
index cc60f7b..a3ba859 100644
--- a/lisp/mh-e/mh-gnus.el
+++ b/lisp/mh-e/mh-gnus.el
@@ -39,8 +39,7 @@
 ;; TODO This is not in Gnus 5.11.
 (defun-mh mh-gnus-local-map-property gnus-local-map-property (map)
   "Return a list suitable for a text property list specifying keymap MAP."
-  (cond ((featurep 'xemacs) (list 'keymap map))
-        ((>= emacs-major-version 21) (list 'keymap map))
+  (cond ((>= emacs-major-version 21) (list 'keymap map))
         (t (list 'local-map map))))
 
 ;; Copy of function from mm-decode.el.
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el
index d52a859..614a825 100644
--- a/lisp/mh-e/mh-show.el
+++ b/lisp/mh-e/mh-show.el
@@ -855,9 +855,6 @@ See also `mh-folder-mode'.
     (mh-gnus-article-highlight-citation))
    (t
     (setq font-lock-defaults '(mh-show-font-lock-keywords t))))
-  (if (and (featurep 'xemacs)
-           font-lock-auto-fontify)
-      (turn-on-font-lock))
   (when mh-decode-mime-flag
     (mh-make-local-hook 'kill-buffer-hook)
     (add-hook 'kill-buffer-hook #'mh-mime-cleanup nil t))
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index 137e45b..6d9a3af 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -61,9 +61,9 @@ used in lieu of `search' in the CL package."
 ;;;###mh-autoload
 (defun mh-colors-available-p ()
   "Check if colors are available in the Emacs being used."
-  (or (featurep 'xemacs)
-      (let ((color-cells (mh-display-color-cells)))
-        (and (numberp color-cells) (>= color-cells 8)))))
+  ;; FIXME: Can this be replaced with `display-color-p'?
+  (let ((color-cells (mh-display-color-cells)))
+    (and (numberp color-cells) (>= color-cells 8))))
 
 ;;;###mh-autoload
 (defun mh-colors-in-use-p ()
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el
index 473fb40..73406f0 100644
--- a/lisp/mh-e/mh-xface.el
+++ b/lisp/mh-e/mh-xface.el
@@ -31,10 +31,7 @@
 (autoload 'message-fetch-field "message")
 
 (defvar mh-show-xface-function
-  (cond ((and (featurep 'xemacs) (locate-library "x-face") (not (featurep 
'xface)))
-         (load "x-face" t t)
-         #'mh-face-display-function)
-        ((>= emacs-major-version 21)
+  (cond ((>= emacs-major-version 21)
          #'mh-face-display-function)
         (t #'ignore))
   "Determine at run time what function should be called to display X-Face.")



reply via email to

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