[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 2c7719ae67 2/2: Fix displaying edit variable buffer
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 2c7719ae67 2/2: Fix displaying edit variable buffer |
Date: |
Mon, 5 Jun 2023 16:00:45 -0400 (EDT) |
branch: elpa/helm
commit 2c7719ae67ba4df3ed8b4221189ad70863cfe4a6
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix displaying edit variable buffer
---
helm-lib.el | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/helm-lib.el b/helm-lib.el
index 1b1f7f1e88..2f96dd65e5 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -1325,16 +1325,16 @@ Special commands:
(defvar helm-pretty-print-current-symbol nil)
(defun helm-edit-variable (var)
(let* ((sym (intern-soft var))
- (val (symbol-value sym)))
- (prog1
- (pp-display-expression val helm-pretty-print-buffer-name)
- (with-current-buffer helm-pretty-print-buffer-name
- (erase-buffer)
- (helm-edit-variable-mode)
- (goto-char (point-min))
- (insert (format ";;; Edit variable `%s' and hit C-c C-c when done\n"
sym)
- ";;; Abort with C-c C-k\n\n")
- (set (make-local-variable 'helm-pretty-print-current-symbol) sym)))))
+ (val (symbol-value sym))
+ (pp (pp-to-string val)))
+ (with-current-buffer (get-buffer-create helm-pretty-print-buffer-name)
+ (erase-buffer)
+ (helm-edit-variable-mode)
+ (insert (format ";;; Edit variable `%s' and hit C-c C-c when done\n" sym)
+ ";;; Abort with C-c C-k\n\n")
+ (set (make-local-variable 'helm-pretty-print-current-symbol) sym)
+ (save-excursion (insert pp)))
+ (display-buffer helm-pretty-print-buffer-name)))
(defun helm-set-variable-from-pp-buffer ()
(interactive)