From: Glenn Morris Date: Fri, 31 Jan 2014 06:20:29 +0000 (-0800) Subject: Some doc related to register-preview X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~221 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da942af18c046bcb8c3009a50667a79ba1fb18f3;p=emacs.git Some doc related to register-preview * lisp/register.el (register-preview-delay, register-read-with-preview): Doc fixes. * etc/NEWS: Related edits. --- diff --git a/etc/NEWS b/etc/NEWS index 5bbe34a573a..2c7d42a26b8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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 diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d8e83278d07..0c14a4021a1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2014-01-31 Glenn Morris + * 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): diff --git a/lisp/register.el b/lisp/register.el index f3c18a86fb5..798ea0615d1 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -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