mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-16 17:19:41 +00:00
* src/callint.c (Fcall_interactively): Call `Qread_number' for
interactive code letter `n' instead of using duplicate code. * lisp/subr.el (read-number): Doc fix about using it by interactive code letter `n'. Fixes: debbugs:14254
This commit is contained in:
parent
5db9dace2d
commit
0208ede7ab
@ -1,3 +1,8 @@
|
||||
2013-04-27 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* subr.el (read-number): Doc fix about using it by interactive
|
||||
code letter `n'. (Bug#14254)
|
||||
|
||||
2013-04-27 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* desktop.el (desktop-auto-save-timeout): New option.
|
||||
|
@ -2200,11 +2200,11 @@ by doing (clear-string STRING)."
|
||||
;; And of course, don't keep the sensitive data around.
|
||||
(erase-buffer))))))))
|
||||
|
||||
;; This should be used by `call-interactively' for `n' specs.
|
||||
(defun read-number (prompt &optional default)
|
||||
"Read a numeric value in the minibuffer, prompting with PROMPT.
|
||||
DEFAULT specifies a default value to return if the user just types RET.
|
||||
The value of DEFAULT is inserted into PROMPT."
|
||||
The value of DEFAULT is inserted into PROMPT.
|
||||
This function is used by the `interactive' code letter `n'."
|
||||
(let ((n nil)
|
||||
(default1 (if (consp default) (car default) default)))
|
||||
(when default1
|
||||
|
@ -1,3 +1,9 @@
|
||||
2013-04-27 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* callint.c (Fcall_interactively): Call `Qread_number' for
|
||||
interactive code letter `n' instead of using duplicate code.
|
||||
(Bug#14254)
|
||||
|
||||
2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* systime.h (make_timeval): Declare as 'const'.
|
||||
|
@ -34,6 +34,7 @@ static Lisp_Object Qcommand_debug_status;
|
||||
static Lisp_Object Qenable_recursive_minibuffers;
|
||||
|
||||
static Lisp_Object Qhandle_shift_selection;
|
||||
static Lisp_Object Qread_number;
|
||||
|
||||
Lisp_Object Qmouse_leave_buffer_hook;
|
||||
|
||||
@ -683,29 +684,7 @@ invoke it. If KEYS is omitted or nil, the return value of
|
||||
if (!NILP (prefix_arg))
|
||||
goto have_prefix_arg;
|
||||
case 'n': /* Read number from minibuffer. */
|
||||
{
|
||||
bool first = 1;
|
||||
do
|
||||
{
|
||||
Lisp_Object str;
|
||||
if (! first)
|
||||
{
|
||||
message1 ("Please enter a number.");
|
||||
sit_for (make_number (1), 0, 0);
|
||||
}
|
||||
first = 0;
|
||||
|
||||
str = Fread_from_minibuffer (callint_message,
|
||||
Qnil, Qnil, Qnil, Qnil, Qnil,
|
||||
Qnil);
|
||||
if (! STRINGP (str) || SCHARS (str) == 0)
|
||||
args[i] = Qnil;
|
||||
else
|
||||
args[i] = Fread (str);
|
||||
}
|
||||
while (! NUMBERP (args[i]));
|
||||
}
|
||||
visargs[i] = args[i];
|
||||
args[i] = call1 (Qread_number, callint_message);
|
||||
break;
|
||||
|
||||
case 'P': /* Prefix arg in raw form. Does no I/O. */
|
||||
@ -903,6 +882,7 @@ syms_of_callint (void)
|
||||
DEFSYM (Qminus, "-");
|
||||
DEFSYM (Qplus, "+");
|
||||
DEFSYM (Qhandle_shift_selection, "handle-shift-selection");
|
||||
DEFSYM (Qread_number, "read-number");
|
||||
DEFSYM (Qcall_interactively, "call-interactively");
|
||||
DEFSYM (Qcommand_debug_status, "command-debug-status");
|
||||
DEFSYM (Qenable_recursive_minibuffers, "enable-recursive-minibuffers");
|
||||
|
Loading…
Reference in New Issue
Block a user