diff options
| author | Stefan Kangas | 2021-10-11 22:57:43 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2021-10-11 22:57:43 +0200 |
| commit | 76d75df8e7ae19c8aca3ab9a7fbee25fc3cf1e9e (patch) | |
| tree | 969c35e4e531816a38a2a92e890f3280f714feb9 | |
| parent | 2810fe6bfca182e4376d818b5510507d5ff7e1b5 (diff) | |
| download | emacs-76d75df8e7ae19c8aca3ab9a7fbee25fc3cf1e9e.tar.gz emacs-76d75df8e7ae19c8aca3ab9a7fbee25fc3cf1e9e.zip | |
Remove redundant calls to 'mh-do-in-gnu-emacs'
* lisp/mh-e/mh-compat.el (mh-require):
* lisp/mh-e/mh-folder.el (mh-folder-mode):
* lisp/mh-e/mh-letter.el (mh-letter-mode):
* lisp/mh-e/mh-mime.el (mh-mime-button-map)
(mh-mime-security-button-map, mh-small-image-p)
(mh-signature-highlight):
* lisp/mh-e/mh-show.el (mh-show-mode):
* lisp/mh-e/mh-tool-bar.el (mh-tool-bar-define):
* lisp/mh-e/mh-utils.el (mh-logo-display)
(mh-hidden-header-keymap):
* lisp/mh-e/mh-xface.el (mh-face-display-function)
(mh-picon-image-types, mh-x-image-display): Remove redundant calls
to 'mh-do-in-gnu-emacs'.
* lisp/mh-e/mh-acros.el (mh-do-in-gnu-emacs):
* lisp/mh-e/mh-tool-bar.el: Add comment explaining an issue that
stops us from making 'mh-do-in-gnu-emacs' obsolete.
| -rw-r--r-- | lisp/mh-e/mh-acros.el | 5 | ||||
| -rw-r--r-- | lisp/mh-e/mh-compat.el | 4 | ||||
| -rw-r--r-- | lisp/mh-e/mh-folder.el | 9 | ||||
| -rw-r--r-- | lisp/mh-e/mh-letter.el | 9 | ||||
| -rw-r--r-- | lisp/mh-e/mh-mime.el | 26 | ||||
| -rw-r--r-- | lisp/mh-e/mh-show.el | 5 | ||||
| -rw-r--r-- | lisp/mh-e/mh-tool-bar.el | 144 | ||||
| -rw-r--r-- | lisp/mh-e/mh-utils.el | 28 | ||||
| -rw-r--r-- | lisp/mh-e/mh-xface.el | 29 |
9 files changed, 124 insertions, 135 deletions
diff --git a/lisp/mh-e/mh-acros.el b/lisp/mh-e/mh-acros.el index 6a0342407dd..3674acc6cc2 100644 --- a/lisp/mh-e/mh-acros.el +++ b/lisp/mh-e/mh-acros.el | |||
| @@ -47,7 +47,10 @@ | |||
| 47 | ;;;###mh-autoload | 47 | ;;;###mh-autoload |
| 48 | (defmacro mh-do-in-gnu-emacs (&rest body) | 48 | (defmacro mh-do-in-gnu-emacs (&rest body) |
| 49 | "Execute BODY if in GNU Emacs." | 49 | "Execute BODY if in GNU Emacs." |
| 50 | (declare (debug t) (indent defun)) | 50 | ;; FIXME: This cannot yet be obsoleted, due to one remaining call in |
| 51 | ;; mh-tool-bar.el. Once that is removed, this can be obsoleted. | ||
| 52 | (declare ;; (obsolete nil "29.1") | ||
| 53 | (debug t) (indent defun)) | ||
| 51 | (unless (featurep 'xemacs) `(progn ,@body))) | 54 | (unless (featurep 'xemacs) `(progn ,@body))) |
| 52 | 55 | ||
| 53 | ;;;###mh-autoload | 56 | ;;;###mh-autoload |
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el index 659c4354b16..839379857f3 100644 --- a/lisp/mh-e/mh-compat.el +++ b/lisp/mh-e/mh-compat.el | |||
| @@ -38,9 +38,7 @@ | |||
| 38 | 38 | ||
| 39 | (eval-when-compile (require 'mh-acros)) | 39 | (eval-when-compile (require 'mh-acros)) |
| 40 | 40 | ||
| 41 | (mh-do-in-gnu-emacs | 41 | (define-obsolete-function-alias 'mh-require #'require "29.1") |
| 42 | (define-obsolete-function-alias 'mh-require #'require "29.1")) | ||
| 43 | |||
| 44 | (define-obsolete-function-alias 'mh-assoc-string #'assoc-string "29.1") | 42 | (define-obsolete-function-alias 'mh-assoc-string #'assoc-string "29.1") |
| 45 | (define-obsolete-function-alias 'mh-cancel-timer #'cancel-timer "29.1") | 43 | (define-obsolete-function-alias 'mh-cancel-timer #'cancel-timer "29.1") |
| 46 | 44 | ||
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index ed65395c944..c59ed849b4e 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el | |||
| @@ -576,11 +576,10 @@ region in the MH-Folder buffer, then the MH-E command will | |||
| 576 | perform the operation on all messages in that region. | 576 | perform the operation on all messages in that region. |
| 577 | 577 | ||
| 578 | \\{mh-folder-mode-map}" | 578 | \\{mh-folder-mode-map}" |
| 579 | (mh-do-in-gnu-emacs | 579 | (unless mh-folder-tool-bar-map |
| 580 | (unless mh-folder-tool-bar-map | 580 | (mh-tool-bar-folder-buttons-init)) |
| 581 | (mh-tool-bar-folder-buttons-init)) | 581 | (if (boundp 'tool-bar-map) |
| 582 | (if (boundp 'tool-bar-map) | 582 | (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map)) |
| 583 | (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map))) | ||
| 584 | (make-local-variable 'font-lock-defaults) | 583 | (make-local-variable 'font-lock-defaults) |
| 585 | (setq font-lock-defaults '(mh-folder-font-lock-keywords t)) | 584 | (setq font-lock-defaults '(mh-folder-font-lock-keywords t)) |
| 586 | (make-local-variable 'desktop-save-buffer) | 585 | (make-local-variable 'desktop-save-buffer) |
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el index f147b7ce0dc..0271edb59a7 100644 --- a/lisp/mh-e/mh-letter.el +++ b/lisp/mh-e/mh-letter.el | |||
| @@ -291,11 +291,10 @@ order). | |||
| 291 | (make-local-variable 'mh-previous-window-config) | 291 | (make-local-variable 'mh-previous-window-config) |
| 292 | (make-local-variable 'mh-sent-from-folder) | 292 | (make-local-variable 'mh-sent-from-folder) |
| 293 | (make-local-variable 'mh-sent-from-msg) | 293 | (make-local-variable 'mh-sent-from-msg) |
| 294 | (mh-do-in-gnu-emacs | 294 | (unless mh-letter-tool-bar-map |
| 295 | (unless mh-letter-tool-bar-map | 295 | (mh-tool-bar-letter-buttons-init)) |
| 296 | (mh-tool-bar-letter-buttons-init)) | 296 | (if (boundp 'tool-bar-map) |
| 297 | (if (boundp 'tool-bar-map) | 297 | (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map)) |
| 298 | (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map))) | ||
| 299 | ;; Set the local value of mh-mail-header-separator according to what is | 298 | ;; Set the local value of mh-mail-header-separator according to what is |
| 300 | ;; present in the buffer... | 299 | ;; present in the buffer... |
| 301 | (set (make-local-variable 'mh-mail-header-separator) | 300 | (set (make-local-variable 'mh-mail-header-separator) |
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 0dbf8f0da19..24410e6c099 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el | |||
| @@ -187,8 +187,7 @@ Set from last use.") | |||
| 187 | (unless (>= (string-to-number emacs-version) 21) | 187 | (unless (>= (string-to-number emacs-version) 21) |
| 188 | ;; XEmacs doesn't care. | 188 | ;; XEmacs doesn't care. |
| 189 | (set-keymap-parent map mh-show-mode-map)) | 189 | (set-keymap-parent map mh-show-mode-map)) |
| 190 | (mh-do-in-gnu-emacs | 190 | (define-key map [mouse-2] #'mh-push-button) |
| 191 | (define-key map [mouse-2] #'mh-push-button)) | ||
| 192 | (dolist (c mh-mime-button-commands) | 191 | (dolist (c mh-mime-button-commands) |
| 193 | (define-key map (cadr c) (car c))) | 192 | (define-key map (cadr c) (car c))) |
| 194 | map)) | 193 | map)) |
| @@ -211,8 +210,7 @@ Set from last use.") | |||
| 211 | (unless (>= (string-to-number emacs-version) 21) | 210 | (unless (>= (string-to-number emacs-version) 21) |
| 212 | (set-keymap-parent map mh-show-mode-map)) | 211 | (set-keymap-parent map mh-show-mode-map)) |
| 213 | (define-key map "\r" #'mh-press-button) | 212 | (define-key map "\r" #'mh-press-button) |
| 214 | (mh-do-in-gnu-emacs | 213 | (define-key map [mouse-2] #'mh-push-button) |
| 215 | (define-key map [mouse-2] #'mh-push-button)) | ||
| 216 | map)) | 214 | map)) |
| 217 | 215 | ||
| 218 | 216 | ||
| @@ -773,13 +771,12 @@ This is only useful if a Content-Disposition header is not present." | |||
| 773 | ; this only tells us if the image is | 771 | ; this only tells us if the image is |
| 774 | ; something that emacs can display | 772 | ; something that emacs can display |
| 775 | (let ((image (mm-get-image handle))) | 773 | (let ((image (mm-get-image handle))) |
| 776 | (mh-do-in-gnu-emacs | 774 | (let ((size (and (fboundp 'image-size) (image-size image)))) |
| 777 | (let ((size (and (fboundp 'image-size) (image-size image)))) | 775 | (and size |
| 778 | (and size | 776 | (< (cdr size) (or mh-max-inline-image-height |
| 779 | (< (cdr size) (or mh-max-inline-image-height | 777 | (1- (window-height)))) |
| 780 | (1- (window-height)))) | 778 | (< (car size) (or mh-max-inline-image-width |
| 781 | (< (car size) (or mh-max-inline-image-width | 779 | (window-width))))))))) |
| 782 | (window-width)))))))))) | ||
| 783 | 780 | ||
| 784 | (defun mh-inline-vcard-p (handle) | 781 | (defun mh-inline-vcard-p (handle) |
| 785 | "Decide if HANDLE is a vcard that must be displayed inline." | 782 | "Decide if HANDLE is a vcard that must be displayed inline." |
| @@ -807,10 +804,9 @@ being used to highlight the signature in a MIME part." | |||
| 807 | (save-excursion | 804 | (save-excursion |
| 808 | (goto-char (point-max)) | 805 | (goto-char (point-max)) |
| 809 | (when (re-search-backward regexp nil t) | 806 | (when (re-search-backward regexp nil t) |
| 810 | (mh-do-in-gnu-emacs | 807 | (let ((ov (make-overlay (point) (point-max)))) |
| 811 | (let ((ov (make-overlay (point) (point-max)))) | 808 | (overlay-put ov 'face 'mh-show-signature) |
| 812 | (overlay-put ov 'face 'mh-show-signature) | 809 | (overlay-put ov 'evaporate t)))))) |
| 813 | (overlay-put ov 'evaporate t))))))) | ||
| 814 | 810 | ||
| 815 | 811 | ||
| 816 | 812 | ||
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el index 25b83b2ff88..489c134a3e3 100644 --- a/lisp/mh-e/mh-show.el +++ b/lisp/mh-e/mh-show.el | |||
| @@ -833,9 +833,8 @@ The hook `mh-show-mode-hook' is called upon entry to this mode. | |||
| 833 | See also `mh-folder-mode'. | 833 | See also `mh-folder-mode'. |
| 834 | 834 | ||
| 835 | \\{mh-show-mode-map}" | 835 | \\{mh-show-mode-map}" |
| 836 | (mh-do-in-gnu-emacs | 836 | (if (boundp 'tool-bar-map) |
| 837 | (if (boundp 'tool-bar-map) | 837 | (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map)) |
| 838 | (set (make-local-variable 'tool-bar-map) mh-show-tool-bar-map))) | ||
| 839 | (set (make-local-variable 'mail-header-separator) mh-mail-header-separator) | 838 | (set (make-local-variable 'mail-header-separator) mh-mail-header-separator) |
| 840 | (setq paragraph-start (default-value 'paragraph-start)) | 839 | (setq paragraph-start (default-value 'paragraph-start)) |
| 841 | (setq buffer-invisibility-spec '((vanish . t) t)) | 840 | (setq buffer-invisibility-spec '((vanish . t) t)) |
diff --git a/lisp/mh-e/mh-tool-bar.el b/lisp/mh-e/mh-tool-bar.el index 805408cfc78..06b94b6bf8d 100644 --- a/lisp/mh-e/mh-tool-bar.el +++ b/lisp/mh-e/mh-tool-bar.el | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | ;;; Code: | 27 | ;;; Code: |
| 28 | 28 | ||
| 29 | (require 'mh-e) | 29 | (require 'mh-e) |
| 30 | ;; FIXME: Figure out why removing the call to the `mh-do-in-gnu-emacs' | ||
| 31 | ;; macro here leads to errors. | ||
| 30 | (mh-do-in-gnu-emacs | 32 | (mh-do-in-gnu-emacs |
| 31 | (require 'tool-bar)) | 33 | (require 'tool-bar)) |
| 32 | 34 | ||
| @@ -202,79 +204,77 @@ where, | |||
| 202 | (unless (memq x letter-buttons) | 204 | (unless (memq x letter-buttons) |
| 203 | (error "Letter defaults contains unknown button %s" x))) | 205 | (error "Letter defaults contains unknown button %s" x))) |
| 204 | `(eval-and-compile | 206 | `(eval-and-compile |
| 205 | ;; GNU Emacs tool bar specific code | 207 | (defun mh-buffer-exists-p (mode) |
| 206 | (mh-do-in-gnu-emacs | 208 | "Test whether a buffer with major mode MODE is present." |
| 207 | (defun mh-buffer-exists-p (mode) | 209 | (cl-loop for buf in (buffer-list) |
| 208 | "Test whether a buffer with major mode MODE is present." | 210 | when (with-current-buffer buf |
| 209 | (cl-loop for buf in (buffer-list) | 211 | (eq major-mode mode)) |
| 210 | when (with-current-buffer buf | 212 | return t)) |
| 211 | (eq major-mode mode)) | 213 | ;; Tool bar initialization functions |
| 212 | return t)) | 214 | (defun mh-tool-bar-folder-buttons-init () |
| 213 | ;; Tool bar initialization functions | 215 | (when (mh-buffer-exists-p 'mh-folder-mode) |
| 214 | (defun mh-tool-bar-folder-buttons-init () | 216 | (let* ((load-path (image-load-path-for-library "mh-e" |
| 215 | (when (mh-buffer-exists-p 'mh-folder-mode) | 217 | "mh-logo.xpm")) |
| 216 | (let* ((load-path (image-load-path-for-library "mh-e" | 218 | (image-load-path (cons (car load-path) |
| 217 | "mh-logo.xpm")) | 219 | (when (boundp 'image-load-path) |
| 218 | (image-load-path (cons (car load-path) | 220 | image-load-path)))) |
| 219 | (when (boundp 'image-load-path) | 221 | (setq mh-folder-tool-bar-map |
| 220 | image-load-path)))) | 222 | (let ((tool-bar-map (make-sparse-keymap))) |
| 221 | (setq mh-folder-tool-bar-map | 223 | ,@(nreverse folder-button-setter) |
| 222 | (let ((tool-bar-map (make-sparse-keymap))) | 224 | tool-bar-map)) |
| 223 | ,@(nreverse folder-button-setter) | 225 | (setq mh-folder-seq-tool-bar-map |
| 224 | tool-bar-map)) | 226 | (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map))) |
| 225 | (setq mh-folder-seq-tool-bar-map | 227 | ,@(nreverse sequence-button-setter) |
| 226 | (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map))) | 228 | tool-bar-map)) |
| 227 | ,@(nreverse sequence-button-setter) | 229 | (setq mh-show-tool-bar-map |
| 228 | tool-bar-map)) | 230 | (let ((tool-bar-map (make-sparse-keymap))) |
| 229 | (setq mh-show-tool-bar-map | 231 | ,@(nreverse show-button-setter) |
| 230 | (let ((tool-bar-map (make-sparse-keymap))) | 232 | tool-bar-map)) |
| 231 | ,@(nreverse show-button-setter) | 233 | (setq mh-show-seq-tool-bar-map |
| 232 | tool-bar-map)) | 234 | (let ((tool-bar-map (copy-keymap mh-show-tool-bar-map))) |
| 233 | (setq mh-show-seq-tool-bar-map | 235 | ,@(nreverse show-seq-button-setter) |
| 234 | (let ((tool-bar-map (copy-keymap mh-show-tool-bar-map))) | 236 | tool-bar-map))))) |
| 235 | ,@(nreverse show-seq-button-setter) | 237 | (defun mh-tool-bar-letter-buttons-init () |
| 236 | tool-bar-map))))) | 238 | (when (mh-buffer-exists-p 'mh-letter-mode) |
| 237 | (defun mh-tool-bar-letter-buttons-init () | 239 | (let* ((load-path (image-load-path-for-library "mh-e" |
| 238 | (when (mh-buffer-exists-p 'mh-letter-mode) | 240 | "mh-logo.xpm")) |
| 239 | (let* ((load-path (image-load-path-for-library "mh-e" | 241 | (image-load-path (cons (car load-path) |
| 240 | "mh-logo.xpm")) | 242 | (when (boundp 'image-load-path) |
| 241 | (image-load-path (cons (car load-path) | 243 | image-load-path)))) |
| 242 | (when (boundp 'image-load-path) | 244 | (setq mh-letter-tool-bar-map |
| 243 | image-load-path)))) | 245 | (let ((tool-bar-map (make-sparse-keymap))) |
| 244 | (setq mh-letter-tool-bar-map | 246 | ,@(nreverse letter-button-setter) |
| 245 | (let ((tool-bar-map (make-sparse-keymap))) | 247 | tool-bar-map))))) |
| 246 | ,@(nreverse letter-button-setter) | 248 | ;; Custom setter functions |
| 247 | tool-bar-map))))) | 249 | (defun mh-tool-bar-update (mode default-map sequence-map) |
| 248 | ;; Custom setter functions | 250 | "Update `tool-bar-map' in all buffers of MODE. |
| 249 | (defun mh-tool-bar-update (mode default-map sequence-map) | ||
| 250 | "Update `tool-bar-map' in all buffers of MODE. | ||
| 251 | Use SEQUENCE-MAP if display is limited; DEFAULT-MAP otherwise." | 251 | Use SEQUENCE-MAP if display is limited; DEFAULT-MAP otherwise." |
| 252 | (cl-loop for buf in (buffer-list) | 252 | (cl-loop for buf in (buffer-list) |
| 253 | do (with-current-buffer buf | 253 | do (with-current-buffer buf |
| 254 | (when (eq mode major-mode) ;FIXME: derived-mode-p? | 254 | (when (eq mode major-mode) ;FIXME: derived-mode-p? |
| 255 | (let ((map (if mh-folder-view-stack | 255 | (let ((map (if mh-folder-view-stack |
| 256 | sequence-map | 256 | sequence-map |
| 257 | default-map))) | 257 | default-map))) |
| 258 | ;; Yes, make-local-variable is necessary since we | 258 | ;; Yes, make-local-variable is necessary since we |
| 259 | ;; get here during initialization when loading | 259 | ;; get here during initialization when loading |
| 260 | ;; mh-e.el, after the +inbox buffer has been | 260 | ;; mh-e.el, after the +inbox buffer has been |
| 261 | ;; created, but before mh-folder-mode has run and | 261 | ;; created, but before mh-folder-mode has run and |
| 262 | ;; created the local map. | 262 | ;; created the local map. |
| 263 | (set (make-local-variable 'tool-bar-map) map)))))) | 263 | (set (make-local-variable 'tool-bar-map) map)))))) |
| 264 | (defun mh-tool-bar-folder-buttons-set (symbol value) | 264 | (defun mh-tool-bar-folder-buttons-set (symbol value) |
| 265 | "Construct tool bar for `mh-folder-mode' and `mh-show-mode'." | 265 | "Construct tool bar for `mh-folder-mode' and `mh-show-mode'." |
| 266 | (set-default symbol value) | 266 | (set-default symbol value) |
| 267 | (mh-tool-bar-folder-buttons-init) | 267 | (mh-tool-bar-folder-buttons-init) |
| 268 | (mh-tool-bar-update 'mh-folder-mode mh-folder-tool-bar-map | 268 | (mh-tool-bar-update 'mh-folder-mode mh-folder-tool-bar-map |
| 269 | mh-folder-seq-tool-bar-map) | 269 | mh-folder-seq-tool-bar-map) |
| 270 | (mh-tool-bar-update 'mh-show-mode mh-show-tool-bar-map | 270 | (mh-tool-bar-update 'mh-show-mode mh-show-tool-bar-map |
| 271 | mh-show-seq-tool-bar-map)) | 271 | mh-show-seq-tool-bar-map)) |
| 272 | (defun mh-tool-bar-letter-buttons-set (symbol value) | 272 | (defun mh-tool-bar-letter-buttons-set (symbol value) |
| 273 | "Construct tool bar for `mh-letter-mode'." | 273 | "Construct tool bar for `mh-letter-mode'." |
| 274 | (set-default symbol value) | 274 | (set-default symbol value) |
| 275 | (mh-tool-bar-letter-buttons-init) | 275 | (mh-tool-bar-letter-buttons-init) |
| 276 | (mh-tool-bar-update 'mh-letter-mode mh-letter-tool-bar-map | 276 | (mh-tool-bar-update 'mh-letter-mode mh-letter-tool-bar-map |
| 277 | mh-letter-tool-bar-map))) | 277 | mh-letter-tool-bar-map)) |
| 278 | ;; Declare customizable tool bars | 278 | ;; Declare customizable tool bars |
| 279 | (custom-declare-variable | 279 | (custom-declare-variable |
| 280 | 'mh-tool-bar-folder-buttons | 280 | 'mh-tool-bar-folder-buttons |
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 93bc7f8d390..4f211c12866 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el | |||
| @@ -124,19 +124,18 @@ Ignores case when searching for OLD." | |||
| 124 | ;;;###mh-autoload | 124 | ;;;###mh-autoload |
| 125 | (defun mh-logo-display () | 125 | (defun mh-logo-display () |
| 126 | "Modify mode line to display MH-E logo." | 126 | "Modify mode line to display MH-E logo." |
| 127 | (mh-do-in-gnu-emacs | 127 | (let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm")) |
| 128 | (let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm")) | 128 | (image-load-path (cons (car load-path) |
| 129 | (image-load-path (cons (car load-path) | 129 | (when (boundp 'image-load-path) |
| 130 | (when (boundp 'image-load-path) | 130 | image-load-path)))) |
| 131 | image-load-path)))) | 131 | (add-text-properties |
| 132 | (add-text-properties | 132 | 0 2 |
| 133 | 0 2 | 133 | `(display ,(or mh-logo-cache |
| 134 | `(display ,(or mh-logo-cache | 134 | (setq mh-logo-cache |
| 135 | (setq mh-logo-cache | 135 | (mh-funcall-if-exists |
| 136 | (mh-funcall-if-exists | 136 | find-image '((:type xpm :ascent center |
| 137 | find-image '((:type xpm :ascent center | 137 | :file "mh-logo.xpm")))))) |
| 138 | :file "mh-logo.xpm")))))) | 138 | (car mode-line-buffer-identification)))) |
| 139 | (car mode-line-buffer-identification))))) | ||
| 140 | 139 | ||
| 141 | 140 | ||
| 142 | 141 | ||
| @@ -910,8 +909,7 @@ Handle RFC 822 (or later) continuation lines." | |||
| 910 | 909 | ||
| 911 | (defvar mh-hidden-header-keymap | 910 | (defvar mh-hidden-header-keymap |
| 912 | (let ((map (make-sparse-keymap))) | 911 | (let ((map (make-sparse-keymap))) |
| 913 | (mh-do-in-gnu-emacs | 912 | (define-key map [mouse-2] #'mh-letter-toggle-header-field-display-button) |
| 914 | (define-key map [mouse-2] #'mh-letter-toggle-header-field-display-button)) | ||
| 915 | map)) | 913 | map)) |
| 916 | 914 | ||
| 917 | ;;;###mh-autoload | 915 | ;;;###mh-autoload |
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el index 5983353b3d7..332f963a04f 100644 --- a/lisp/mh-e/mh-xface.el +++ b/lisp/mh-e/mh-xface.el | |||
| @@ -74,17 +74,16 @@ in this order is used." | |||
| 74 | (when type | 74 | (when type |
| 75 | (goto-char (point-min)) | 75 | (goto-char (point-min)) |
| 76 | (when (re-search-forward "^from:" (point-max) t) | 76 | (when (re-search-forward "^from:" (point-max) t) |
| 77 | (mh-do-in-gnu-emacs | 77 | (if (eq type 'url) |
| 78 | (if (eq type 'url) | 78 | (mh-x-image-url-display url) |
| 79 | (mh-x-image-url-display url) | 79 | (mh-funcall-if-exists |
| 80 | (mh-funcall-if-exists | 80 | insert-image (create-image |
| 81 | insert-image (create-image | 81 | raw type t |
| 82 | raw type t | 82 | :foreground |
| 83 | :foreground | 83 | (face-foreground 'mh-show-xface nil t) |
| 84 | (face-foreground 'mh-show-xface nil t) | 84 | :background |
| 85 | :background | 85 | (face-background 'mh-show-xface nil t)) |
| 86 | (face-background 'mh-show-xface nil t)) | 86 | " "))))))) |
| 87 | " ")))))))) | ||
| 88 | 87 | ||
| 89 | (defun mh-face-to-png (data) | 88 | (defun mh-face-to-png (data) |
| 90 | "Convert base64 encoded DATA to png image." | 89 | "Convert base64 encoded DATA to png image." |
| @@ -143,9 +142,8 @@ The directories are searched for in the order they appear in the list.") | |||
| 143 | 142 | ||
| 144 | (defvar mh-picon-image-types | 143 | (defvar mh-picon-image-types |
| 145 | (cl-loop for type in '(xpm xbm gif) | 144 | (cl-loop for type in '(xpm xbm gif) |
| 146 | when (or (mh-do-in-gnu-emacs | 145 | when (ignore-errors |
| 147 | (ignore-errors | 146 | (image-type-available-p type)) |
| 148 | (image-type-available-p type)))) | ||
| 149 | collect type)) | 147 | collect type)) |
| 150 | 148 | ||
| 151 | (autoload 'message-tokenize-header "sendmail") | 149 | (autoload 'message-tokenize-header "sendmail") |
| @@ -370,8 +368,7 @@ filenames. In addition, replaces * with %2a. See URL | |||
| 370 | (when (and (file-readable-p image) (not (file-symlink-p image)) | 368 | (when (and (file-readable-p image) (not (file-symlink-p image)) |
| 371 | (eq marker mh-x-image-marker)) | 369 | (eq marker mh-x-image-marker)) |
| 372 | (goto-char marker) | 370 | (goto-char marker) |
| 373 | (mh-do-in-gnu-emacs | 371 | (insert-image (create-image image 'png))) |
| 374 | (insert-image (create-image image 'png)))) | ||
| 375 | (set-buffer-modified-p buffer-modified-flag))))) | 372 | (set-buffer-modified-p buffer-modified-flag))))) |
| 376 | 373 | ||
| 377 | (defun mh-x-image-url-fetch-image (url cache-file marker sentinel) | 374 | (defun mh-x-image-url-fetch-image (url cache-file marker sentinel) |