From 1883e532d1aabbf3bb4085824f777382dc190d9c Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 21 Jun 2022 18:45:20 +0200 Subject: [PATCH] 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). --- lisp/cus-edit.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- 2.39.2