aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2013-05-04 15:27:41 -0400
committerStefan Monnier2013-05-04 15:27:41 -0400
commit30c7e54299fc81cd3122a17ef130ab69e9855f99 (patch)
tree6345c56bd5113e9c28923cc849b6370a47ccc499 /src
parent5bebd1866b19bba82bc8c030ab828a608e301be5 (diff)
downloademacs-30c7e54299fc81cd3122a17ef130ab69e9855f99.tar.gz
emacs-30c7e54299fc81cd3122a17ef130ab69e9855f99.zip
* lisp/simple.el (read-expression-map): Use completion-at-point.
Move the declaration from C. (read-minibuffer, eval-minibuffer): Move from C. (completion-setup-function): Avoid minibuffer-completion-contents. * src/minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp. (syms_of_minibuf): Adjust accodingly. * src/lread.c (Fread): * src/callint.c (Fcall_interactively): Adjust calls accordingly. Fixes: debbugs:14255
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog11
-rw-r--r--src/callint.c4
-rw-r--r--src/lread.c4
-rw-r--r--src/minibuf.c34
4 files changed, 14 insertions, 39 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 325babb4d86..86327fc7fb2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,8 +1,15 @@
12013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
4 (syms_of_minibuf): Adjust accodingly.
5 * lread.c (Fread):
6 * callint.c (Fcall_interactively): Adjust calls accordingly.
7
12013-05-04 Eli Zaretskii <eliz@gnu.org> 82013-05-04 Eli Zaretskii <eliz@gnu.org>
2 9
3 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that 10 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
4 w->contents is a buffer before computing everything else. Use 11 w->contents is a buffer before computing everything else.
5 parentheses to disambiguate last part of the condition. 12 Use parentheses to disambiguate last part of the condition.
6 13
7 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap 14 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
8 assertion violations. (Bug#14062) 15 assertion violations. (Bug#14062)
diff --git a/src/callint.c b/src/callint.c
index 940ff3ed249..389f9410625 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -733,12 +733,12 @@ invoke it. If KEYS is omitted or nil, the return value of
733 break; 733 break;
734 734
735 case 'x': /* Lisp expression read but not evaluated. */ 735 case 'x': /* Lisp expression read but not evaluated. */
736 args[i] = Fread_minibuffer (callint_message, Qnil); 736 args[i] = call1 (intern ("read-minibuffer"), callint_message);
737 visargs[i] = last_minibuf_string; 737 visargs[i] = last_minibuf_string;
738 break; 738 break;
739 739
740 case 'X': /* Lisp expression read and evaluated. */ 740 case 'X': /* Lisp expression read and evaluated. */
741 args[i] = Feval_minibuffer (callint_message, Qnil); 741 args[i] = call1 (intern ("eval-minibuffer"), callint_message);
742 visargs[i] = last_minibuf_string; 742 visargs[i] = last_minibuf_string;
743 break; 743 break;
744 744
diff --git a/src/lread.c b/src/lread.c
index 8e623e838c7..1a8a57e57a7 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1976,7 +1976,9 @@ STREAM or the value of `standard-input' may be:
1976 if (EQ (stream, Qt)) 1976 if (EQ (stream, Qt))
1977 stream = Qread_char; 1977 stream = Qread_char;
1978 if (EQ (stream, Qread_char)) 1978 if (EQ (stream, Qread_char))
1979 return Fread_minibuffer (build_string ("Lisp expression: "), Qnil); 1979 /* FIXME: ¿¡ When is this used !? */
1980 return call1 (intern ("read-minibuffer"),
1981 build_string ("Lisp expression: "));
1980 1982
1981 return read_internal_start (stream, Qnil, Qnil); 1983 return read_internal_start (stream, Qnil, Qnil);
1982} 1984}
diff --git a/src/minibuf.c b/src/minibuf.c
index b96d27e0742..b69a16eff42 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -986,34 +986,6 @@ and some related functions, which use zero-indexing for POSITION. */)
986 return val; 986 return val;
987} 987}
988 988
989DEFUN ("read-minibuffer", Fread_minibuffer, Sread_minibuffer, 1, 2, 0,
990 doc: /* Return a Lisp object read using the minibuffer, unevaluated.
991Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS
992is a string to insert in the minibuffer before reading.
993\(INITIAL-CONTENTS can also be a cons of a string and an integer.
994Such arguments are used as in `read-from-minibuffer'.) */)
995 (Lisp_Object prompt, Lisp_Object initial_contents)
996{
997 CHECK_STRING (prompt);
998 return read_minibuf (Vminibuffer_local_map, initial_contents,
999 prompt, 1, Qminibuffer_history,
1000 make_number (0), Qnil, 0, 0);
1001}
1002
1003DEFUN ("eval-minibuffer", Feval_minibuffer, Seval_minibuffer, 1, 2, 0,
1004 doc: /* Return value of Lisp expression read using the minibuffer.
1005Prompt with PROMPT. If non-nil, optional second arg INITIAL-CONTENTS
1006is a string to insert in the minibuffer before reading.
1007\(INITIAL-CONTENTS can also be a cons of a string and an integer.
1008Such arguments are used as in `read-from-minibuffer'.) */)
1009 (Lisp_Object prompt, Lisp_Object initial_contents)
1010{
1011 return Feval (read_minibuf (Vread_expression_map, initial_contents,
1012 prompt, 1, Qread_expression_history,
1013 make_number (0), Qnil, 0, 0),
1014 Qnil);
1015}
1016
1017/* Functions that use the minibuffer to read various things. */ 989/* Functions that use the minibuffer to read various things. */
1018 990
1019DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, 991DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0,
@@ -2137,15 +2109,9 @@ properties. */);
2137 Vminibuffer_prompt_properties 2109 Vminibuffer_prompt_properties
2138 = Fcons (intern_c_string ("read-only"), Fcons (Qt, Qnil)); 2110 = Fcons (intern_c_string ("read-only"), Fcons (Qt, Qnil));
2139 2111
2140 DEFVAR_LISP ("read-expression-map", Vread_expression_map,
2141 doc: /* Minibuffer keymap used for reading Lisp expressions. */);
2142 Vread_expression_map = Qnil;
2143
2144 defsubr (&Sactive_minibuffer_window); 2112 defsubr (&Sactive_minibuffer_window);
2145 defsubr (&Sset_minibuffer_window); 2113 defsubr (&Sset_minibuffer_window);
2146 defsubr (&Sread_from_minibuffer); 2114 defsubr (&Sread_from_minibuffer);
2147 defsubr (&Seval_minibuffer);
2148 defsubr (&Sread_minibuffer);
2149 defsubr (&Sread_string); 2115 defsubr (&Sread_string);
2150 defsubr (&Sread_command); 2116 defsubr (&Sread_command);
2151 defsubr (&Sread_variable); 2117 defsubr (&Sread_variable);