mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-05 11:45:45 +00:00
Remove more MH-E compat code
* lisp/mh-e/mh-e.el (mh-strip-package-version, defgroup-mh) (defcustom-mh, defface-mh): Make Emacs 21 compat aliases obsolete. Update callers. * lisp/mh-e/mh-e.el: (mh-exchange-point-and-mark-preserving-active-mark) * lisp/mh-e/mh-folder.el (desktop-buffer-mode-handlers): * lisp/mh-e/mh-mime.el (mh-mm-inline-media-tests) (mh-have-file-command, mh-mime-security-button-map): * lisp/mh-e/mh-show.el (mh-summary-height): * lisp/mh-e/mh-speed.el (mh-process-kill-without-query): * lisp/mh-e/mh-xface.el (mh-uncompface-executable) (mh-face-to-png, mh-uncompface, mh-picon-file-contents): Remove XEmacs and Emacs 21 and older compat code.
This commit is contained in:
parent
1a02683cee
commit
3e0b2a3535
@ -110,11 +110,11 @@ XEmacs and versions of GNU Emacs before 21.1 require
|
||||
(defmacro mh-mark-active-p (check-transient-mark-mode-flag)
|
||||
"If CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then check if
|
||||
variable `transient-mark-mode' is active."
|
||||
(declare (obsolete nil "29.1"))
|
||||
(cond ((not check-transient-mark-mode-flag)
|
||||
'(and (boundp 'mark-active) mark-active))
|
||||
'mark-active)
|
||||
(t
|
||||
'(and (boundp 'transient-mark-mode) transient-mark-mode
|
||||
(boundp 'mark-active) mark-active))))
|
||||
'(and transient-mark-mode mark-active))))
|
||||
|
||||
;;;###mh-autoload
|
||||
(defmacro with-mh-folder-updating (save-modification-flag &rest body)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -72,10 +72,8 @@ the MH mail system."
|
||||
|
||||
;;; Desktop Integration
|
||||
|
||||
;; desktop-buffer-mode-handlers appeared in Emacs 22.
|
||||
(if (boundp 'desktop-buffer-mode-handlers)
|
||||
(add-to-list 'desktop-buffer-mode-handlers
|
||||
'(mh-folder-mode . mh-restore-desktop-buffer)))
|
||||
(add-to-list 'desktop-buffer-mode-handlers
|
||||
'(mh-folder-mode . mh-restore-desktop-buffer))
|
||||
|
||||
(defun mh-restore-desktop-buffer (_file-name name _misc)
|
||||
"Restore an MH folder buffer specified in a desktop file.
|
||||
|
@ -692,7 +692,7 @@ and `mh-ins-buf-prefix' is not inserted."
|
||||
;; Find displayed message
|
||||
(with-current-buffer show-buffer
|
||||
(let* ((from-attr (mh-extract-from-attribution))
|
||||
(yank-region (mh-mark-active-p nil))
|
||||
(yank-region mark-active)
|
||||
(mh-ins-str
|
||||
(cond ((and yank-region
|
||||
(or (eq 'supercite mh-yank-behavior)
|
||||
|
@ -135,7 +135,7 @@
|
||||
("application/emacs-lisp" mm-display-elisp-inline identity)
|
||||
("application/x-emacs-lisp" mm-display-elisp-inline identity)
|
||||
("text/html"
|
||||
,(if (fboundp 'mm-inline-text-html) 'mm-inline-text-html 'mm-inline-text)
|
||||
mm-inline-text-html
|
||||
(lambda (handle)
|
||||
mm-text-html-renderer))
|
||||
("text/x-vcard"
|
||||
@ -202,8 +202,6 @@ Set from last use.")
|
||||
(?D pressed-details ?s)))
|
||||
(defvar mh-mime-security-button-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(unless (>= (string-to-number emacs-version) 21)
|
||||
(set-keymap-parent map mh-show-mode-map))
|
||||
(define-key map "\r" #'mh-press-button)
|
||||
(define-key map [mouse-2] #'mh-push-button)
|
||||
map))
|
||||
@ -1144,6 +1142,7 @@ this ;-)"
|
||||
This is used to decide if smileys and graphical emphasis should be
|
||||
displayed."
|
||||
(let ((max nil))
|
||||
;; FIXME: font-lock-maximum-size is obsolete.
|
||||
(when (and (boundp 'font-lock-maximum-size) font-lock-maximum-size)
|
||||
(cond ((numberp font-lock-maximum-size)
|
||||
(setq max font-lock-maximum-size))
|
||||
@ -1768,8 +1767,7 @@ initialized. Always use the command `mh-have-file-command'.")
|
||||
'file -i' is used to get MIME type of composition insertion."
|
||||
(when (eq mh-have-file-command 'undefined)
|
||||
(setq mh-have-file-command
|
||||
(and (fboundp 'executable-find)
|
||||
(executable-find "file") ; file command exists
|
||||
(and (executable-find "file") ; file command exists
|
||||
; and accepts -i and -b args.
|
||||
(zerop (call-process "file" nil nil nil "-i" "-b"
|
||||
(expand-file-name "inc" mh-progs))))))
|
||||
|
@ -577,7 +577,7 @@ Otherwise, the message number at point is returned.
|
||||
|
||||
This function is usually used with `mh-iterate-on-range' in order to
|
||||
provide a uniform interface to MH-E functions."
|
||||
(cond ((mh-mark-active-p t) (cons (region-beginning) (region-end)))
|
||||
(cond ((and transient-mark-mode mark-active) (cons (region-beginning) (region-end)))
|
||||
(current-prefix-arg (mh-read-range range-prompt nil nil t t))
|
||||
(default default)
|
||||
(t (mh-get-msg-num t))))
|
||||
|
@ -328,8 +328,7 @@ ignored if VISIBLE-HEADERS is non-nil."
|
||||
(defun mh-summary-height ()
|
||||
"Return ideal value for the variable `mh-summary-height'.
|
||||
The current frame height is taken into consideration."
|
||||
(or (and (fboundp 'frame-height)
|
||||
(> (frame-height) 24)
|
||||
(or (and (> (frame-height) 24)
|
||||
(min 10 (/ (frame-height) 6)))
|
||||
4))
|
||||
|
||||
|
@ -374,12 +374,9 @@ uses."
|
||||
(defvar mh-speed-flists-folder nil)
|
||||
|
||||
(defmacro mh-process-kill-without-query (process)
|
||||
"PROCESS can be killed without query on Emacs exit.
|
||||
Avoid using `process-kill-without-query' if possible since it is
|
||||
now obsolete."
|
||||
(if (fboundp 'set-process-query-on-exit-flag)
|
||||
`(set-process-query-on-exit-flag ,process nil)
|
||||
`(process-kill-without-query ,process)))
|
||||
"PROCESS can be killed without query on Emacs exit."
|
||||
(declare (obsolete set-process-query-on-exit-flag "29.1"))
|
||||
`(set-process-query-on-exit-flag ,process nil))
|
||||
|
||||
;;;###mh-autoload
|
||||
(defun mh-speed-flists (force &rest folders)
|
||||
@ -427,7 +424,7 @@ flists is run only for that one folder."
|
||||
(or mh-speed-flists-folder '("-recurse"))))
|
||||
;; Run flists on all folders the next time around...
|
||||
(setq mh-speed-flists-folder nil)
|
||||
(mh-process-kill-without-query mh-speed-flists-process)
|
||||
(set-process-query-on-exit-flag mh-speed-flists-process nil)
|
||||
(set-process-filter mh-speed-flists-process
|
||||
#'mh-speed-parse-flists-output)))))))
|
||||
|
||||
|
@ -34,8 +34,7 @@
|
||||
"Determine at run time what function should be called to display X-Face.")
|
||||
(make-obsolete-variable 'mh-show-xface-function nil "29.1")
|
||||
|
||||
(defvar mh-uncompface-executable
|
||||
(and (fboundp 'executable-find) (executable-find "uncompface")))
|
||||
(defvar mh-uncompface-executable (executable-find "uncompface"))
|
||||
|
||||
|
||||
|
||||
@ -86,8 +85,7 @@ in this order is used."
|
||||
(defun mh-face-to-png (data)
|
||||
"Convert base64 encoded DATA to png image."
|
||||
(with-temp-buffer
|
||||
(if (fboundp 'set-buffer-multibyte)
|
||||
(set-buffer-multibyte nil))
|
||||
(set-buffer-multibyte nil)
|
||||
(insert data)
|
||||
(ignore-errors (base64-decode-region (point-min) (point-max)))
|
||||
(buffer-string)))
|
||||
@ -95,8 +93,7 @@ in this order is used."
|
||||
(defun mh-uncompface (data)
|
||||
"Run DATA through `uncompface' to generate bitmap."
|
||||
(with-temp-buffer
|
||||
(if (fboundp 'set-buffer-multibyte)
|
||||
(set-buffer-multibyte nil))
|
||||
(set-buffer-multibyte nil)
|
||||
(insert data)
|
||||
(when (and mh-uncompface-executable
|
||||
(equal (call-process-region (point-min) (point-max)
|
||||
@ -232,8 +229,7 @@ file contents as a string is returned. If FILE is nil, then both
|
||||
elements of the list are nil."
|
||||
(if (stringp file)
|
||||
(with-temp-buffer
|
||||
(if (fboundp 'set-buffer-multibyte)
|
||||
(set-buffer-multibyte nil))
|
||||
(set-buffer-multibyte nil)
|
||||
(let ((type (and (string-match ".*\\.\\(...\\)$" file)
|
||||
(intern (match-string 1 file)))))
|
||||
(insert-file-contents-literally file)
|
||||
|
Loading…
Reference in New Issue
Block a user