]> git.eshelyaron.com Git - emacs.git/commitdiff
Further tweak describe-variable look
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 8 Sep 2021 08:28:15 +0000 (10:28 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 8 Sep 2021 08:28:19 +0000 (10:28 +0200)
* lisp/help-fns.el (describe-variable): Tweak how long variable
values are shown.

lisp/help-fns.el

index 3f1b56c888d1bccd49af1eb3526af3081ecd2381..a7219ede944527a6a1097f30f08eff09464eb59a 100644 (file)
@@ -1222,7 +1222,14 @@ it is displayed along with the global value."
               ;; Output the indented administrative bits.
               (with-current-buffer buffer
                 (help-fns--run-describe-functions
-                 help-fns-describe-variable-functions variable)))
+                 help-fns-describe-variable-functions variable))
+
+              (with-current-buffer standard-output
+                ;; If we have the long value of the variable at the
+                ;; end, remove superfluous empty lines before it.
+                (unless (eobp)
+                  (while (looking-at-p "\n")
+                    (delete-char 1)))))
 
            (with-current-buffer standard-output
              ;; Return the text we displayed.