[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 339945c05a: Merge from origin/emacs-28
From: |
Stefan Kangas |
Subject: |
master 339945c05a: Merge from origin/emacs-28 |
Date: |
Thu, 29 Sep 2022 00:45:23 -0400 (EDT) |
branch: master
commit 339945c05a6c4709352183326a2fa5c682073889
Merge: ca1ce00854 cf38e1c393
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Merge from origin/emacs-28
cf38e1c393 Clarify image file search
fc212364ce ; Fix typo.
---
doc/emacs/ack.texi | 2 +-
doc/lispref/display.texi | 11 ++++++-----
lisp/image.el | 5 +++--
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi
index 625aa706d5..f0a45fd315 100644
--- a/doc/emacs/ack.texi
+++ b/doc/emacs/ack.texi
@@ -1441,7 +1441,7 @@ Victor Zandy wrote @file{zone.el}, a package for people
who like to
zone out in front of Emacs.
@item
-Eli Zaretskii was the the Emacs (co-)maintainer from Emacs 25
+Eli Zaretskii was the Emacs (co-)maintainer from Emacs 25
onwards. He made many standard Emacs features work on MS-DOS and
Microsoft Windows. He also wrote @file{tty-colors.el}, which
implements transparent mapping of X colors to tty colors; and
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 190364852a..0c217e329e 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -5646,10 +5646,9 @@ Every image descriptor must include this property.
@item :file @var{file}
This says to load the image from file @var{file}. If @var{file} is
-not an absolute file name, it is expanded relative to the
-@file{images} subdirectory of @code{data-directory}, and failing that,
-relative to the directories listed by @code{x-bitmap-file-path}
-(@pxref{Face Attributes}).
+not an absolute file name, it is expanded relative to each of the
+directories mentioned by @code{image-load-path} (@pxref{Defining
+Images}).
@item :data @var{data}
This specifies the raw image data. Each image descriptor must have
@@ -6596,7 +6595,9 @@ Image type @code{webp}.
This function creates and returns an image descriptor which uses the
data in @var{file-or-data}. @var{file-or-data} can be a file name or
a string containing the image data; @var{data-p} should be @code{nil}
-for the former case, non-@code{nil} for the latter case.
+for the former case, non-@code{nil} for the latter case. If
+@var{file-or-data} is a relative file name, the function will search
+for it in directories mentioned in @code{image-load-path}.
The optional argument @var{type} is a symbol specifying the image type.
If @var{type} is omitted or @code{nil}, @code{create-image} tries to
diff --git a/lisp/image.el b/lisp/image.el
index eef47fd91c..4e90433411 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -476,8 +476,9 @@ must be available."
;;;###autoload
(defun create-image (file-or-data &optional type data-p &rest props)
- "Create an image.
-FILE-OR-DATA is an image file name or image data.
+ "Create an image from FILE-OR-DATA.
+FILE-OR-DATA is an image file name or image data. If it is a relative
+file name, the function will look for it along `image-load-path'.
Optional TYPE is a symbol describing the image type. If TYPE is omitted
or nil, try to determine the image type from its first few bytes