From: Lars Ingebrigtsen Date: Tue, 21 Jun 2022 16:45:20 +0000 (+0200) Subject: Untabify doc strings before displaying in Customize X-Git-Tag: emacs-29.0.90~1447^2~1556 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1883e532d1aabbf3bb4085824f777382dc190d9c;p=emacs.git Untabify doc strings before displaying in Customize * lisp/cus-edit.el (custom-variable-documentation): Untabify the doc string since we'll be indenting it when displaying it (which makes the tabs not align properly). --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 6dff9ec97a2..1f496af7d57 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2583,7 +2583,13 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"." Normally just return the docstring. But if VARIABLE automatically becomes buffer local when set, append a message to that effect. Also append any obsolescence information." - (format "%s%s%s" (documentation-property variable 'variable-documentation t) + (format "%s%s%s" + (with-temp-buffer + (insert + (or (documentation-property variable 'variable-documentation t) + "")) + (untabify (point-min) (point-max)) + (buffer-string)) (if (and (local-variable-if-set-p variable) (or (not (local-variable-p variable)) (with-temp-buffer