* 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.
(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"
(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
: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)
((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))
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.
"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))))))
;;-----------------------------------------------------------------------------
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