Subject: Shortdoc "string" group leads to backtrace

From: Stefan Kangas <[email-masked]>
Date: Sun, 2 Jan 2022 18:09:37 -0500

On master, emacs -Q:

    M-x shortdoc-display-group RET string RET

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  split-string(nil "\n")
  shortdoc--display-function((truncate-string-to-width :eval
(truncate-string-to-width "foobar" 3) :eval (truncate-string-to-width
"你好bar" 5)))
  #f(compiled-function (data) #<bytecode
0x16a14e336dff84a8>)((truncate-string-to-width :eval
(truncate-string-to-width "foobar" 3) :eval (truncate-string-to-width
"你好bar" 5)))
  mapc(#f(compiled-function (data) #<bytecode 0x16a14e336dff84a8>)
("Making Strings" (make-string :args (length init) :eval "(make-string
5 ?x)") (string :eval "(string ?a ?b ?c)") (concat :eval (concat "foo"
"bar" "zot")) (string-join :no-manual t :eval (string-join '("foo"
"bar" "zot") " ")) (mapconcat :eval (mapconcat (lambda (a) (concat "["
a "]")) '("foo" "bar" "zot") " ")) (string-pad :eval (string-pad "foo"
5) :eval (string-pad "foobar" 5) :eval (string-pad "foo" 5 45 t))
(mapcar :eval (mapcar #'identity "123")) (format :eval (format "This
number is %d" 4)) "Manipulating Strings" (substring :eval (substring
"foobar" 0 3) :eval (substring "foobar" 3)) (string-limit :eval
(string-limit "foobar" 3) :eval (string-limit "foobar" 3 t) :eval
(string-limit "foobar" 10) :eval (string-limit "fo好" 3 nil 'utf-8))
(truncate-string-to-width :eval (truncate-string-to-width "foobar" 3)
:eval (truncate-string-to-width "你好bar" 5)) (split-string :eval
(split-string "foo bar") :eval (split-string "|foo|bar|" "|") :eval
(split-string "|foo|bar|" "|" t)) (split-string-and-unquote :eval
(split-string-and-unquote "foo \"bar zot\""))
(split-string-shell-command :eval (split-string-shell-command "ls
/tmp/'foo bar'")) (string-lines :eval (string-lines "foo\n\nbar")
:eval (string-lines "foo\n\nbar" t)) (string-replace :eval
(string-replace "foo" "bar" "foozot")) (replace-regexp-in-string :eval
(replace-regexp-in-string "[a-z]+" "_" "*foo*")) (string-trim :args
(string) :doc "Trim STRING of leading and trailing white space." :eval
(string-trim " foo ")) (string-trim-left :eval (string-trim-left
"oofoo" "o+")) (string-trim-right :eval (string-trim-right "barkss"
"s+")) (string-truncate-left :no-manual t :eval (string-truncate-left
"longstring" 8)) (string-remove-suffix :no-manual t :eval
(string-remove-suffix "bar" "foobar")) (string-remove-prefix
:no-manual t :eval (string-remove-prefix "foo" "foobar"))
(string-chop-newline :eval (string-chop-newline "foo\n"))
(string-clean-whitespace :eval (string-clean-whitespace " foo   bar
")) (string-fill :eval (string-fill "Three short words" 12) :eval
(string-fill "Long-word" 3)) (reverse :eval (reverse "foo"))
(substring-no-properties :eval (substring-no-properties (propertize
"foobar" 'face 'bold) 0 3)) (try-completion :eval (try-completion
"foo" '("foobar" "foozot" "gazonk"))) "Unicode Strings"
(string-glyph-split :eval (string-glyph-split "Hello,
👼🏻🧑🏼‍🤝‍🧑🏻")) (string-glyph-compose :eval (string-glyph-compose
"Å")) (string-glyph-decompose :eval (string-glyph-decompose "Å"))
"Predicates for Strings" (string-equal :eval (string-equal "foo"
"foo")) (eq :eval (eq "foo" "foo")) (eql :eval (eql "foo" "foo"))
(equal :eval (equal "foo" "foo")) (cl-equalp :eval (cl-equalp "Foo"
"foo")) (stringp :eval "(stringp ?a)") (string-empty-p :no-manual t
:eval (string-empty-p "")) (string-blank-p :no-manual t :eval
(string-blank-p " \n")) (string-lessp :eval (string-lessp "foo"
"bar")) (string-greaterp :eval (string-greaterp "foo" "bar"))
(string-version-lessp :eval (string-version-lessp "pic4.png"
"pic32.png")) (string-prefix-p :eval (string-prefix-p "foo" "foobar"))
(string-suffix-p :eval (string-suffix-p "bar" "foobar")) "Case
Manipulation" ...))
  shortdoc-display-group("string")
  funcall-interactively(shortdoc-display-group "string")
  command-execute(shortdoc-display-group record)
  execute-extended-command(nil "shortdoc-display-group" "short")
  funcall-interactively(execute-extended-command nil
"shortdoc-display-group" "short")
  command-execute(execute-extended-command)