[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/backports-25.2 18f1ab7 30/46: Have describe-variab
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] scratch/backports-25.2 18f1ab7 30/46: Have describe-variable output multi-line values better |
Date: |
Sun, 2 Oct 2016 14:04:49 +0000 (UTC) |
branch: scratch/backports-25.2
commit 18f1ab7716ac49e0271d162c99ac462786d76d13
Author: Lars Ingebrigtsen <address@hidden>
Commit: Noam Postavsky <address@hidden>
Have describe-variable output multi-line values better
* lisp/help-fns.el (describe-variable): When printing
multi-line expressions, display them prettier (bug#10723).
(cherry picked from commit d160f530328fa2872296485b92602435921bd4fd)
---
lisp/help-fns.el | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 26d8839..e701510 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -760,9 +760,8 @@ it is displayed along with the global value."
(unless valvoid
(with-current-buffer standard-output
(setq val-start-pos (point))
- (princ "value is ")
- (let ((from (point))
- (line-beg (line-beginning-position))
+ (princ "value is")
+ (let ((line-beg (line-beginning-position))
(print-rep
(let ((rep
(let ((print-quoted t))
@@ -771,17 +770,17 @@ it is displayed along with the global value."
(format-message "`%s'" rep)
rep))))
(if (< (+ (length print-rep) (point) (- line-beg)) 68)
- (insert print-rep)
+ (insert " " print-rep)
(terpri)
(pp val)
- (if (< (point) (+ 68 (line-beginning-position 0)))
- (delete-region from (1+ from))
- (delete-region (1- from) from)))
+ ;; Remove trailing newline.
+ (delete-char -1))
(let* ((sv (get variable 'standard-value))
(origval (and (consp sv)
(condition-case nil
(eval (car sv))
- (error :help-eval-error)))))
+ (error :help-eval-error))))
+ from)
(when (and (consp sv)
(not (equal origval val))
(not (equal origval :help-eval-error)))
- [Emacs-diffs] scratch/backports-25.2 a33eb50 03/46: Let url use default file modes when copying files, (continued)
- [Emacs-diffs] scratch/backports-25.2 a33eb50 03/46: Let url use default file modes when copying files, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 30376cc 22/46: Allow _ characters in SQL prompts, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 145e369 05/46: Make the nsm query say what it did after the user interaction, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 e1e768e 01/46: Default web pages to right-to-left, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 b16e6c3 09/46: Require that the buffer that we're trying to patch exist, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 e2e25ae 20/46: Make <div> in <li> not insert extra newlines, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 77c3f7f 24/46: Make `q' etc work in image mode again, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 d7de0c4 25/46: smtpmail would say it's done before it is, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 f65b1a3 27/46: Don't consider colons to be paragraphs starting chars in strings, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 d95942f 29/46: Clean up custom-buffer-create code slightly, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 18f1ab7 30/46: Have describe-variable output multi-line values better,
Noam Postavsky <=
- [Emacs-diffs] scratch/backports-25.2 f24a305 26/46: Make `undo' of `C-x r t' put point where it should be, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 33b69a1 37/46: Warning fix in jit-lock-mode, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 8fd0223 06/46: Make mail-extract-address-components return the user name more, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 7826f1f 32/46: Make ibuffer not break on newline-embedded buffer names, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 4af6945 39/46: Add `size-indication-mode' to the menu on `mouse-1' "Top", Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 5afea13 33/46: Rename "Directory Search" menu to "Servers", Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 d6f5232 34/46: Remove ": ?" from the read-face-name prompt, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 3713acd 36/46: Cancel the eldoc timer when switching off eldoc mode, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 90262cc 40/46: Allow `global-set-key' to bind keys under the `M-o' map, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 c9443ca 38/46: Make describe-variable look up the variable in the current buffer, Noam Postavsky, 2016/10/02