Commit da942af1 authored by Glenn Morris's avatar Glenn Morris

Some doc related to register-preview

* lisp/register.el (register-preview-delay, register-read-with-preview):
Doc fixes.

* etc/NEWS: Related edits.
parent f2726fa2
......@@ -301,7 +301,9 @@ bidirectional context.
** Register changes
*** All register commands can now show help with preview.
*** All interactive commands that read a register (`copy-to-register', etc.)
now display a temporary window after `register-preview-delay' seconds
that summarizes existing registers. To disable this, set that option to nil.
+++
*** New command `C-x C-k x' (`kmacro-to-register') stores keyboard
......
2014-01-31 Glenn Morris <rgm@gnu.org>
* register.el (register-preview-delay, register-read-with-preview):
Doc fixes.
* mail/reporter.el (reporter-dump-variable): In case of void-variable,
do not mess with mail-buffer position (fixes 2009-11-03 change).
* progmodes/cc-mode.el (c-submit-bug-report):
......
......@@ -90,9 +90,11 @@ text."
(character :tag "Use register" :value ?+)))
(defcustom register-preview-delay 1
"If non-nil delay in seconds to pop up the preview window."
"If non-nil, time to wait in seconds before popping up a preview window.
If nil, do not show register previews, unless `help-char' (or a member of
`help-event-list') is pressed."
:version "24.4"
:type '(choice number (const :tag "Indefinitely" nil))
:type '(choice number (const :tag "No preview unless requested" nil))
:group 'register)
(defun get-register (register)
......@@ -140,10 +142,11 @@ If SHOW-EMPTY is non-nil show the window even if no registers."
register-alist)))))
(defun register-read-with-preview (prompt)
"Read an event with register preview using PROMPT.
Pop up a register preview window if the input is a help char but
is not a register. Alternatively if `register-preview-delay' is a
number the preview window is popped up after some delay."
"Read and return an event, prompting with PROMPT, possibly showing a preview.
If `register-alist' and `register-preview-delay' are both non-nil,
display a window listing registers after `register-preview-delay' seconds.
If `help-char' (or a member of `help-event-list') is pressed, display
such a window regardless."
(let* ((buffer "*Register Preview*")
(timer (when (numberp register-preview-delay)
(run-with-timer register-preview-delay nil
......
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