]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix some no-X build warnings
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 22 Aug 2022 17:22:27 +0000 (19:22 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 22 Aug 2022 17:22:33 +0000 (19:22 +0200)
* 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
lisp/emacs-lisp/icons.el
lisp/image.el
lisp/mail/rmailmm.el
lisp/mouse.el
lisp/org/org-plot.el
lisp/thumbs.el

index d5bae8f66f8622041537bdd7e31bb1d855f65352..d3768766be017cbec75c13e02bf40a223e36bbfe 100644 (file)
@@ -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"
index 277b285c2ef0bf0a058ef4f020b64416cda9acb3..93749a3451ef5b403e9dd14ec1f9cb4307e8c92d 100644 (file)
@@ -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
index de2afdc2c7b473d9d87d8b2b65cf235c403192c6..9311125450a9e08184fd7f7d12f6bb2239d516e1 100644 (file)
@@ -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)
index 79f421bdcd6b82b51076e397ced0ea5a19c323d7..416f7d1ea8976bf03ce93ce1b15dae73bb8f369c 100644 (file)
@@ -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))
index bee664dc568c35a3ec0d31416138d7742e9e4fd6..e38a4f8a71ab1d753cb7d0167fec2b1cdcae3084 100644 (file)
@@ -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.
index 831c84befcb02393a2d01c6ca2f24651d47fed55..1912f6762ae99fe1cd95c76a9fe7bc907a0d35b2 100644 (file)
@@ -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))))))
 
 ;;-----------------------------------------------------------------------------
index 3b31f1d80906adc97ae37ae3f511d81334fc6134..0b3d36d6e312286c2012cdbaacfd4e196525a1f5 100644 (file)
@@ -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