Make C-u M-x apropos-user-option include buttons

* lisp/apropos.el (apropos-user-option): Include buttons in the
output always (bug#55376).
(apropos-print-doc): Don't insert three spaces in the
non-apropos-multi-type case.
This commit is contained in:
Lars Ingebrigtsen 2022-05-12 01:48:40 +02:00
parent ed0b589480
commit dce85743b6

View file

@ -518,7 +518,7 @@ variables, not just user options."
(if (or current-prefix-arg apropos-do-all)
"variable" "user option"))
current-prefix-arg))
(apropos-command pattern nil
(apropos-command pattern (or do-all apropos-do-all)
(if (or do-all apropos-do-all)
(lambda (symbol)
(and (boundp symbol)
@ -1275,12 +1275,13 @@ as a heading."
(let ((doc (nth i apropos-item)))
(when (stringp doc)
(if apropos-compact-layout
(insert (propertize "\t" 'display '(space :align-to 32)) " ")
(insert " "))
(insert (propertize "\t" 'display '(space :align-to 32)))
(insert " "))
(if apropos-multi-type
(let ((button-face (button-type-get type 'face)))
(unless (consp button-face)
(setq button-face (list button-face)))
(insert " ")
(insert-text-button
(if apropos-compact-layout
(format "<%s>" (button-type-get type 'apropos-short-label))