summaryrefslogtreecommitdiff
path: root/lisp/mh-e/mh-tool-bar.el
diff options
context:
space:
mode:
authorBasil L. Contovounesios <contovob@tcd.ie>2021-10-11 19:14:23 +0100
committerBasil L. Contovounesios <contovob@tcd.ie>2021-10-12 22:32:03 +0100
commitbcb43fbc95ad0c635c8f19c391ec90d3f8a74035 (patch)
tree8d3c67e6e4d96c1408f35f6fe1681e28318b6b3c /lisp/mh-e/mh-tool-bar.el
parente47b85a68339063dd3a784e8b90aecbf90b23f41 (diff)
downloademacs-bcb43fbc95ad0c635c8f19c391ec90d3f8a74035.tar.gz
emacs-bcb43fbc95ad0c635c8f19c391ec90d3f8a74035.tar.bz2
emacs-bcb43fbc95ad0c635c8f19c391ec90d3f8a74035.zip
Fix byte-compilation warnings in nox builds
For discussion, see bug#51139. * lisp/edmacro.el (edmacro-fix-menu-commands): Load mwheel to pacify free variable warnings in without-x builds. * lisp/mh-e/mh-compat.el: Declare image.el functions that are not preloaded in without-x builds. * lisp/mh-e/mh-utils.el (mh--with-image-load-path): New macro. (mh-logo-display): * lisp/mh-e/mh-tool-bar.el (mh-tool-bar-folder-buttons-init) (mh-tool-bar-letter-buttons-init): Use it to pacify byte-compilation warnings about image.el definitions not preloaded without-x.
Diffstat (limited to 'lisp/mh-e/mh-tool-bar.el')
-rw-r--r--lisp/mh-e/mh-tool-bar.el12
1 files changed, 2 insertions, 10 deletions
diff --git a/lisp/mh-e/mh-tool-bar.el b/lisp/mh-e/mh-tool-bar.el
index ca08cc3b35d..0200d232c33 100644
--- a/lisp/mh-e/mh-tool-bar.el
+++ b/lisp/mh-e/mh-tool-bar.el
@@ -211,11 +211,7 @@ where,
;; Tool bar initialization functions
(defun mh-tool-bar-folder-buttons-init ()
(when (mh-buffer-exists-p 'mh-folder-mode)
- (let* ((load-path (image-load-path-for-library "mh-e"
- "mh-logo.xpm"))
- (image-load-path (cons (car load-path)
- (when (boundp 'image-load-path)
- image-load-path))))
+ (mh--with-image-load-path
(setq mh-folder-tool-bar-map
(let ((tool-bar-map (make-sparse-keymap)))
,@(nreverse folder-button-setter)
@@ -234,11 +230,7 @@ where,
tool-bar-map)))))
(defun mh-tool-bar-letter-buttons-init ()
(when (mh-buffer-exists-p 'mh-letter-mode)
- (let* ((load-path (image-load-path-for-library "mh-e"
- "mh-logo.xpm"))
- (image-load-path (cons (car load-path)
- (when (boundp 'image-load-path)
- image-load-path))))
+ (mh--with-image-load-path
(setq mh-letter-tool-bar-map
(let ((tool-bar-map (make-sparse-keymap)))
,@(nreverse letter-button-setter)