aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2021-10-11 23:58:24 +0200
committerStefan Kangas2021-10-12 01:55:57 +0200
commitf8d750135e90282864019b4484d0f0dec34cbd2f (patch)
tree64ad133fac3b0fee6364f64c7f1dfec21a9da2f4
parent76d75df8e7ae19c8aca3ab9a7fbee25fc3cf1e9e (diff)
downloademacs-f8d750135e90282864019b4484d0f0dec34cbd2f.tar.gz
emacs-f8d750135e90282864019b4484d0f0dec34cbd2f.zip
Remove some more MH-E compat code
* lisp/mh-e/mh-acros.el (defun-mh, defmacro-mh): Make obsolete. * lisp/mh-e/mh-gnus.el (mh-gnus-local-map-property): Make obsolete. * lisp/mh-e/mh-mime.el (mh-insert-mime-security-button) (mh-insert-mime-button): Don't use above obsolete function. * lisp/mh-e/mh-gnus.el (mh-mm-text-html-renderer): Make obsolete. * lisp/mh-e/mh-mime.el (mh-mm-inline-media-tests) (mh-signature-highlight): Remove references to removed Gnus variable 'mm-inline-text-html-renderer'. * lisp/mh-e/mh-letter.el (mh-letter-complete): Make into obsolete function alias for 'completion-at-point'. Update callers. * lisp/mh-e/mh-e.el (mh-inc-spool-list, mh-show-use-xface-flag): * lisp/mh-e/mh-comp.el (mh-ascii-buffer-p): * lisp/mh-e/mh-show.el: * lisp/mh-e/mh-utils.el: Remove some references to XEmacs. * lisp/mh-e/mh-comp.el (mh-send-letter): Remove XEmacs and Emacs compat code. * lisp/mh-e/mh-compat.el (mh-display-completion-list): Remove compat code for Emacs 22 and earlier. * lisp/mh-e/mh-e.el (mh-inherit-face-flag) (mh-min-colors-defined-flag): Make XEmacs and Emacs 21 compat variables obsolete. (mh-face-data): Adjust to assume above variables are always t. * lisp/mh-e/mh-mime.el (mh-mime-button-map): Remove XEmacs and Emacs 20 compat code. * lisp/mh-e/mh-utils.el (mh-mapc): Make Emacs 20 compat function into obsolete function alias for mapc. Update callers. * lisp/mh-e/mh-xface.el (mh-show-xface-function, mh-show-xface): Remove Emacs 20 compat code.
-rw-r--r--lisp/mh-e/mh-acros.el6
-rw-r--r--lisp/mh-e/mh-comp.el27
-rw-r--r--lisp/mh-e/mh-compat.el10
-rw-r--r--lisp/mh-e/mh-e.el65
-rw-r--r--lisp/mh-e/mh-folder.el58
-rw-r--r--lisp/mh-e/mh-gnus.el9
-rw-r--r--lisp/mh-e/mh-letter.el29
-rw-r--r--lisp/mh-e/mh-mime.el27
-rw-r--r--lisp/mh-e/mh-seq.el8
-rw-r--r--lisp/mh-e/mh-show.el7
-rw-r--r--lisp/mh-e/mh-utils.el12
-rw-r--r--lisp/mh-e/mh-xface.el8
12 files changed, 86 insertions, 180 deletions
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el
index 3674acc6cc2..d18579d7ea6 100644
--- a/lisp/mh-e/mh-acros.el
+++ b/lisp/mh-e/mh-acros.el
@@ -75,7 +75,8 @@
75 "Create function NAME. 75 "Create function NAME.
76If FUNCTION exists, then NAME becomes an alias for FUNCTION. 76If FUNCTION exists, then NAME becomes an alias for FUNCTION.
77Otherwise, create function NAME with ARG-LIST and BODY." 77Otherwise, create function NAME with ARG-LIST and BODY."
78 (declare (indent defun) (doc-string 4) 78 (declare (obsolete defun "29.1")
79 (indent defun) (doc-string 4)
79 (debug (&define name symbolp sexp def-body))) 80 (debug (&define name symbolp sexp def-body)))
80 `(defalias ',name 81 `(defalias ',name
81 (if (fboundp ',function) 82 (if (fboundp ',function)
@@ -87,7 +88,8 @@ Otherwise, create function NAME with ARG-LIST and BODY."
87 "Create macro NAME. 88 "Create macro NAME.
88If MACRO exists, then NAME becomes an alias for MACRO. 89If MACRO exists, then NAME becomes an alias for MACRO.
89Otherwise, create macro NAME with ARG-LIST and BODY." 90Otherwise, create macro NAME with ARG-LIST and BODY."
90 (declare (indent defun) (doc-string 4) 91 (declare (obsolete defmacro "29.1")
92 (indent defun) (doc-string 4)
91 (debug (&define name symbolp sexp def-body))) 93 (debug (&define name symbolp sexp def-body)))
92 (let ((defined-p (fboundp macro))) 94 (let ((defined-p (fboundp macro)))
93 (if defined-p 95 (if defined-p
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 8d5a4725520..4681ad885d0 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -304,21 +304,7 @@ message and scan line."
304 (let ((draft-buffer (current-buffer)) 304 (let ((draft-buffer (current-buffer))
305 (file-name buffer-file-name) 305 (file-name buffer-file-name)
306 (config mh-previous-window-config) 306 (config mh-previous-window-config)
307 ;; FIXME this is subtly different to select-message-coding-system. 307 (coding-system-for-write (select-message-coding-system)))
308 (coding-system-for-write
309 (if (fboundp 'select-message-coding-system)
310 (select-message-coding-system) ; Emacs has this since at least 21.1
311 (if (and (local-variable-p 'buffer-file-coding-system
312 (current-buffer)) ;XEmacs needs two args
313 ;; We're not sure why, but buffer-file-coding-system
314 ;; tends to get set to undecided-unix.
315 (not (memq buffer-file-coding-system
316 '(undecided undecided-unix undecided-dos))))
317 buffer-file-coding-system
318 (or (and (boundp 'sendmail-coding-system) sendmail-coding-system)
319 (and (default-boundp 'buffer-file-coding-system)
320 (default-value 'buffer-file-coding-system))
321 'utf-8)))))
322 ;; Older versions of spost do not support -msgid and -mime. 308 ;; Older versions of spost do not support -msgid and -mime.
323 (unless mh-send-uses-spost-flag 309 (unless mh-send-uses-spost-flag
324 ;; Adding a Message-ID field looks good, makes it easier to search for 310 ;; Adding a Message-ID field looks good, makes it easier to search for
@@ -433,7 +419,7 @@ See also `mh-send'."
433 (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil) 419 (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil)
434 (mh-insert-header-separator) 420 (mh-insert-header-separator)
435 ;; Merge in components 421 ;; Merge in components
436 (mh-mapc 422 (mapc
437 (lambda (header-field) 423 (lambda (header-field)
438 (let ((field (car header-field)) 424 (let ((field (car header-field))
439 (value (cdr header-field)) 425 (value (cdr header-field))
@@ -697,7 +683,7 @@ message and scan line."
697 ;; For "From", the first value wins, with the identity's "From" 683 ;; For "From", the first value wins, with the identity's "From"
698 ;; trumping anything in the distcomps file. 684 ;; trumping anything in the distcomps file.
699 (let ((components-file (mh-bare-components mh-dist-formfile))) 685 (let ((components-file (mh-bare-components mh-dist-formfile)))
700 (mh-mapc 686 (mapc
701 (lambda (header-field) 687 (lambda (header-field)
702 (let ((field (car header-field)) 688 (let ((field (car header-field))
703 (value (cdr header-field)) 689 (value (cdr header-field))
@@ -1276,11 +1262,8 @@ discarded."
1276 (set-syntax-table old-syntax-table)))) 1262 (set-syntax-table old-syntax-table))))
1277 1263
1278(defun mh-ascii-buffer-p () 1264(defun mh-ascii-buffer-p ()
1279 "Check if current buffer is entirely composed of ASCII. 1265 "Check if current buffer is entirely composed of ASCII."
1280The function doesn't work for XEmacs since `find-charset-region' 1266 (cl-loop for charset in (find-charset-region (point-min) (point-max))
1281doesn't exist there."
1282 (cl-loop for charset in (mh-funcall-if-exists
1283 find-charset-region (point-min) (point-max))
1284 unless (eq charset 'ascii) return nil 1267 unless (eq charset 'ascii) return nil
1285 finally return t)) 1268 finally return t))
1286 1269
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el
index 839379857f3..1c36c27bbf5 100644
--- a/lisp/mh-e/mh-compat.el
+++ b/lisp/mh-e/mh-compat.el
@@ -70,13 +70,9 @@ The optional argument COMMON-SUBSTRING, if non-nil, should be a string
70specifying a common substring for adding the faces 70specifying a common substring for adding the faces
71`completions-first-difference' and `completions-common-part' to 71`completions-first-difference' and `completions-common-part' to
72the completions." 72the completions."
73 (cond ((< emacs-major-version 22) `(display-completion-list ,completions)) 73 `(display-completion-list
74 ((fboundp 'completion-hilit-commonality) ; Emacs 23.1 and later 74 (completion-hilit-commonality ,completions
75 `(display-completion-list 75 ,(length common-substring) nil)))
76 (completion-hilit-commonality ,completions
77 ,(length common-substring) nil)))
78 (t ; Emacs 22
79 `(display-completion-list ,completions ,common-substring))))
80 76
81(define-obsolete-function-alias 'mh-face-foreground 77(define-obsolete-function-alias 'mh-face-foreground
82 #'face-foreground "29.1") 78 #'face-foreground "29.1")
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 09f62466b3c..b02b8e0154f 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -656,9 +656,6 @@ Set mark after inserted text."
656 656
657;;; MH-E Customization Support Routines 657;;; MH-E Customization Support Routines
658 658
659;; Shush compiler (Emacs 21 and XEmacs).
660(defvar customize-package-emacs-version-alist)
661
662;; Temporary function and data structure used customization. 659;; Temporary function and data structure used customization.
663;; These will be unbound after the options are defined. 660;; These will be unbound after the options are defined.
664(defmacro mh-strip-package-version (args) 661(defmacro mh-strip-package-version (args)
@@ -1655,10 +1652,7 @@ using the Emacs 22 command \"emacsclient\" as follows:
1655 origMode 1652 origMode
1656 polltime 10 1653 polltime 10
1657 headertime 0 1654 headertime 0
1658 command emacsclient --eval \\='(mh-inc-spool-mh-e)\\=' 1655 command emacsclient --eval \\='(mh-inc-spool-mh-e)\\='"
1659
1660In XEmacs, the command \"gnuclient\" is used in a similar
1661fashion."
1662 :type '(repeat (list (file :tag "Spool File") 1656 :type '(repeat (list (file :tag "Spool File")
1663 (string :tag "Folder") 1657 (string :tag "Folder")
1664 (character :tag "Key Binding"))) 1658 (character :tag "Key Binding")))
@@ -1813,7 +1807,7 @@ flavors of `mh-yank-behavior' or you have added a
1813 "Function to call when completing outside of address or folder fields. 1807 "Function to call when completing outside of address or folder fields.
1814 1808
1815In the body of the message, 1809In the body of the message,
1816\\<mh-letter-mode-map>\\[mh-letter-complete] runs this function, 1810\\<mh-letter-mode-map>\\[completion-at-point] runs this function,
1817which is set to \"ispell-complete-word\" by default." 1811which is set to \"ispell-complete-word\" by default."
1818 :type '(choice function (const nil)) 1812 :type '(choice function (const nil))
1819 :group 'mh-letter 1813 :group 'mh-letter
@@ -3022,15 +3016,12 @@ and off. This feature will be turned on by default if your system
3022supports it. 3016supports it.
3023 3017
3024The first header field used, if present, is the Gnus-specific 3018The first header field used, if present, is the Gnus-specific
3025\"Face:\" field. The \"Face:\" field appeared in GNU Emacs 21 and 3019\"Face:\" field. The \"Face:\" field appeared in Emacs 21.
3026XEmacs. For more information, see URL 3020For more information, see URL
3027`https://quimby.gnus.org/circus/face/'. Next is the traditional 3021`https://quimby.gnus.org/circus/face/'. Next is the traditional
3028\"X-Face:\" header field. The display of this field requires the 3022\"X-Face:\" header field. The display of this field requires the
3029\"uncompface\" program (see URL 3023\"uncompface\" program (see URL
3030`ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.z'). Recent 3024`ftp://ftp.cs.indiana.edu/pub/faces/compface/compface.tar.z').
3031versions of XEmacs have internal support for \"X-Face:\" images. If
3032your version of XEmacs does not, then you'll need both \"uncompface\"
3033and the x-face package (see URL `https://www.jpl.org/ftp/pub/elisp/').
3034 3025
3035Finally, MH-E will display images referenced by the \"X-Image-URL:\" 3026Finally, MH-E will display images referenced by the \"X-Image-URL:\"
3036header field if neither the \"Face:\" nor the \"X-Face:\" fields are 3027header field if neither the \"Face:\" nor the \"X-Face:\" fields are
@@ -3522,14 +3513,13 @@ consumed by `defface-mh'.")
3522 3513
3523(require 'cus-face) 3514(require 'cus-face)
3524 3515
3525(defvar mh-inherit-face-flag (assq :inherit custom-face-attributes) 3516(defvar mh-inherit-face-flag t
3526 "Non-nil means that the `defface' :inherit keyword is available. 3517 "Non-nil means that the `defface' :inherit keyword is available.")
3527The :inherit keyword is available on all supported versions of 3518(make-obsolete-variable 'mh-inherit-face-flag nil "29.1")
3528GNU Emacs and XEmacs from at least 21.5.23 on.")
3529 3519
3530(defvar mh-min-colors-defined-flag (and (not (featurep 'xemacs)) 3520(defvar mh-min-colors-defined-flag t
3531 (>= emacs-major-version 22))
3532 "Non-nil means `defface' supports min-colors display requirement.") 3521 "Non-nil means `defface' supports min-colors display requirement.")
3522(make-obsolete-variable 'mh-min-colors-defined-flag nil "29.1")
3533 3523
3534(defun mh-face-data (face &optional inherit) 3524(defun mh-face-data (face &optional inherit)
3535 "Return spec for FACE. 3525 "Return spec for FACE.
@@ -3540,37 +3530,10 @@ keyword, return INHERIT literally; otherwise, return spec for
3540FACE from the variable `mh-face-data'. This isn't a perfect 3530FACE from the variable `mh-face-data'. This isn't a perfect
3541implementation. In the case that the :inherit keyword is not 3531implementation. In the case that the :inherit keyword is not
3542supported, any additional attributes in the inherit parameter are 3532supported, any additional attributes in the inherit parameter are
3543not added to the returned spec. 3533not added to the returned spec."
3544 3534 (or inherit
3545Furthermore, when `mh-min-colors-defined-flag' is nil, this 3535 (cadr (assq face mh-face-data))
3546function finds display entries with \"min-colors\" requirements 3536 (error "Could not find %s in mh-face-data" face)))
3547and either removes the \"min-colors\" requirement or strips the
3548display entirely if the display does not support the number of
3549specified colors."
3550 (let ((spec
3551 (if (and inherit mh-inherit-face-flag)
3552 inherit
3553 (or (cadr (assq face mh-face-data))
3554 (error "Could not find %s in mh-face-data" face)))))
3555
3556 (if mh-min-colors-defined-flag
3557 spec
3558 (let ((cells (display-color-cells))
3559 new-spec)
3560 ;; Remove entries with min-colors, or delete them if we have
3561 ;; fewer colors than they specify.
3562 (cl-loop
3563 for entry in (reverse spec) do
3564 (let ((requirement (if (eq (car entry) t)
3565 nil
3566 (assq 'min-colors (car entry)))))
3567 (if requirement
3568 (when (>= cells (nth 1 requirement))
3569 (setq new-spec (cons (cons (delq requirement (car entry))
3570 (cdr entry))
3571 new-spec)))
3572 (setq new-spec (cons entry new-spec)))))
3573 new-spec))))
3574 3537
3575(defface-mh mh-folder-address 3538(defface-mh mh-folder-address
3576 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject)))) 3539 (mh-face-data 'mh-folder-subject '((t (:inherit mh-folder-subject))))
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index c59ed849b4e..6e097d2b749 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -1545,35 +1545,35 @@ after the commands are processed."
1545 (append folders-changed (mh-index-execute-commands)))) 1545 (append folders-changed (mh-index-execute-commands))))
1546 1546
1547 ;; Then refile messages 1547 ;; Then refile messages
1548 (mh-mapc #'(lambda (folder-msg-list) 1548 (mapc #'(lambda (folder-msg-list)
1549 (let* ((dest-folder (symbol-name (car folder-msg-list))) 1549 (let* ((dest-folder (symbol-name (car folder-msg-list)))
1550 (last (car (mh-translate-range dest-folder "last"))) 1550 (last (car (mh-translate-range dest-folder "last")))
1551 (msgs (cdr folder-msg-list))) 1551 (msgs (cdr folder-msg-list)))
1552 (push dest-folder folders-changed) 1552 (push dest-folder folders-changed)
1553 (setq redraw-needed-flag t) 1553 (setq redraw-needed-flag t)
1554 (apply #'mh-exec-cmd 1554 (apply #'mh-exec-cmd
1555 "refile" "-src" folder dest-folder 1555 "refile" "-src" folder dest-folder
1556 (mh-coalesce-msg-list msgs)) 1556 (mh-coalesce-msg-list msgs))
1557 (mh-delete-scan-msgs msgs) 1557 (mh-delete-scan-msgs msgs)
1558 ;; Preserve sequences in destination folder... 1558 ;; Preserve sequences in destination folder...
1559 (when mh-refile-preserves-sequences-flag 1559 (when mh-refile-preserves-sequences-flag
1560 (clrhash dest-map) 1560 (clrhash dest-map)
1561 (cl-loop 1561 (cl-loop
1562 for i from (1+ (or last 0)) 1562 for i from (1+ (or last 0))
1563 for msg in (sort (copy-sequence msgs) #'<) 1563 for msg in (sort (copy-sequence msgs) #'<)
1564 do (cl-loop for seq-name in (gethash msg seq-map) 1564 do (cl-loop for seq-name in (gethash msg seq-map)
1565 do (push i (gethash seq-name dest-map)))) 1565 do (push i (gethash seq-name dest-map))))
1566 (maphash 1566 (maphash
1567 #'(lambda (seq msgs) 1567 #'(lambda (seq msgs)
1568 ;; Can't be run in the background, since the 1568 ;; Can't be run in the background, since the
1569 ;; current folder is changed by mark this could 1569 ;; current folder is changed by mark this could
1570 ;; lead to a race condition with the next refile. 1570 ;; lead to a race condition with the next refile.
1571 (apply #'mh-exec-cmd "mark" 1571 (apply #'mh-exec-cmd "mark"
1572 "-sequence" (symbol-name seq) dest-folder 1572 "-sequence" (symbol-name seq) dest-folder
1573 "-add" (mapcar #'(lambda (x) (format "%s" x)) 1573 "-add" (mapcar #'(lambda (x) (format "%s" x))
1574 (mh-coalesce-msg-list msgs)))) 1574 (mh-coalesce-msg-list msgs))))
1575 dest-map)))) 1575 dest-map))))
1576 mh-refile-list) 1576 mh-refile-list)
1577 (setq mh-refile-list ()) 1577 (setq mh-refile-list ())
1578 1578
1579 ;; Now delete messages 1579 ;; Now delete messages
diff --git a/lisp/mh-e/mh-gnus.el b/lisp/mh-e/mh-gnus.el
index b096cd6b881..0e1bde71f20 100644
--- a/lisp/mh-e/mh-gnus.el
+++ b/lisp/mh-e/mh-gnus.el
@@ -35,10 +35,9 @@
35 (require 'mm-view nil t) 35 (require 'mm-view nil t)
36 (require 'mml nil t)) 36 (require 'mml nil t))
37 37
38;; Copy of function from gnus-util.el. 38(defun mh-gnus-local-map-property (map)
39;; TODO This is not in Gnus 5.11.
40(defun-mh mh-gnus-local-map-property gnus-local-map-property (map)
41 "Return a list suitable for a text property list specifying keymap MAP." 39 "Return a list suitable for a text property list specifying keymap MAP."
40 (declare (obsolete nil "29.1"))
42 (list 'keymap map)) 41 (list 'keymap map))
43 42
44(define-obsolete-function-alias 'mh-mm-merge-handles 43(define-obsolete-function-alias 'mh-mm-merge-handles
@@ -103,8 +102,8 @@ PROMPT overrides the default one used to ask user for a file name."
103 102
104(defun mh-mm-text-html-renderer () 103(defun mh-mm-text-html-renderer ()
105 "Find the renderer Gnus is using to display text/html MIME parts." 104 "Find the renderer Gnus is using to display text/html MIME parts."
106 (or (and (boundp 'mm-inline-text-html-renderer) mm-inline-text-html-renderer) 105 (declare (obsolete mm-text-html-renderer "29.1"))
107 (and (boundp 'mm-text-html-renderer) mm-text-html-renderer))) 106 mm-text-html-renderer)
108 107
109(provide 'mh-gnus) 108(provide 'mh-gnus)
110 109
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index 0271edb59a7..52a130dc0cc 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -173,7 +173,7 @@
173 "\C-c\C-w" #'mh-check-whom 173 "\C-c\C-w" #'mh-check-whom
174 "\C-c\C-y" #'mh-yank-cur-msg 174 "\C-c\C-y" #'mh-yank-cur-msg
175 "\C-c\M-d" #'mh-insert-auto-fields 175 "\C-c\M-d" #'mh-insert-auto-fields
176 "\M-\t" #'mh-letter-complete 176 "\M-\t" #'completion-at-point
177 "\t" #'mh-letter-next-header-field-or-indent 177 "\t" #'mh-letter-next-header-field-or-indent
178 [backtab] #'mh-letter-previous-header-field) 178 [backtab] #'mh-letter-previous-header-field)
179 179
@@ -479,29 +479,8 @@ This provides alias and folder completion in header fields according to
479 (or (funcall func) #'ignore) 479 (or (funcall func) #'ignore)
480 mh-letter-complete-function))) 480 mh-letter-complete-function)))
481 481
482;; TODO Now that completion-at-point performs the task of 482(define-obsolete-function-alias 'mh-letter-complete
483;; mh-letter-complete, perhaps mh-letter-complete along with 483 #'completion-at-point "29.1")
484;; mh-complete-word should be rewritten as a more general function for
485;; XEmacs, renamed to mh-completion-at-point, and moved to
486;; mh-compat.el.
487(defun-mh mh-letter-complete completion-at-point ()
488 "Perform completion on header field or word preceding point.
489
490If the field contains addresses (for example, \"To:\" or \"Cc:\")
491or folders (for example, \"Fcc:\") then this command will provide
492alias completion. In the body of the message, this command runs
493`mh-letter-complete-function' instead, which is set to
494`ispell-complete-word' by default."
495 (interactive)
496 (let ((data (mh-letter-completion-at-point)))
497 (cond
498 ((functionp data) (funcall data))
499 ((consp data)
500 (let ((start (nth 0 data))
501 (end (nth 1 data))
502 (table (nth 2 data)))
503 (mh-complete-word (buffer-substring-no-properties start end)
504 table start end))))))
505 484
506(defun mh-letter-complete-or-space (arg) 485(defun mh-letter-complete-or-space (arg)
507 "Perform completion or insert space. 486 "Perform completion or insert space.
@@ -521,7 +500,7 @@ one space."
521 ((> (point) end-of-prev) (self-insert-command arg)) 500 ((> (point) end-of-prev) (self-insert-command arg))
522 ((let ((mh-letter-complete-function nil)) 501 ((let ((mh-letter-complete-function nil))
523 (mh-letter-completion-at-point)) 502 (mh-letter-completion-at-point))
524 (mh-letter-complete)) 503 (completion-at-point))
525 (t (self-insert-command arg))))) 504 (t (self-insert-command arg)))))
526 505
527(defun mh-letter-confirm-address () 506(defun mh-letter-confirm-address ()
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index 24410e6c099..d2a09037fe4 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -137,9 +137,7 @@
137 ("text/html" 137 ("text/html"
138 ,(if (fboundp 'mm-inline-text-html) 'mm-inline-text-html 'mm-inline-text) 138 ,(if (fboundp 'mm-inline-text-html) 'mm-inline-text-html 'mm-inline-text)
139 (lambda (handle) 139 (lambda (handle)
140 (or (and (boundp 'mm-inline-text-html-renderer) 140 mm-text-html-renderer))
141 mm-inline-text-html-renderer)
142 (and (boundp 'mm-text-html-renderer) mm-text-html-renderer))))
143 ("text/x-vcard" 141 ("text/x-vcard"
144 mm-inline-text-vcard 142 mm-inline-text-vcard
145 (lambda (handle) 143 (lambda (handle)
@@ -184,9 +182,6 @@ Set from last use.")
184 '((mh-press-button "\r" "Toggle Display"))) 182 '((mh-press-button "\r" "Toggle Display")))
185(defvar mh-mime-button-map 183(defvar mh-mime-button-map
186 (let ((map (make-sparse-keymap))) 184 (let ((map (make-sparse-keymap)))
187 (unless (>= (string-to-number emacs-version) 21)
188 ;; XEmacs doesn't care.
189 (set-keymap-parent map mh-show-mode-map))
190 (define-key map [mouse-2] #'mh-push-button) 185 (define-key map [mouse-2] #'mh-push-button)
191 (dolist (c mh-mime-button-commands) 186 (dolist (c mh-mime-button-commands)
192 (define-key map (cadr c) (car c))) 187 (define-key map (cadr c) (car c)))
@@ -799,7 +794,7 @@ being used to highlight the signature in a MIME part."
799 ((not (and (equal (mm-handle-media-supertype handle) "text") 794 ((not (and (equal (mm-handle-media-supertype handle) "text")
800 (equal (mm-handle-media-subtype handle) "html"))) 795 (equal (mm-handle-media-subtype handle) "html")))
801 "^-- $") 796 "^-- $")
802 ((eq (mh-mm-text-html-renderer) 'lynx) "^ --$") 797 ((eq mm-text-html-renderer 'lynx) "^ --$")
803 (t "^--$")))) 798 (t "^--$"))))
804 (save-excursion 799 (save-excursion
805 (goto-char (point-max)) 800 (goto-char (point-max))
@@ -843,10 +838,10 @@ by commands like \"K v\" which operate on individual MIME parts."
843 (setq begin (point)) 838 (setq begin (point))
844 (gnus-eval-format 839 (gnus-eval-format
845 mh-mime-button-line-format mh-mime-button-line-format-alist 840 mh-mime-button-line-format mh-mime-button-line-format-alist
846 `(,@(mh-gnus-local-map-property mh-mime-button-map) 841 `(keymap ,mh-mime-button-map
847 mh-callback mh-mm-display-part 842 mh-callback mh-mm-display-part
848 mh-part ,index 843 mh-part ,index
849 mh-data ,handle))) 844 mh-data ,handle)))
850 (setq end (point)) 845 (setq end (point))
851 (widget-convert-button 846 (widget-convert-button
852 'link begin end 847 'link begin end
@@ -885,11 +880,11 @@ by commands like \"K v\" which operate on individual MIME parts."
885 (gnus-eval-format 880 (gnus-eval-format
886 mh-mime-security-button-line-format 881 mh-mime-security-button-line-format
887 mh-mime-security-button-line-format-alist 882 mh-mime-security-button-line-format-alist
888 `(,@(mh-gnus-local-map-property mh-mime-security-button-map) 883 `(keymap ,mh-mime-security-button-map
889 mh-button-pressed ,mh-mime-security-button-pressed 884 mh-button-pressed ,mh-mime-security-button-pressed
890 mh-callback mh-mime-security-press-button 885 mh-callback mh-mime-security-press-button
891 mh-line-format ,mh-mime-security-button-line-format 886 mh-line-format ,mh-mime-security-button-line-format
892 mh-data ,handle)) 887 mh-data ,handle))
893 (setq end (point)) 888 (setq end (point))
894 (widget-convert-button 'link begin end 889 (widget-convert-button 'link begin end
895 :mime-handle handle 890 :mime-handle handle
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el
index c8df75dbc71..06d2ec639bd 100644
--- a/lisp/mh-e/mh-seq.el
+++ b/lisp/mh-e/mh-seq.el
@@ -781,10 +781,10 @@ If SAVE-REFILES is non-nil, then keep the sequences
781that note messages to be refiled." 781that note messages to be refiled."
782 (let ((seqs ())) 782 (let ((seqs ()))
783 (cond (save-refiles 783 (cond (save-refiles
784 (mh-mapc (lambda (seq) ; Save the refiling sequences 784 (mapc (lambda (seq) ; Save the refiling sequences
785 (if (mh-folder-name-p (mh-seq-name seq)) 785 (if (mh-folder-name-p (mh-seq-name seq))
786 (setq seqs (cons seq seqs)))) 786 (setq seqs (cons seq seqs))))
787 mh-seq-list))) 787 mh-seq-list)))
788 (save-excursion 788 (save-excursion
789 (if (eq 0 (mh-exec-cmd-quiet nil "mark" folder "-list")) 789 (if (eq 0 (mh-exec-cmd-quiet nil "mark" folder "-list"))
790 (progn 790 (progn
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el
index 489c134a3e3..057799d1eac 100644
--- a/lisp/mh-e/mh-show.el
+++ b/lisp/mh-e/mh-show.el
@@ -335,10 +335,9 @@ The current frame height is taken into consideration."
335 335
336 336
337 337
338;; Infrastructure to generate show-buffer functions from folder functions 338;; Infrastructure to generate show-buffer functions from folder functions.
339;; XEmacs does not have deactivate-mark? What is the equivalent of 339;; Should we be restoring the mark in the folder buffer after the
340;; transient-mark-mode for XEmacs? Should we be restoring the mark in the 340;; operation has been carried out?
341;; folder buffer after the operation has been carried out.
342(defmacro mh-defun-show-buffer (function original-function 341(defmacro mh-defun-show-buffer (function original-function
343 &optional dont-return) 342 &optional dont-return)
344 "Define FUNCTION to run ORIGINAL-FUNCTION in folder buffer. 343 "Define FUNCTION to run ORIGINAL-FUNCTION in folder buffer.
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index 4f211c12866..ec2bd7f67b5 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -83,11 +83,7 @@ used in lieu of `search' in the CL package."
83 (setq pairs (cdr (cdr pairs))))) 83 (setq pairs (cdr (cdr pairs)))))
84 84
85;;;###mh-autoload 85;;;###mh-autoload
86(defun mh-mapc (function list) 86(define-obsolete-function-alias 'mh-mapc #'mapc "29.1")
87 "Apply FUNCTION to each element of LIST for side effects only."
88 (while list
89 (funcall function (car list))
90 (setq list (cdr list))))
91 87
92(defvar mh-pick-regexp-chars ".*$[" 88(defvar mh-pick-regexp-chars ".*$["
93 "List of special characters in pick regular expressions.") 89 "List of special characters in pick regular expressions.")
@@ -716,16 +712,12 @@ See Info node `(elisp) Programmed Completion' for details."
716 ((equal path mh-user-path) nil) 712 ((equal path mh-user-path) nil)
717 (t (file-directory-p path)))))))) 713 (t (file-directory-p path))))))))
718 714
719;; Shush compiler.
720(defvar completion-root-regexp) ;; Apparently used in XEmacs
721
722(defun mh-folder-completing-read (prompt default allow-root-folder-flag) 715(defun mh-folder-completing-read (prompt default allow-root-folder-flag)
723 "Read folder name with PROMPT and default result DEFAULT. 716 "Read folder name with PROMPT and default result DEFAULT.
724If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be 717If ALLOW-ROOT-FOLDER-FLAG is non-nil then \"+\" is allowed to be
725a folder name corresponding to `mh-user-path'." 718a folder name corresponding to `mh-user-path'."
726 (mh-normalize-folder-name 719 (mh-normalize-folder-name
727 (let ((completion-root-regexp "^[+/]") ;FIXME: Who/what uses that? 720 (let ((minibuffer-local-completion-map mh-folder-completion-map)
728 (minibuffer-local-completion-map mh-folder-completion-map)
729 (mh-allow-root-folder-flag allow-root-folder-flag)) 721 (mh-allow-root-folder-flag allow-root-folder-flag))
730 (completing-read prompt 'mh-folder-completion-function nil nil nil 722 (completing-read prompt 'mh-folder-completion-function nil nil nil
731 'mh-folder-hist default)) 723 'mh-folder-hist default))
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el
index 332f963a04f..634d12a4890 100644
--- a/lisp/mh-e/mh-xface.el
+++ b/lisp/mh-e/mh-xface.el
@@ -30,11 +30,9 @@
30(autoload 'mail-header-parse-address "mail-parse") 30(autoload 'mail-header-parse-address "mail-parse")
31(autoload 'message-fetch-field "message") 31(autoload 'message-fetch-field "message")
32 32
33(defvar mh-show-xface-function 33(defvar mh-show-xface-function #'mh-face-display-function
34 (cond ((>= emacs-major-version 21)
35 #'mh-face-display-function)
36 (t #'ignore))
37 "Determine at run time what function should be called to display X-Face.") 34 "Determine at run time what function should be called to display X-Face.")
35(make-obsolete-variable 'mh-show-xface-function nil "29.1")
38 36
39(defvar mh-uncompface-executable 37(defvar mh-uncompface-executable
40 (and (fboundp 'executable-find) (executable-find "uncompface"))) 38 (and (fboundp 'executable-find) (executable-find "uncompface")))
@@ -49,7 +47,7 @@
49 (when (and window-system mh-show-use-xface-flag 47 (when (and window-system mh-show-use-xface-flag
50 (or mh-decode-mime-flag mh-mhl-format-file 48 (or mh-decode-mime-flag mh-mhl-format-file
51 mh-clean-message-header-flag)) 49 mh-clean-message-header-flag))
52 (funcall mh-show-xface-function))) 50 (mh-face-display-function)))
53 51
54(defun mh-face-display-function () 52(defun mh-face-display-function ()
55 "Display a Face, X-Face, or X-Image-URL header field. 53 "Display a Face, X-Face, or X-Image-URL header field.