[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 80b53a3: Make register-preview ignore empty registe
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 80b53a3: Make register-preview ignore empty registers |
Date: |
Fri, 20 Sep 2019 18:19:16 -0400 (EDT) |
branch: master
commit 80b53a3b8dcc28d18ac9a7adacf377ebe6d23ffe
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Make register-preview ignore empty registers
* lisp/register.el (register-preview): Ignore elements that are
empty (bug#37155).
---
lisp/register.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/register.el b/lisp/register.el
index 775e1a2..b4d9d0d 100644
--- a/lisp/register.el
+++ b/lisp/register.el
@@ -139,7 +139,10 @@ Format of each entry is controlled by the variable
`register-preview-function'."
nil
(with-current-buffer standard-output
(setq cursor-in-non-selected-windows nil)
- (insert (mapconcat register-preview-function register-alist ""))))))
+ (mapc (lambda (elem)
+ (when (get-register (car elem))
+ (insert (funcall register-preview-function elem))))
+ register-alist)))))
(defun register-read-with-preview (prompt)
"Read and return a register name, possibly showing existing registers.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 80b53a3: Make register-preview ignore empty registers,
Lars Ingebrigtsen <=