emacs-diffs
[Top][All Lists]
Advanced

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

feature/pgtk 8f2d045: Merge remote-tracking branch 'origin/master' into


From: Po Lu
Subject: feature/pgtk 8f2d045: Merge remote-tracking branch 'origin/master' into feature/pgtk
Date: Sun, 5 Dec 2021 19:57:31 -0500 (EST)

branch: feature/pgtk
commit 8f2d0450ad23681bb6fc26ca46c7eb1c615128de
Merge: f99745c 77de40a
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Merge remote-tracking branch 'origin/master' into feature/pgtk
---
 doc/lispref/frames.texi        |  9 ++++----
 doc/misc/eieio.texi            |  9 ++++----
 doc/misc/erc.texi              | 51 +++++++++++++++++++++---------------------
 doc/misc/gnus.texi             |  4 ----
 etc/NEWS                       |  4 ++++
 etc/themes/manoj-dark-theme.el |  1 -
 lisp/frame.el                  | 11 ++-------
 lisp/gnus/mail-source.el       | 19 ++++++----------
 lisp/gnus/mm-util.el           |  2 +-
 lisp/info.el                   |  4 +++-
 lisp/language/hanja-util.el    |  4 ++--
 lisp/leim/quail/hangul.el      |  4 ++--
 lisp/mouse.el                  |  3 ++-
 lisp/net/shr.el                | 18 +++++++--------
 lisp/nxml/rng-cmpct.el         |  2 +-
 lisp/nxml/xmltok.el            | 10 ++++-----
 lisp/nxml/xsd-regexp.el        |  6 +----
 lisp/startup.el                |  3 ++-
 lisp/subr.el                   |  3 ++-
 lisp/xml.el                    | 10 ++++-----
 src/image.c                    |  6 ++---
 src/xdisp.c                    |  6 +++--
 22 files changed, 89 insertions(+), 100 deletions(-)

diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 3c0bf64..1dfd0d4 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -167,10 +167,11 @@ argument, the frame just created.
 @end defvar
 
 Note that any functions added to these hooks by your initial file are
-usually not run for the initial frame.  However, if the initial frame
-is specified to use a separate minibuffer frame (@pxref{Minibuffers
-and Frames}), the functions will be run for both, the minibuffer-less
-and the minibuffer frame.
+usually not run for the initial frame, since Emacs reads the initial
+file only after creating that frame.  However, if the initial frame is
+specified to use a separate minibuffer frame (@pxref{Minibuffers and
+Frames}), the functions will be run for both, the minibuffer-less and
+the minibuffer frame.
 
 @defvar frame-inherited-parameters
 This variable specifies the list of frame parameters that a newly
diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi
index 8a4b914..c8d488d 100644
--- a/doc/misc/eieio.texi
+++ b/doc/misc/eieio.texi
@@ -856,11 +856,12 @@ You can also create a generic method with 
@code{cl-defmethod}
 (@pxref{Methods}).  When a method is created and there is no generic
 method in place with that name, then a new generic will be created,
 and the new method will use it.
-@end defmac
 
-In CLOS, a generic call also be used to provide an argument list and
-dispatch precedence for all the arguments.  In @eieio{}, dispatching
-only occurs for the first argument, so the @var{arglist} is not used.
+In CLOS, a generic method can also be used to provide an argument list
+and dispatch precedence for all the arguments.  In @eieio{},
+dispatching only occurs for the first argument, so the @var{arglist}
+is not used.
+@end defmac
 
 @node Methods
 @section Methods
diff --git a/doc/misc/erc.texi b/doc/misc/erc.texi
index 6631d84..7dbb5f0 100644
--- a/doc/misc/erc.texi
+++ b/doc/misc/erc.texi
@@ -87,32 +87,31 @@ Advanced Usage
 @node Introduction
 @chapter Introduction
 
+ERC is a powerful, modular, and extensible IRC client for Emacs.
+It is distributed with Emacs since version 22.1.
+
 IRC is short for Internet Relay Chat.  When using IRC, you can
-communicate with other users on the same IRC network.  There are
-several of these networks available---if you search for ``IRC
-networks'' in your favorite search engine, you are likely to find
-up-to-date lists of IRC networks catering to various interests and
-topics.
-
-In order to use IRC, you need an IRC client such as ERC.  Using the
-client, you connect to an IRC server.  Once you've done that, you will
-have access to all available channels on that server's network.  A
-channel is basically a chat room, and what you type in a channel will
-be shown to all other users in that channel, and you can be in several
-channels at the same time---most clients will show each channel in its
-own window.  IRC channel names always begin with a @samp{#} character.
-For example, the Emacs channel on Libera.Chat is @samp{#emacs}, and
-the ERC channel is @samp{#erc}.  Do not confuse them with the hashtags
+communicate with other users on the same IRC network.  There are many
+different networks---if you search for ``IRC networks'' in your
+favorite search engine, you will find up-to-date lists of IRC networks
+catering to various interests and topics.
+
+To use IRC, you need an IRC client such as ERC.  Using the client, you
+connect to an IRC server.  Once you've done that, you will have access
+to all available channels on that server's network.  A channel is
+basically a chat room, and what you type in a channel will be shown to
+all other users in that channel.  You can be in several channels at
+the same time---ERC will show each channel in its own buffer.
+
+IRC channel names always begin with a @samp{#} character.  For
+example, the Emacs channel on Libera.Chat is @samp{#emacs}, and the
+ERC channel is @samp{#erc}.  Do not confuse them with the hashtags
 used on many social media platforms.
 
-It is also possible to send private messages to other IRC
-users on the same network, regardless of whether or not they are in
-the same channel as you.
-
-ERC is a powerful, modular, and extensible IRC client for Emacs.
-It is distributed with Emacs since version 22.1.
+You can also send private messages to other IRC users on the same
+network, even if they are not in the same channels as you.
 
-It comes with the following capabilities enabled by default.
+ERC comes with the following capabilities enabled by default.
 
 @itemize @bullet
 @item Flood control
@@ -137,10 +136,10 @@ It comes with the following capabilities enabled by 
default.
 
 The command @kbd{M-x erc} will start ERC and prompt for the server to
 connect to.  If you're unsure of which server or network to connect
-to, we suggest you start with ``irc.libera.chat''.  There you will
-find the @samp{#emacs} channels where you can chat with other Emacs
-and users, and if you're having trouble with ERC, you can join the
-@samp{#erc} channel and ask for help there.
+to, we suggest starting with ``irc.libera.chat''.  There you will find
+the @samp{#emacs} channels where you can chat with other Emacs users,
+and if you're having trouble with ERC, you can join the @samp{#erc}
+channel and ask for help there.
 
 If you want to place ERC settings in their own file, you can place them
 in @file{~/.emacs.d/.ercrc.el}, creating it if necessary.
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index a18afec..6ffc057 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -15447,10 +15447,6 @@ If non-@code{nil}, ask for confirmation before 
deleting old incoming
 files.  This variable only applies when
 @code{mail-source-delete-incoming} is a positive number.
 
-@item mail-source-ignore-errors
-@vindex mail-source-ignore-errors
-If non-@code{nil}, ignore errors when reading mail from a mail source.
-
 @item mail-source-directory
 @vindex mail-source-directory
 Directory where incoming mail source files (if any) will be stored.  The
diff --git a/etc/NEWS b/etc/NEWS
index df5e6ef..a8b7dc5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -693,6 +693,10 @@ Emacs buffers, like indentation and the like.  The new ert 
function
 
 * Incompatible Lisp Changes in Emacs 29.1
 
+** User option 'mail-source-ignore-errors' is now obsolete
+The whole mechanism for prompting users to continue in case of
+mail-source errors has been removed, so this option is no longer
+needed.
 ** Fonts
 
 ---
diff --git a/etc/themes/manoj-dark-theme.el b/etc/themes/manoj-dark-theme.el
index f10b885..e80403f 100644
--- a/etc/themes/manoj-dark-theme.el
+++ b/etc/themes/manoj-dark-theme.el
@@ -541,7 +541,6 @@ jarring angry fruit salad look to reduce eye fatigue.")
  '(ido-indicator ((t (:background "red1" :foreground "yellow1" :width 
condensed))))
  '(ido-only-match ((t (:foreground "ForestGreen"))))
  '(ido-subdir ((t (:foreground "red1"))))
- '(info-menu-5 ((t (:underline t))))
  '(info-menu-header ((t (:bold t :weight bold))))
  '(info-node ((t (:bold t :italic t :foreground "yellow"))))
  '(info-node ((t (:italic t :bold t :foreground "white" :slant italic :weight 
bold))))
diff --git a/lisp/frame.el b/lisp/frame.el
index 00a60e5..f790fa1 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -808,19 +808,12 @@ also select the new frame."
     new-frame))
 
 (defvar before-make-frame-hook nil
-  "Functions to run before `make-frame' creates a new frame.
-Note that these functions are usually not run for the initial
-frame, except when the initial frame is created from an Emacs
-daemon.")
+  "Functions to run before `make-frame' creates a new frame.")
 
 (defvar after-make-frame-functions nil
   "Functions to run after `make-frame' created a new frame.
 The functions are run with one argument, the newly created
-frame.
-
-Note that these functions are usually not run for the initial
-frame, except when the initial frame is created from an Emacs
-daemon.")
+frame.")
 
 (defvar after-setting-font-hook nil
   "Functions to run after a frame's font has been changed.")
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index af0a198..efdddea 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -224,12 +224,9 @@ Leave mails for this many days" :value 14)))))
                                           (const :format "" :value :plugged)
                                           (boolean :tag "Plugged"))))))))
 
-(defcustom mail-source-ignore-errors nil
-  "Ignore errors when querying mail sources.
-If nil, the user will be prompted when an error occurs.  If non-nil,
-the error will be ignored."
-  :version "22.1"
-  :type 'boolean)
+(make-obsolete-variable 'mail-source-ignore-errors
+                        "configure `gnus-verbose' instead"
+                        "29.1")
 
 (defcustom mail-source-primary-source nil
   "Primary source for incoming mail.
@@ -554,18 +551,16 @@ Return the number of files that were found."
                 (condition-case err
                     (funcall function source callback)
                   (error
-                   (if (and (not mail-source-ignore-errors)
-                            (not
-                             (yes-or-no-p
-                              (format "Mail source %s error (%s).  Continue? "
+                    (gnus-error
+                     5
+                     (format "Mail source %s error (%s)"
                                       (if (memq ':password source)
                                           (let ((s (copy-sequence source)))
                                             (setcar (cdr (memq ':password s))
                                                     "********")
                                             s)
                                         source)
-                                      (cadr err)))))
-                     (error "Cannot get new mail"))
+                                      (cadr err)))
                    0)))))))))
 
 (declare-function gnus-message "gnus-util" (level &rest args))
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 92e04f9..ddc228e 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -31,7 +31,7 @@
 
 (defun mm-ucs-to-char (codepoint)
   "Convert Unicode codepoint to character."
-  (or (decode-char 'ucs codepoint) ?#))
+  (or codepoint ?#))
 
 (defvar mm-coding-system-list nil)
 (defun mm-get-coding-system-list ()
diff --git a/lisp/info.el b/lisp/info.el
index 94537c2..559460e 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -115,7 +115,9 @@ The Lisp code is executed when the node is selected.")
 (defface info-menu-star
   '((((class color)) :foreground "red1")
     (t :underline t))
-  "Face for every third `*' in an Info menu.")
+  "Face used to emphasize `*' in an Info menu.
+The face is assigned to the third, sixth, and ninth `*' for easier
+orientation.  See `Info-nth-menu-item'.")
 
 (defface info-xref
   '((t :inherit link))
diff --git a/lisp/language/hanja-util.el b/lisp/language/hanja-util.el
index 9e92135..fe6323d 100644
--- a/lisp/language/hanja-util.el
+++ b/lisp/language/hanja-util.el
@@ -6573,8 +6573,8 @@ The value is a hanja character that is selected 
interactively."
            (hanja-filter (lambda (x) (car x))
                          (mapcar (lambda (c)
                                    (if (listp c)
-                                       (cons (decode-char 'ucs (car c)) (cdr 
c))
-                                    (list (decode-char 'ucs c))))
+                                       (cons (car c) (cdr c))
+                                     (list c)))
                                  (aref hanja-table char)))))
     (unwind-protect
        (when (aref hanja-conversions 2)
diff --git a/lisp/leim/quail/hangul.el b/lisp/leim/quail/hangul.el
index c03e86b..d069b5b 100644
--- a/lisp/leim/quail/hangul.el
+++ b/lisp/leim/quail/hangul.el
@@ -429,7 +429,7 @@ When a Korean input method is off, convert the following 
hangul character."
            (hangul3-input-method-jong char))
           (t
            (setq hangul-queue (make-vector 6 0))
-           (insert (decode-char 'ucs char))
+           (insert char)
            (move-overlay quail-overlay (point) (point))))))
 
 (defun hangul3-input-method (key)
@@ -476,7 +476,7 @@ When a Korean input method is off, convert the following 
hangul character."
            (hangul3-input-method-jong char))
           (t
            (setq hangul-queue (make-vector 6 0))
-           (insert (decode-char 'ucs char))
+           (insert char)
            (move-overlay quail-overlay (point) (point))))))
 
 (defun hangul390-input-method (key)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index b5ca80a..af1eca1 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -330,7 +330,8 @@ the function `context-menu-filter-function'."
     ;; Remove duplicate separators as well as ones at the beginning or
     ;; end of the menu.
     (let ((l menu) saw-first-item)
-      (while (consp (cdr l))
+      (while (and (consp l)
+                  (consp (cdr l)))
         ;; If the next item is a separator, remove it if 1) we haven't
         ;; seen any other items yet, or 2) it's followed by either
         ;; another separator or the end of the list.
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index ee0e824..63522b0 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -582,7 +582,7 @@ size, and full-buffer size."
         (setq shr-warning
               "Not rendering the complete page because of too-deep nesting")
       (when style
-       (if (string-match "color\\|display\\|border-collapse" style)
+       (if (string-match-p "color\\|display\\|border-collapse" style)
            (setq shr-stylesheet (nconc (shr-parse-style style)
                                        shr-stylesheet))
          (setq style nil)))
@@ -685,7 +685,7 @@ size, and full-buffer size."
        (goto-char (point-max)))))
    (t
     (let ((font-start (point)))
-      (when (and (string-match "\\`[ \t\n\r]" text)
+      (when (and (string-match-p "\\`[ \t\n\r]" text)
                 (not (bolp))
                 (not (eq (char-after (1- (point))) ? )))
        (insert " "))
@@ -843,7 +843,7 @@ size, and full-buffer size."
   (cond ((zerop (length url))
          (nth 3 base))
         ((or (not base)
-            (string-match "\\`[a-z]*:" url))
+            (string-match-p "\\`[a-z]*:" url))
         ;; Absolute or empty URI
         url)
        ((eq (aref url 0) ?/)
@@ -1028,7 +1028,7 @@ the mouse click event."
     (let ((param (match-string 4 data))
          (payload (url-unhex-string (match-string 5 data))))
       (when (and param
-                 (string-match "^.*\\(;[ \t]*base64\\)$" param))
+                 (string-match-p "^.*\\(;[ \t]*base64\\)$" param))
        (setq payload (ignore-errors
                         (base64-decode-string payload))))
       payload)))
@@ -1345,7 +1345,7 @@ ones, in case fg and bg are nil."
            ;; Filter out blocked elements inside the SVG image.
            (not (setq url (dom-attr elem ':xlink:href)))
            (not shr-blocked-images)
-           (not (string-match shr-blocked-images url)))
+           (not (string-match-p shr-blocked-images url)))
        (insert " ")
        (shr-dom-print elem)))))
   (insert (format "</%s>" (dom-tag dom))))
@@ -1432,7 +1432,7 @@ ones, in case fg and bg are nil."
 (defun shr-parse-style (style)
   (when style
     (save-match-data
-      (when (string-match "\n" style)
+      (when (string-search "\n" style)
         (setq style (replace-match " " t t style))))
     (let ((plist nil))
       (dolist (elem (split-string style ";"))
@@ -1491,7 +1491,7 @@ ones, in case fg and bg are nil."
     (let ((start (point))
          url multimedia image)
       (when-let* ((type (dom-attr dom 'type)))
-       (when (string-match "\\`image/svg" type)
+       (when (string-match-p "\\`image/svg" type)
          (setq url (dom-attr dom 'data)
                image t)))
       (dolist (child (dom-non-text-children dom))
@@ -1654,7 +1654,7 @@ The preference is a float determined from 
`shr-prefer-media-type'."
                        (list :width width :height height)))))
         ((or shr-inhibit-images
              (and shr-blocked-images
-                  (string-match shr-blocked-images url)))
+                  (string-match-p shr-blocked-images url)))
          (setq shr-start (point))
           (shr-insert alt))
         ((and (not shr-ignore-cache)
@@ -2463,7 +2463,7 @@ flags that control whether to collect or render objects."
          (max-width 0)
          natural-width)
       (when style
-       (setq style (and (string-match "color" style)
+       (setq style (and (string-search "color" style)
                         (shr-parse-style style))))
       (when bgcolor
        (setq style (nconc (list (cons 'background-color bgcolor))
diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el
index dd30007..1476aa0 100644
--- a/lisp/nxml/rng-cmpct.el
+++ b/lisp/nxml/rng-cmpct.el
@@ -369,7 +369,7 @@ OVERRIDE is either nil, require or t."
     (while (re-search-forward "\\\\x+{\\([[:xdigit:]]+\\)}"
                              (point-max)
                              t)
-      (let* ((ch (decode-char 'ucs (string-to-number (match-string 1) 16))))
+      (let* ((ch (string-to-number (match-string 1) 16)))
        (if (and ch (> ch 0))
            (let ((begin (match-beginning 0))
                  (end (match-end 0)))
diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el
index 6159e00..ecad501 100644
--- a/lisp/nxml/xmltok.el
+++ b/lisp/nxml/xmltok.el
@@ -943,7 +943,6 @@ and VALUE-END, otherwise a STRING giving the value."
        (let ((n (string-to-number (buffer-substring-no-properties start end)
                                base)))
          (cond ((and (integerp n) (xmltok-valid-char-p n))
-                (setq n (xmltok-unicode-to-char n))
                 (and n (string n)))
                (t
                 (xmltok-add-error "Invalid character code" start end)
@@ -971,11 +970,6 @@ and VALUE-END, otherwise a STRING giving the value."
        (t (and (> n #xFFFF)
                (< n #x110000)))))
 
-(defun xmltok-unicode-to-char (n)
-  "Return the character corresponding to Unicode scalar value N.
-Return nil if unsupported in Emacs."
-  (decode-char 'ucs n))
-
 ;;; Prolog parsing
 
 (defvar xmltok-contains-doctype nil)
@@ -1766,6 +1760,10 @@ and `xmltok-namespace-attributes'."
                 xmltok-type))
     (message "Scanned end of file")))
 
+;;; Obsolete
+
+(define-obsolete-function-alias 'xmltok-unicode-to-char #'identity "29.1")
+
 (provide 'xmltok)
 
 ;;; xmltok.el ends here
diff --git a/lisp/nxml/xsd-regexp.el b/lisp/nxml/xsd-regexp.el
index 3c29803..d6eaf7c 100644
--- a/lisp/nxml/xsd-regexp.el
+++ b/lisp/nxml/xsd-regexp.el
@@ -287,7 +287,7 @@ and whose tail is ACCUM."
 (defun xsdre-compile-single-char (ch)
   (if (memq ch '(?. ?* ?+ ?? ?\[ ?\] ?^ ?$ ?\\))
       (string ?\\ ch)
-    (string (decode-char 'ucs ch))))
+    (string ch)))
 
 (defun xsdre-char-class-to-range-list (cc)
   "Return a range-list for a symbolic char-class CC."
@@ -404,10 +404,6 @@ consisting of a single char alternative delimited with []."
                    (cons last chars)
                  (cons last (cons ?- chars))))))
       (setq range-list (cdr range-list)))
-    (setq chars
-         (mapcar (lambda (c)
-                   (decode-char 'ucs c))
-                 chars))
     (when caret
       (setq chars (cons ?^ chars)))
     (when hyphen
diff --git a/lisp/startup.el b/lisp/startup.el
index ab40d02..0065bf8 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1989,8 +1989,9 @@ splash screen in another window."
       (setq-local browse-url-browser-function 'eww-browse-url)
       (setq tab-width 22)
       (setq buffer-read-only t)
+      ;; Place point somewhere it doesn't cover a character.
       (goto-char (point-min))
-      (forward-line 3))))
+      (re-search-forward "\n$" nil nil 2))))
 
 (defun fancy-splash-frame ()
   "Return the frame to use for the fancy splash screen.
diff --git a/lisp/subr.el b/lisp/subr.el
index 78c7283..d224f76 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -61,7 +61,8 @@ must be the first non-whitespace on a line.
 For more information, see Info node `(elisp)Declaring Functions'."
   (declare (advertised-calling-convention
            (fn file &optional arglist fileonly) nil))
-  ;; Does nothing - byte-compile-declare-function does the work.
+  ;; Does nothing - `byte-compile-macroexpand-declare-function' does
+  ;; the work.
   nil)
 
 
diff --git a/lisp/xml.el b/lisp/xml.el
index 0282e37..e2ba02e 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -612,8 +612,8 @@ references."
        (if (setq ref (match-string 2))
            (progn  ; Numeric char reference
              (setq val (save-match-data
-                         (decode-char 'ucs (string-to-number
-                                            ref (if (match-string 1) 16)))))
+                          (string-to-number
+                           ref (if (match-string 1) 16))))
              (and (null val)
                   xml-validating-parser
                   (error "XML: (Validity) Invalid character reference `%s'"
@@ -898,11 +898,11 @@ references and parameter-entity references."
            ref val)
        (cond ((setq ref (match-string 1 string))
               ;; Decimal character reference
-              (setq val (decode-char 'ucs (string-to-number ref)))
+               (setq val (string-to-number ref))
               (if val (push (string val) children)))
              ;; Hexadecimal character reference
              ((setq ref (match-string 2 string))
-              (setq val (decode-char 'ucs (string-to-number ref 16)))
+               (setq val (string-to-number ref 16))
               (if val (push (string val) children)))
              ;; Parameter entity reference
              ((setq ref (match-string 3 string))
@@ -962,7 +962,7 @@ STRING is assumed to occur in an XML attribute value."
        (if ref
            ;; [4.6] Character references are included as
            ;; character data.
-           (let ((val (decode-char 'ucs (string-to-number ref (if is-hex 
16)))))
+            (let ((val (string-to-number ref (if is-hex 16))))
              (push (cond (val (string val))
                          (xml-validating-parser
                           (error "XML: (Validity) Undefined character `x%s'" 
ref))
diff --git a/src/image.c b/src/image.c
index 3ba3d57..f818829 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9101,7 +9101,7 @@ webp_load (struct frame *f, struct image *img)
 {
   ptrdiff_t size = 0;
   uint8_t *contents;
-  Lisp_Object file;
+  Lisp_Object file = Qnil;
 
   /* Open the WebP file.  */
   Lisp_Object specified_file = image_spec_value (img->spec, QCfile, NULL);
@@ -9138,7 +9138,7 @@ webp_load (struct frame *f, struct image *img)
   /* Validate the WebP image header.  */
   if (!WebPGetInfo (contents, size, NULL, NULL))
     {
-      if (NILP (specified_data))
+      if (!NILP (file))
        image_error ("Not a WebP file: `%s'", file);
       else
        image_error ("Invalid header in WebP image data");
@@ -9161,7 +9161,7 @@ webp_load (struct frame *f, struct image *img)
     case VP8_STATUS_USER_ABORT:
     default:
       /* Error out in all other cases.  */
-      if (NILP (specified_data))
+      if (!NILP (file))
        image_error ("Error when interpreting WebP image data: `%s'", file);
       else
        image_error ("Error when interpreting WebP image data");
diff --git a/src/xdisp.c b/src/xdisp.c
index 080c906..971015e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -30294,7 +30294,8 @@ produce_stretch_glyph (struct it *it)
         Compute the width of the characters having this `display'
         property.  */
       struct it it2;
-      Lisp_Object object = it->stack[it->sp - 1].string;
+      Lisp_Object object =
+       it->sp > 0 ? it->stack[it->sp - 1].string : it->string;
       unsigned char *p = (STRINGP (object)
                          ? SDATA (object) + IT_STRING_BYTEPOS (*it)
                          : BYTE_POS_ADDR (IT_BYTEPOS (*it)));
@@ -30396,7 +30397,8 @@ produce_stretch_glyph (struct it *it)
   if (width > 0 && height > 0 && it->glyph_row)
     {
       Lisp_Object o_object = it->object;
-      Lisp_Object object = it->stack[it->sp - 1].string;
+      Lisp_Object object =
+       it->sp > 0 ? it->stack[it->sp - 1].string : it->string;
       int n = width;
 
       if (!STRINGP (object))



reply via email to

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