]> git.eshelyaron.com Git - emacs.git/commitdiff
Untabify doc strings before displaying in Customize
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 21 Jun 2022 16:45:20 +0000 (18:45 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 21 Jun 2022 17:08:25 +0000 (19:08 +0200)
* 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

index 6dff9ec97a2aa866b7f1135441d99107fd19a9a1..1f496af7d57c44a4ac674c9a78d04121be533951 100644 (file)
@@ -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