emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6195a57b8e8: ; Improve documentation of a recent change in Gnus


From: Eli Zaretskii
Subject: master 6195a57b8e8: ; Improve documentation of a recent change in Gnus
Date: Sat, 10 Feb 2024 02:29:54 -0500 (EST)

branch: master
commit 6195a57b8e8ebff4eaaf4ff8d62719cbd55f579f
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; Improve documentation of a recent change in Gnus
    
    * lisp/image.el (find-image): Doc fix.
    * lisp/gnus/gnus.el (gnus-mode-line-logo): Fix doc string and
    :type texts.  Add :version.  (Bug#68985)
---
 etc/NEWS          |  1 +
 lisp/gnus/gnus.el | 15 ++++++++-------
 lisp/image.el     | 26 +++++++++++++++-----------
 3 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index 76862bf500d..ca0a5ed8fc8 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1102,6 +1102,7 @@ The gmane.org website is, sadly, down since a number of 
years with no
 prospect of it coming back.  Therefore, it is no longer valid to set
 the user option 'nnweb-type' to 'gmane'.
 
+---
 *** New user option 'gnus-mode-line-logo'.
 This allows the user to either disable the display of any logo or
 specify which logo will be displayed as part of the
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index cf4c3f7841c..dab66b60205 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -313,18 +313,19 @@ be set in `.emacs' instead."
   '((:type svg :file "gnus-pointer.svg" :ascent center)
      (:type xpm :file "gnus-pointer.xpm" :ascent center)
      (:type xbm :file "gnus-pointer.xbm" :ascent center))
-  "Gnus logo displayed in mode-line.
+  "Image spec for the Gnus logo to be displayed in mode-line.
 
-If non-nil, it should be a list of image specifications that will be
-given as first argument to `find-image', which see.  Then, in case of a
-graphical display, the specified Gnus logo will be displayed as part of
+If non-nil, it should be a list of image specifications to be passed
+as the first argument to `find-image', which see.  Then, if the display
+is capable of showing images, the Gnus logo will be displayed as part of
 the buffer-identification in the mode-line of Gnus-buffers.
 
-If nil, no logo will be displayed."
+If nil, there will be no Gnus logo in the mode-line."
   :group 'gnus-visual
   :type '(choice
-           (repeat :tag "List of image specifications" (plist))
-           (const :tag "No logo" nil)))
+           (repeat :tag "List of Gnus logo image specifications" (plist))
+           (const :tag "Don't display Gnus logo" nil))
+  :version "30.1")
 
 (defun gnus-mode-line-buffer-identification (line)
   (let* ((str (car-safe line))
diff --git a/lisp/image.el b/lisp/image.el
index 73801f88d1e..2ebce59a98c 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -759,21 +759,25 @@ BUFFER nil or omitted means use the current buffer."
 
 ;;;###autoload
 (defun find-image (specs &optional cache)
-  "Find an image, choosing one of a list of image specifications.
+  "Find an image that satisfies one of a list of image specifications.
 
 SPECS is a list of image specifications.
 
-Each image specification in SPECS is a property list.  The contents of
-a specification are image type dependent.  All specifications must at
-least contain either the property `:file FILE' or `:data DATA',
-where FILE is the file to load the image from, and DATA is a string
-containing the actual image data.  If the property `:type TYPE' is
-omitted or nil, try to determine the image type from its first few
+Each image specification in SPECS is a property list.  The
+contents of a specification are image type dependent; see the
+info node `(elisp)Image Descriptors' for details.  All specifications
+must at least contain either the property `:file FILE' or `:data DATA',
+where FILE is the file from which to load the image, and DATA is a
+string containing the actual image data.  If the property `:type TYPE'
+is omitted or nil, try to determine the image type from its first few
 bytes of image data.  If that doesn't work, and the property `:file
-FILE' provide a file name, use its file extension as image type.
-If `:type TYPE' is provided, it must match the actual type
-determined for FILE or DATA by `create-image'.  Return nil if no
-specification is satisfied.
+FILE' provide a file name, use its file extension as idication of the
+image type. If `:type TYPE' is provided, it must match the actual type
+determined for FILE or DATA by `create-image'.
+
+The function returns the image specification for the first specification
+in the list whose TYPE is supported and FILE, if specified, exists.  It
+returns nil if no specification in the list can be satisfied.
 
 If CACHE is non-nil, results are cached and returned on subsequent calls.
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]