Commit 80b53a3b authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Make register-preview ignore empty registers

* lisp/register.el (register-preview): Ignore elements that are
empty (bug#37155).
parent 7c3ef77c
Pipeline #3224 failed with stage
in 90 minutes and 2 seconds
......@@ -139,7 +139,10 @@ Format of each entry is controlled by the variable `register-preview-function'."
(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))))
(defun register-read-with-preview (prompt)
"Read and return a register name, possibly showing existing registers.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment