[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 06d7161476: Fix some no-X build warnings
From: |
Lars Ingebrigtsen |
Subject: |
master 06d7161476: Fix some no-X build warnings |
Date: |
Mon, 22 Aug 2022 13:22:42 -0400 (EDT) |
branch: master
commit 06d7161476255c77defa119fffa842b7abaa0dcb
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix some no-X build warnings
* lisp/cus-edit.el (fringe-bitmap-p): Autoload.
* lisp/image.el (clear-image-cache): Declare.
* lisp/mouse.el (dnd-begin-file-dram): Autoload.
* lisp/thumbs.el (image-supported-file-p): Declare (bug#57342).
* lisp/mail/rmailmm.el (rmail-mime-set-bulk-data):
* lisp/emacs-lisp/icons.el (icons--create): Avoid warnings on no-X
builds.
---
lisp/cus-edit.el | 3 +++
lisp/emacs-lisp/icons.el | 4 +++-
lisp/image.el | 2 ++
lisp/mail/rmailmm.el | 5 +++--
lisp/mouse.el | 3 +++
lisp/org/org-plot.el | 3 ++-
lisp/thumbs.el | 1 +
7 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index d5bae8f66f..d3768766be 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4291,6 +4291,9 @@ restoring it to the state of a face that has never been
customized."
(defvar widget-fringe-bitmap-prompt-value-history nil
"History of input to `widget-fringe-bitmap-prompt-value'.")
+;; In no-X builds, fringe.el isn't preloaded.
+(autoload 'fringe-bitmap-p "fringe")
+
(define-widget 'fringe-bitmap 'symbol
"A Lisp fringe bitmap name."
:format "%v"
diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el
index 277b285c2e..93749a3451 100644
--- a/lisp/emacs-lisp/icons.el
+++ b/lisp/emacs-lisp/icons.el
@@ -189,8 +189,10 @@ present if the icon is represented by an image."
(cl-defmethod icons--create ((_type (eql 'image)) icon keywords)
(let ((file (if (file-name-absolute-p icon)
icon
- (image-search-load-path icon))))
+ (and (fboundp 'image-search-load-path)
+ (image-search-load-path icon)))))
(and (display-images-p)
+ (fboundp 'image-supported-file-p)
(image-supported-file-p file)
(propertize
" " 'display
diff --git a/lisp/image.el b/lisp/image.el
index de2afdc2c7..9311125450 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -32,6 +32,8 @@
:group 'multimedia)
(declare-function image-flush "image.c" (spec &optional frame))
+(declare-function clear-image-cache "image.c"
+ (&optional filter animation-cache))
(defconst image-type-header-regexps
`(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm)
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index 79f421bdcd..416f7d1ea8 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -796,8 +796,9 @@ directly."
((string-match "text/" content-type)
(setq type 'text))
((string-match "image/\\(.*\\)" content-type)
- (setq type (image-supported-file-p
- (concat "." (match-string 1 content-type))))
+ (setq type (and (fboundp 'image-supported-file-p)
+ (image-supported-file-p
+ (concat "." (match-string 1 content-type)))))
(when (and type
rmail-mime-show-images
(not (eq rmail-mime-show-images 'button))
diff --git a/lisp/mouse.el b/lisp/mouse.el
index bee664dc56..e38a4f8a71 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -869,6 +869,9 @@ must be one of the symbols `header', `mode', or `vertical'."
map)
t (lambda () (setq track-mouse old-track-mouse)))))))
+;; In no-X builds, dnd.el isn't preloaded.
+(autoload 'dnd-begin-file-drag "dnd")
+
(defun mouse-drag-mode-line (start-event)
"Change the height of a window by dragging on its mode line.
START-EVENT is the starting mouse event of the drag action.
diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el
index 831c84befc..1912f6762a 100644
--- a/lisp/org/org-plot.el
+++ b/lisp/org/org-plot.el
@@ -621,7 +621,8 @@ manner suitable for prepending to a user-specified script."
"Find any overlays for IMG-FILE in the current Org buffer, and refresh them."
(dolist (img-overlay org-inline-image-overlays)
(when (string= img-file (plist-get (cdr (overlay-get img-overlay
'display)) :file))
- (when (file-exists-p img-file)
+ (when (and (file-exists-p img-file)
+ (fboundp 'image-flush))
(image-flush (overlay-get img-overlay 'display))))))
;;-----------------------------------------------------------------------------
diff --git a/lisp/thumbs.el b/lisp/thumbs.el
index 3b31f1d809..0b3d36d6e3 100644
--- a/lisp/thumbs.el
+++ b/lisp/thumbs.el
@@ -294,6 +294,7 @@ smaller according to whether INCREMENT is 1 or -1."
tn))
(declare-function image-size "image.c" (spec &optional pixels frame))
+(declare-function image-supported-file-p "image" (file))
(defun thumbs-file-size (img)
(let ((i (image-size
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 06d7161476: Fix some no-X build warnings,
Lars Ingebrigtsen <=