aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-05-30 22:15:34 -0700
committerPaul Eggert2011-05-30 22:15:34 -0700
commit333d54dade1e7005d5a97612907158fe5ec3d310 (patch)
treea5b18c9c6a68d71fddae98aba0d81079068a8c46 /src
parent90856fe0b82ba19d1c3d73a4ba48007380201e66 (diff)
parent620c53a664e41788f6d4f8e3f687e1a0d448b857 (diff)
downloademacs-333d54dade1e7005d5a97612907158fe5ec3d310.tar.gz
emacs-333d54dade1e7005d5a97612907158fe5ec3d310.zip
Merge from trunk.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog38
-rw-r--r--src/alloc.c4
-rw-r--r--src/ccl.c13
-rw-r--r--src/data.c269
-rw-r--r--src/eval.c2
-rw-r--r--src/lisp.h2
-rw-r--r--src/minibuf.c83
7 files changed, 165 insertions, 246 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index bada9f108f7..880cafc05a4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,7 @@
12011-05-30 Paul Eggert <eggert@cs.ucla.edu> 12011-05-31 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Use 'inline', not 'INLINE'. 3 Use 'inline', not 'INLINE'.
4 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
4 * alloc.c, fontset.c (INLINE): Remove. 5 * alloc.c, fontset.c (INLINE): Remove.
5 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c: 6 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
6 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c: 7 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
@@ -8,6 +9,29 @@
8 * gmalloc.c (register_heapinfo): Use inline unconditionally. 9 * gmalloc.c (register_heapinfo): Use inline unconditionally.
9 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__. 10 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
10 11
122011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
13
14 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
15 (read_minibuf): Use get_minibuffer.
16 (syms_of_minibuf): Use DEFSYM.
17 (Qmetadata): New var.
18 * data.c (Qbuffer): Don't make it static.
19 (syms_of_data): Use DEFSYM.
20
212011-05-31 Paul Eggert <eggert@cs.ucla.edu>
22
23 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
24 (CCL_CODE_MIN): New macro.
25
262011-05-30 Paul Eggert <eggert@cs.ucla.edu>
27
28 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
29
30 * eval.c (Qdebug): Now static.
31 * lisp.h (Qdebug): Remove decl. This reverts a part of the
32 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
33 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
34
112011-05-29 Chong Yidong <cyd@stupidchicken.com> 352011-05-29 Chong Yidong <cyd@stupidchicken.com>
12 36
13 * image.c: Various fixes to ImageMagick code comments. 37 * image.c: Various fixes to ImageMagick code comments.
@@ -160,8 +184,8 @@
160 (symbol_to_x_atom): Remove gratuitous arg. 184 (symbol_to_x_atom): Remove gratuitous arg.
161 (x_handle_selection_request, lisp_data_to_selection_data) 185 (x_handle_selection_request, lisp_data_to_selection_data)
162 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed. 186 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
163 (x_own_selection, x_get_local_selection, x_convert_selection): New 187 (x_own_selection, x_get_local_selection, x_convert_selection):
164 arg, specifying work frame. Use terminal-local Vselection_alist. 188 New arg, specifying work frame. Use terminal-local Vselection_alist.
165 (some_frame_on_display): Delete unused function. 189 (some_frame_on_display): Delete unused function.
166 (Fx_own_selection_internal, Fx_get_selection_internal) 190 (Fx_own_selection_internal, Fx_get_selection_internal)
167 (Fx_disown_selection_internal, Fx_selection_owner_p) 191 (Fx_disown_selection_internal, Fx_selection_owner_p)
@@ -182,8 +206,8 @@
182 (x_selection_request_lisp_error): Free the above. 206 (x_selection_request_lisp_error): Free the above.
183 (x_get_local_selection): Remove unnecessary code. 207 (x_get_local_selection): Remove unnecessary code.
184 (x_reply_selection_request): Args changed; handle arbitrary array 208 (x_reply_selection_request): Args changed; handle arbitrary array
185 of converted selections stored in converted_selections. Separate 209 of converted selections stored in converted_selections.
186 the XChangeProperty and SelectionNotify steps. 210 Separate the XChangeProperty and SelectionNotify steps.
187 (x_handle_selection_request): Rewrite to handle MULTIPLE target. 211 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
188 (x_convert_selection): New function. 212 (x_convert_selection): New function.
189 (x_handle_selection_event): Simplify. 213 (x_handle_selection_event): Simplify.
@@ -347,8 +371,8 @@
347 371
348 Be more systematic about user-interface timestamps. 372 Be more systematic about user-interface timestamps.
349 Before, the code sometimes used 'Time', sometimes 'unsigned long', 373 Before, the code sometimes used 'Time', sometimes 'unsigned long',
350 and sometimes 'EMACS_UINT', to represent these timestamps. This 374 and sometimes 'EMACS_UINT', to represent these timestamps.
351 change causes it to use 'Time' uniformly, as that's what X uses. 375 This change causes it to use 'Time' uniformly, as that's what X uses.
352 This makes the code easier to follow, and makes it easier to catch 376 This makes the code easier to follow, and makes it easier to catch
353 integer overflow bugs such as Bug#8664. 377 integer overflow bugs such as Bug#8664.
354 * frame.c (Fmouse_position, Fmouse_pixel_position): 378 * frame.c (Fmouse_position, Fmouse_pixel_position):
diff --git a/src/alloc.c b/src/alloc.c
index f62ae125408..e627af6c071 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -989,13 +989,11 @@ lisp_align_malloc (size_t nbytes, enum mem_type type)
989 free_ablock = free_ablock->x.next_free; 989 free_ablock = free_ablock->x.next_free;
990 990
991#if GC_MARK_STACK && !defined GC_MALLOC_CHECK 991#if GC_MARK_STACK && !defined GC_MALLOC_CHECK
992 if (val && type != MEM_TYPE_NON_LISP) 992 if (type != MEM_TYPE_NON_LISP)
993 mem_insert (val, (char *) val + nbytes, type); 993 mem_insert (val, (char *) val + nbytes, type);
994#endif 994#endif
995 995
996 MALLOC_UNBLOCK_INPUT; 996 MALLOC_UNBLOCK_INPUT;
997 if (!val && nbytes)
998 memory_full ();
999 997
1000 eassert (0 == ((uintptr_t) val) % BLOCK_ALIGN); 998 eassert (0 == ((uintptr_t) val) % BLOCK_ALIGN);
1001 return val; 999 return val;
diff --git a/src/ccl.c b/src/ccl.c
index 630c6b3de9e..a58ad90beaf 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -79,9 +79,8 @@ static Lisp_Object Vccl_program_table;
79#define CCL_HEADER_EOF 1 79#define CCL_HEADER_EOF 1
80#define CCL_HEADER_MAIN 2 80#define CCL_HEADER_MAIN 2
81 81
82/* CCL code is a sequence of 28-bit non-negative integers (i.e. the 82/* CCL code is a sequence of 28-bit integers. Each contains a CCL
83 MSB is always 0), each contains CCL command and/or arguments in the 83 command and/or arguments in the following format:
84 following format:
85 84
86 |----------------- integer (28-bit) ------------------| 85 |----------------- integer (28-bit) ------------------|
87 |------- 17-bit ------|- 3-bit --|- 3-bit --|- 5-bit -| 86 |------- 17-bit ------|- 3-bit --|- 3-bit --|- 5-bit -|
@@ -94,12 +93,14 @@ static Lisp_Object Vccl_program_table;
94 |------------- constant or other args ----------------| 93 |------------- constant or other args ----------------|
95 cccccccccccccccccccccccccccc 94 cccccccccccccccccccccccccccc
96 95
97 where, `cc...c' is a non-negative integer indicating constant value 96 where `cc...c' is an integer indicating a constant value or an
98 (the left most `c' is always 0) or an absolute jump address, `RRR' 97 absolute jump address. The context determines whether `cc...c' is
98 considered to be unsigned, or a signed two's complement number. `RRR'
99 and `rrr' are CCL register number, `XXXXX' is one of the following 99 and `rrr' are CCL register number, `XXXXX' is one of the following
100 CCL commands. */ 100 CCL commands. */
101 101
102#define CCL_CODE_MAX ((1 << (28 - 1)) - 1) 102#define CCL_CODE_MAX ((1 << (28 - 1)) - 1)
103#define CCL_CODE_MIN (-1 - CCL_CODE_MAX)
103 104
104/* CCL commands 105/* CCL commands
105 106
@@ -756,7 +757,7 @@ while(0)
756 while (0) 757 while (0)
757 758
758#define GET_CCL_CODE(code, ccl_prog, ic) \ 759#define GET_CCL_CODE(code, ccl_prog, ic) \
759 GET_CCL_RANGE (code, ccl_prog, ic, 0, CCL_CODE_MAX) 760 GET_CCL_RANGE (code, ccl_prog, ic, CCL_CODE_MIN, CCL_CODE_MAX)
760 761
761#define GET_CCL_INT(var, ccl_prog, ic) \ 762#define GET_CCL_INT(var, ccl_prog, ic) \
762 GET_CCL_RANGE (var, ccl_prog, ic, INT_MIN, INT_MAX) 763 GET_CCL_RANGE (var, ccl_prog, ic, INT_MIN, INT_MAX)
diff --git a/src/data.c b/src/data.c
index a26627875ab..443d78376d9 100644
--- a/src/data.c
+++ b/src/data.c
@@ -32,14 +32,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
32#include "keyboard.h" 32#include "keyboard.h"
33#include "frame.h" 33#include "frame.h"
34#include "syssignal.h" 34#include "syssignal.h"
35#include "termhooks.h" /* For FRAME_KBOARD reference in y-or-n-p. */ 35#include "termhooks.h" /* For FRAME_KBOARD reference in y-or-n-p. */
36#include "font.h" 36#include "font.h"
37 37
38#ifdef STDC_HEADERS 38#ifdef STDC_HEADERS
39#include <float.h> 39#include <float.h>
40#endif 40#endif
41 41
42/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */ 42/* If IEEE_FLOATING_POINT isn't defined, default it from FLT_*. */
43#ifndef IEEE_FLOATING_POINT 43#ifndef IEEE_FLOATING_POINT
44#if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ 44#if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
45 && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) 45 && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128)
@@ -90,7 +90,7 @@ static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay;
90Lisp_Object Qwindow; 90Lisp_Object Qwindow;
91static Lisp_Object Qfloat, Qwindow_configuration; 91static Lisp_Object Qfloat, Qwindow_configuration;
92static Lisp_Object Qprocess; 92static Lisp_Object Qprocess;
93static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector; 93Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector;
94static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; 94static Lisp_Object Qchar_table, Qbool_vector, Qhash_table;
95static Lisp_Object Qsubrp, Qmany, Qunevalled; 95static Lisp_Object Qsubrp, Qmany, Qunevalled;
96Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; 96Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
@@ -2854,74 +2854,75 @@ syms_of_data (void)
2854{ 2854{
2855 Lisp_Object error_tail, arith_tail; 2855 Lisp_Object error_tail, arith_tail;
2856 2856
2857 Qquote = intern_c_string ("quote"); 2857 DEFSYM (Qquote, "quote");
2858 Qlambda = intern_c_string ("lambda"); 2858 DEFSYM (Qlambda, "lambda");
2859 Qsubr = intern_c_string ("subr"); 2859 DEFSYM (Qsubr, "subr");
2860 Qerror_conditions = intern_c_string ("error-conditions"); 2860 DEFSYM (Qerror_conditions, "error-conditions");
2861 Qerror_message = intern_c_string ("error-message"); 2861 DEFSYM (Qerror_message, "error-message");
2862 Qtop_level = intern_c_string ("top-level"); 2862 DEFSYM (Qtop_level, "top-level");
2863 2863
2864 Qerror = intern_c_string ("error"); 2864 DEFSYM (Qerror, "error");
2865 Qquit = intern_c_string ("quit"); 2865 DEFSYM (Qquit, "quit");
2866 Qwrong_type_argument = intern_c_string ("wrong-type-argument"); 2866 DEFSYM (Qwrong_type_argument, "wrong-type-argument");
2867 Qargs_out_of_range = intern_c_string ("args-out-of-range"); 2867 DEFSYM (Qargs_out_of_range, "args-out-of-range");
2868 Qvoid_function = intern_c_string ("void-function"); 2868 DEFSYM (Qvoid_function, "void-function");
2869 Qcyclic_function_indirection = intern_c_string ("cyclic-function-indirection"); 2869 DEFSYM (Qcyclic_function_indirection, "cyclic-function-indirection");
2870 Qcyclic_variable_indirection = intern_c_string ("cyclic-variable-indirection"); 2870 DEFSYM (Qcyclic_variable_indirection, "cyclic-variable-indirection");
2871 Qvoid_variable = intern_c_string ("void-variable"); 2871 DEFSYM (Qvoid_variable, "void-variable");
2872 Qsetting_constant = intern_c_string ("setting-constant"); 2872 DEFSYM (Qsetting_constant, "setting-constant");
2873 Qinvalid_read_syntax = intern_c_string ("invalid-read-syntax"); 2873 DEFSYM (Qinvalid_read_syntax, "invalid-read-syntax");
2874 2874
2875 Qinvalid_function = intern_c_string ("invalid-function"); 2875 DEFSYM (Qinvalid_function, "invalid-function");
2876 Qwrong_number_of_arguments = intern_c_string ("wrong-number-of-arguments"); 2876 DEFSYM (Qwrong_number_of_arguments, "wrong-number-of-arguments");
2877 Qno_catch = intern_c_string ("no-catch"); 2877 DEFSYM (Qno_catch, "no-catch");
2878 Qend_of_file = intern_c_string ("end-of-file"); 2878 DEFSYM (Qend_of_file, "end-of-file");
2879 Qarith_error = intern_c_string ("arith-error"); 2879 DEFSYM (Qarith_error, "arith-error");
2880 Qbeginning_of_buffer = intern_c_string ("beginning-of-buffer"); 2880 DEFSYM (Qbeginning_of_buffer, "beginning-of-buffer");
2881 Qend_of_buffer = intern_c_string ("end-of-buffer"); 2881 DEFSYM (Qend_of_buffer, "end-of-buffer");
2882 Qbuffer_read_only = intern_c_string ("buffer-read-only"); 2882 DEFSYM (Qbuffer_read_only, "buffer-read-only");
2883 Qtext_read_only = intern_c_string ("text-read-only"); 2883 DEFSYM (Qtext_read_only, "text-read-only");
2884 Qmark_inactive = intern_c_string ("mark-inactive"); 2884 DEFSYM (Qmark_inactive, "mark-inactive");
2885 2885
2886 Qlistp = intern_c_string ("listp"); 2886 DEFSYM (Qlistp, "listp");
2887 Qconsp = intern_c_string ("consp"); 2887 DEFSYM (Qconsp, "consp");
2888 Qsymbolp = intern_c_string ("symbolp"); 2888 DEFSYM (Qsymbolp, "symbolp");
2889 Qkeywordp = intern_c_string ("keywordp"); 2889 DEFSYM (Qkeywordp, "keywordp");
2890 Qintegerp = intern_c_string ("integerp"); 2890 DEFSYM (Qintegerp, "integerp");
2891 Qnatnump = intern_c_string ("natnump"); 2891 DEFSYM (Qnatnump, "natnump");
2892 Qwholenump = intern_c_string ("wholenump"); 2892 DEFSYM (Qwholenump, "wholenump");
2893 Qstringp = intern_c_string ("stringp"); 2893 DEFSYM (Qstringp, "stringp");
2894 Qarrayp = intern_c_string ("arrayp"); 2894 DEFSYM (Qarrayp, "arrayp");
2895 Qsequencep = intern_c_string ("sequencep"); 2895 DEFSYM (Qsequencep, "sequencep");
2896 Qbufferp = intern_c_string ("bufferp"); 2896 DEFSYM (Qbufferp, "bufferp");
2897 Qvectorp = intern_c_string ("vectorp"); 2897 DEFSYM (Qvectorp, "vectorp");
2898 Qchar_or_string_p = intern_c_string ("char-or-string-p"); 2898 DEFSYM (Qchar_or_string_p, "char-or-string-p");
2899 Qmarkerp = intern_c_string ("markerp"); 2899 DEFSYM (Qmarkerp, "markerp");
2900 Qbuffer_or_string_p = intern_c_string ("buffer-or-string-p"); 2900 DEFSYM (Qbuffer_or_string_p, "buffer-or-string-p");
2901 Qinteger_or_marker_p = intern_c_string ("integer-or-marker-p"); 2901 DEFSYM (Qinteger_or_marker_p, "integer-or-marker-p");
2902 Qboundp = intern_c_string ("boundp"); 2902 DEFSYM (Qboundp, "boundp");
2903 Qfboundp = intern_c_string ("fboundp"); 2903 DEFSYM (Qfboundp, "fboundp");
2904 2904
2905 Qfloatp = intern_c_string ("floatp"); 2905 DEFSYM (Qfloatp, "floatp");
2906 Qnumberp = intern_c_string ("numberp"); 2906 DEFSYM (Qnumberp, "numberp");
2907 Qnumber_or_marker_p = intern_c_string ("number-or-marker-p"); 2907 DEFSYM (Qnumber_or_marker_p, "number-or-marker-p");
2908 2908
2909 Qchar_table_p = intern_c_string ("char-table-p"); 2909 DEFSYM (Qchar_table_p, "char-table-p");
2910 Qvector_or_char_table_p = intern_c_string ("vector-or-char-table-p"); 2910 DEFSYM (Qvector_or_char_table_p, "vector-or-char-table-p");
2911 2911
2912 Qsubrp = intern_c_string ("subrp"); 2912 DEFSYM (Qsubrp, "subrp");
2913 Qunevalled = intern_c_string ("unevalled"); 2913 DEFSYM (Qunevalled, "unevalled");
2914 Qmany = intern_c_string ("many"); 2914 DEFSYM (Qmany, "many");
2915 2915
2916 Qcdr = intern_c_string ("cdr"); 2916 DEFSYM (Qcdr, "cdr");
2917 2917
2918 /* Handle automatic advice activation */ 2918 /* Handle automatic advice activation. */
2919 Qad_advice_info = intern_c_string ("ad-advice-info"); 2919 DEFSYM (Qad_advice_info, "ad-advice-info");
2920 Qad_activate_internal = intern_c_string ("ad-activate-internal"); 2920 DEFSYM (Qad_activate_internal, "ad-activate-internal");
2921 2921
2922 error_tail = pure_cons (Qerror, Qnil); 2922 error_tail = pure_cons (Qerror, Qnil);
2923 2923
2924 /* ERROR is used as a signaler for random errors for which nothing else is right */ 2924 /* ERROR is used as a signaler for random errors for which nothing else is
2925 right. */
2925 2926
2926 Fput (Qerror, Qerror_conditions, 2927 Fput (Qerror, Qerror_conditions,
2927 error_tail); 2928 error_tail);
@@ -2958,8 +2959,7 @@ syms_of_data (void)
2958 Fput (Qcyclic_variable_indirection, Qerror_message, 2959 Fput (Qcyclic_variable_indirection, Qerror_message,
2959 make_pure_c_string ("Symbol's chain of variable indirections contains a loop")); 2960 make_pure_c_string ("Symbol's chain of variable indirections contains a loop"));
2960 2961
2961 Qcircular_list = intern_c_string ("circular-list"); 2962 DEFSYM (Qcircular_list, "circular-list");
2962 staticpro (&Qcircular_list);
2963 Fput (Qcircular_list, Qerror_conditions, 2963 Fput (Qcircular_list, Qerror_conditions,
2964 pure_cons (Qcircular_list, error_tail)); 2964 pure_cons (Qcircular_list, error_tail));
2965 Fput (Qcircular_list, Qerror_message, 2965 Fput (Qcircular_list, Qerror_message,
@@ -3026,11 +3026,11 @@ syms_of_data (void)
3026 Fput (Qtext_read_only, Qerror_message, 3026 Fput (Qtext_read_only, Qerror_message,
3027 make_pure_c_string ("Text is read-only")); 3027 make_pure_c_string ("Text is read-only"));
3028 3028
3029 Qrange_error = intern_c_string ("range-error"); 3029 DEFSYM (Qrange_error, "range-error");
3030 Qdomain_error = intern_c_string ("domain-error"); 3030 DEFSYM (Qdomain_error, "domain-error");
3031 Qsingularity_error = intern_c_string ("singularity-error"); 3031 DEFSYM (Qsingularity_error, "singularity-error");
3032 Qoverflow_error = intern_c_string ("overflow-error"); 3032 DEFSYM (Qoverflow_error, "overflow-error");
3033 Qunderflow_error = intern_c_string ("underflow-error"); 3033 DEFSYM (Qunderflow_error, "underflow-error");
3034 3034
3035 Fput (Qdomain_error, Qerror_conditions, 3035 Fput (Qdomain_error, Qerror_conditions,
3036 pure_cons (Qdomain_error, arith_tail)); 3036 pure_cons (Qdomain_error, arith_tail));
@@ -3057,93 +3057,29 @@ syms_of_data (void)
3057 Fput (Qunderflow_error, Qerror_message, 3057 Fput (Qunderflow_error, Qerror_message,
3058 make_pure_c_string ("Arithmetic underflow error")); 3058 make_pure_c_string ("Arithmetic underflow error"));
3059 3059
3060 staticpro (&Qrange_error);
3061 staticpro (&Qdomain_error);
3062 staticpro (&Qsingularity_error);
3063 staticpro (&Qoverflow_error);
3064 staticpro (&Qunderflow_error);
3065
3066 staticpro (&Qnil); 3060 staticpro (&Qnil);
3067 staticpro (&Qt); 3061 staticpro (&Qt);
3068 staticpro (&Qquote);
3069 staticpro (&Qlambda);
3070 staticpro (&Qsubr);
3071 staticpro (&Qunbound); 3062 staticpro (&Qunbound);
3072 staticpro (&Qerror_conditions);
3073 staticpro (&Qerror_message);
3074 staticpro (&Qtop_level);
3075
3076 staticpro (&Qerror);
3077 staticpro (&Qquit);
3078 staticpro (&Qwrong_type_argument);
3079 staticpro (&Qargs_out_of_range);
3080 staticpro (&Qvoid_function);
3081 staticpro (&Qcyclic_function_indirection);
3082 staticpro (&Qcyclic_variable_indirection);
3083 staticpro (&Qvoid_variable);
3084 staticpro (&Qsetting_constant);
3085 staticpro (&Qinvalid_read_syntax);
3086 staticpro (&Qwrong_number_of_arguments);
3087 staticpro (&Qinvalid_function);
3088 staticpro (&Qno_catch);
3089 staticpro (&Qend_of_file);
3090 staticpro (&Qarith_error);
3091 staticpro (&Qbeginning_of_buffer);
3092 staticpro (&Qend_of_buffer);
3093 staticpro (&Qbuffer_read_only);
3094 staticpro (&Qtext_read_only);
3095 staticpro (&Qmark_inactive);
3096
3097 staticpro (&Qlistp);
3098 staticpro (&Qconsp);
3099 staticpro (&Qsymbolp);
3100 staticpro (&Qkeywordp);
3101 staticpro (&Qintegerp);
3102 staticpro (&Qnatnump);
3103 staticpro (&Qwholenump);
3104 staticpro (&Qstringp);
3105 staticpro (&Qarrayp);
3106 staticpro (&Qsequencep);
3107 staticpro (&Qbufferp);
3108 staticpro (&Qvectorp);
3109 staticpro (&Qchar_or_string_p);
3110 staticpro (&Qmarkerp);
3111 staticpro (&Qbuffer_or_string_p);
3112 staticpro (&Qinteger_or_marker_p);
3113 staticpro (&Qfloatp);
3114 staticpro (&Qnumberp);
3115 staticpro (&Qnumber_or_marker_p);
3116 staticpro (&Qchar_table_p);
3117 staticpro (&Qvector_or_char_table_p);
3118 staticpro (&Qsubrp);
3119 staticpro (&Qmany);
3120 staticpro (&Qunevalled);
3121
3122 staticpro (&Qboundp);
3123 staticpro (&Qfboundp);
3124 staticpro (&Qcdr);
3125 staticpro (&Qad_advice_info);
3126 staticpro (&Qad_activate_internal);
3127 3063
3128 /* Types that type-of returns. */ 3064 /* Types that type-of returns. */
3129 Qinteger = intern_c_string ("integer"); 3065 DEFSYM (Qinteger, "integer");
3130 Qsymbol = intern_c_string ("symbol"); 3066 DEFSYM (Qsymbol, "symbol");
3131 Qstring = intern_c_string ("string"); 3067 DEFSYM (Qstring, "string");
3132 Qcons = intern_c_string ("cons"); 3068 DEFSYM (Qcons, "cons");
3133 Qmarker = intern_c_string ("marker"); 3069 DEFSYM (Qmarker, "marker");
3134 Qoverlay = intern_c_string ("overlay"); 3070 DEFSYM (Qoverlay, "overlay");
3135 Qfloat = intern_c_string ("float"); 3071 DEFSYM (Qfloat, "float");
3136 Qwindow_configuration = intern_c_string ("window-configuration"); 3072 DEFSYM (Qwindow_configuration, "window-configuration");
3137 Qprocess = intern_c_string ("process"); 3073 DEFSYM (Qprocess, "process");
3138 Qwindow = intern_c_string ("window"); 3074 DEFSYM (Qwindow, "window");
3139 /* Qsubr = intern_c_string ("subr"); */ 3075 /* DEFSYM (Qsubr, "subr"); */
3140 Qcompiled_function = intern_c_string ("compiled-function"); 3076 DEFSYM (Qcompiled_function, "compiled-function");
3141 Qbuffer = intern_c_string ("buffer"); 3077 DEFSYM (Qbuffer, "buffer");
3142 Qframe = intern_c_string ("frame"); 3078 DEFSYM (Qframe, "frame");
3143 Qvector = intern_c_string ("vector"); 3079 DEFSYM (Qvector, "vector");
3144 Qchar_table = intern_c_string ("char-table"); 3080 DEFSYM (Qchar_table, "char-table");
3145 Qbool_vector = intern_c_string ("bool-vector"); 3081 DEFSYM (Qbool_vector, "bool-vector");
3146 Qhash_table = intern_c_string ("hash-table"); 3082 DEFSYM (Qhash_table, "hash-table");
3147 3083
3148 DEFSYM (Qfont_spec, "font-spec"); 3084 DEFSYM (Qfont_spec, "font-spec");
3149 DEFSYM (Qfont_entity, "font-entity"); 3085 DEFSYM (Qfont_entity, "font-entity");
@@ -3151,25 +3087,6 @@ syms_of_data (void)
3151 3087
3152 DEFSYM (Qinteractive_form, "interactive-form"); 3088 DEFSYM (Qinteractive_form, "interactive-form");
3153 3089
3154 staticpro (&Qinteger);
3155 staticpro (&Qsymbol);
3156 staticpro (&Qstring);
3157 staticpro (&Qcons);
3158 staticpro (&Qmarker);
3159 staticpro (&Qoverlay);
3160 staticpro (&Qfloat);
3161 staticpro (&Qwindow_configuration);
3162 staticpro (&Qprocess);
3163 staticpro (&Qwindow);
3164 /* staticpro (&Qsubr); */
3165 staticpro (&Qcompiled_function);
3166 staticpro (&Qbuffer);
3167 staticpro (&Qframe);
3168 staticpro (&Qvector);
3169 staticpro (&Qchar_table);
3170 staticpro (&Qbool_vector);
3171 staticpro (&Qhash_table);
3172
3173 defsubr (&Sindirect_variable); 3090 defsubr (&Sindirect_variable);
3174 defsubr (&Sinteractive_form); 3091 defsubr (&Sinteractive_form);
3175 defsubr (&Seq); 3092 defsubr (&Seq);
diff --git a/src/eval.c b/src/eval.c
index 6b4182cb319..f8bc0a9f6aa 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -88,7 +88,7 @@ static Lisp_Object Qdebug_on_error;
88static Lisp_Object Qdeclare; 88static Lisp_Object Qdeclare;
89Lisp_Object Qinternal_interpreter_environment, Qclosure; 89Lisp_Object Qinternal_interpreter_environment, Qclosure;
90 90
91Lisp_Object Qdebug; 91static Lisp_Object Qdebug;
92 92
93/* This holds either the symbol `run-hooks' or nil. 93/* This holds either the symbol `run-hooks' or nil.
94 It is nil at an early stage of startup, and when Emacs 94 It is nil at an early stage of startup, and when Emacs
diff --git a/src/lisp.h b/src/lisp.h
index 32d6b44d76a..8a504e8eb86 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2836,7 +2836,7 @@ extern void syms_of_lread (void);
2836 2836
2837/* Defined in eval.c. */ 2837/* Defined in eval.c. */
2838extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro; 2838extern Lisp_Object Qautoload, Qexit, Qinteractive, Qcommandp, Qdefun, Qmacro;
2839extern Lisp_Object Qinhibit_quit, Qclosure, Qdebug; 2839extern Lisp_Object Qinhibit_quit, Qclosure;
2840extern Lisp_Object Qand_rest; 2840extern Lisp_Object Qand_rest;
2841extern Lisp_Object Vautoload_queue; 2841extern Lisp_Object Vautoload_queue;
2842extern Lisp_Object Vsignaling_function; 2842extern Lisp_Object Vsignaling_function;
diff --git a/src/minibuf.c b/src/minibuf.c
index 3f8bd835211..4658b05e91d 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -43,7 +43,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
43 43
44Lisp_Object Vminibuffer_list; 44Lisp_Object Vminibuffer_list;
45 45
46/* Data to remember during recursive minibuffer invocations */ 46/* Data to remember during recursive minibuffer invocations. */
47 47
48static Lisp_Object minibuf_save_list; 48static Lisp_Object minibuf_save_list;
49 49
@@ -55,7 +55,7 @@ int minibuf_level;
55 55
56static Lisp_Object Qhistory_length; 56static Lisp_Object Qhistory_length;
57 57
58/* Fread_minibuffer leaves the input here as a string. */ 58/* Fread_minibuffer leaves the input here as a string. */
59 59
60Lisp_Object last_minibuf_string; 60Lisp_Object last_minibuf_string;
61 61
@@ -588,7 +588,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
588 /* Empty out the minibuffers of all frames other than the one 588 /* Empty out the minibuffers of all frames other than the one
589 where we are going to display one now. 589 where we are going to display one now.
590 Set them to point to ` *Minibuf-0*', which is always empty. */ 590 Set them to point to ` *Minibuf-0*', which is always empty. */
591 empty_minibuf = Fget_buffer (build_string (" *Minibuf-0*")); 591 empty_minibuf = get_minibuffer (0);
592 592
593 FOR_EACH_FRAME (dummy, frame) 593 FOR_EACH_FRAME (dummy, frame)
594 { 594 {
@@ -1137,8 +1137,8 @@ function, instead of the usual behavior. */)
1137 } 1137 }
1138 1138
1139 result = Fcompleting_read (prompt, intern ("internal-complete-buffer"), 1139 result = Fcompleting_read (prompt, intern ("internal-complete-buffer"),
1140 Qnil, require_match, Qnil, Qbuffer_name_history, 1140 Qnil, require_match, Qnil,
1141 def, Qnil); 1141 Qbuffer_name_history, def, Qnil);
1142 } 1142 }
1143 else 1143 else
1144 { 1144 {
@@ -1878,6 +1878,9 @@ the values STRING, PREDICATE and `lambda'. */)
1878 return Qt; 1878 return Qt;
1879} 1879}
1880 1880
1881Lisp_Object Qmetadata;
1882extern Lisp_Object Qbuffer;
1883
1881DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0, 1884DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0,
1882 doc: /* Perform completion on buffer names. 1885 doc: /* Perform completion on buffer names.
1883If the argument FLAG is nil, invoke `try-completion', if it's t, invoke 1886If the argument FLAG is nil, invoke `try-completion', if it's t, invoke
@@ -1912,8 +1915,12 @@ The arguments STRING and PREDICATE are as in `try-completion',
1912 return res; 1915 return res;
1913 } 1916 }
1914 } 1917 }
1915 else /* assume `lambda' */ 1918 else if (EQ (flag, Qlambda))
1916 return Ftest_completion (string, Vbuffer_alist, predicate); 1919 return Ftest_completion (string, Vbuffer_alist, predicate);
1920 else if (EQ (flag, Qmetadata))
1921 return Fcons (Qmetadata, Fcons (Fcons (Qcategory, Qbuffer), Qnil));
1922 else
1923 return Qnil;
1917} 1924}
1918 1925
1919/* Like assoc but assumes KEY is a string, and ignores case if appropriate. */ 1926/* Like assoc but assumes KEY is a string, and ignores case if appropriate. */
@@ -1989,66 +1996,38 @@ syms_of_minibuf (void)
1989 minibuf_save_list = Qnil; 1996 minibuf_save_list = Qnil;
1990 staticpro (&minibuf_save_list); 1997 staticpro (&minibuf_save_list);
1991 1998
1992 Qcompleting_read_default = intern_c_string ("completing-read-default"); 1999 DEFSYM (Qcompleting_read_default, "completing-read-default");
1993 staticpro (&Qcompleting_read_default); 2000 DEFSYM (Qcompletion_ignore_case, "completion-ignore-case");
1994 2001 DEFSYM (Qread_file_name_internal, "read-file-name-internal");
1995 Qcompletion_ignore_case = intern_c_string ("completion-ignore-case"); 2002 DEFSYM (Qminibuffer_default, "minibuffer-default");
1996 staticpro (&Qcompletion_ignore_case);
1997
1998 Qread_file_name_internal = intern_c_string ("read-file-name-internal");
1999 staticpro (&Qread_file_name_internal);
2000
2001 Qminibuffer_default = intern_c_string ("minibuffer-default");
2002 staticpro (&Qminibuffer_default);
2003 Fset (Qminibuffer_default, Qnil); 2003 Fset (Qminibuffer_default, Qnil);
2004 2004
2005 Qminibuffer_completion_table = intern_c_string ("minibuffer-completion-table"); 2005 DEFSYM (Qminibuffer_completion_table, "minibuffer-completion-table");
2006 staticpro (&Qminibuffer_completion_table); 2006 DEFSYM (Qminibuffer_completion_confirm, "minibuffer-completion-confirm");
2007 2007 DEFSYM (Qminibuffer_completion_predicate, "minibuffer-completion-predicate");
2008 Qminibuffer_completion_confirm = intern_c_string ("minibuffer-completion-confirm");
2009 staticpro (&Qminibuffer_completion_confirm);
2010
2011 Qminibuffer_completion_predicate = intern_c_string ("minibuffer-completion-predicate");
2012 staticpro (&Qminibuffer_completion_predicate);
2013 2008
2014 staticpro (&last_minibuf_string); 2009 staticpro (&last_minibuf_string);
2015 last_minibuf_string = Qnil; 2010 last_minibuf_string = Qnil;
2016 2011
2017 Quser_variable_p = intern_c_string ("user-variable-p"); 2012 DEFSYM (Quser_variable_p, "user-variable-p");
2018 staticpro (&Quser_variable_p); 2013 DEFSYM (Qminibuffer_history, "minibuffer-history");
2019 2014 DEFSYM (Qbuffer_name_history, "buffer-name-history");
2020 Qminibuffer_history = intern_c_string ("minibuffer-history");
2021 staticpro (&Qminibuffer_history);
2022
2023 Qbuffer_name_history = intern_c_string ("buffer-name-history");
2024 staticpro (&Qbuffer_name_history);
2025 Fset (Qbuffer_name_history, Qnil); 2015 Fset (Qbuffer_name_history, Qnil);
2026 2016
2027 Qminibuffer_setup_hook = intern_c_string ("minibuffer-setup-hook"); 2017 DEFSYM (Qminibuffer_setup_hook, "minibuffer-setup-hook");
2028 staticpro (&Qminibuffer_setup_hook); 2018 DEFSYM (Qminibuffer_exit_hook, "minibuffer-exit-hook");
2029 2019 DEFSYM (Qhistory_length, "history-length");
2030 Qminibuffer_exit_hook = intern_c_string ("minibuffer-exit-hook"); 2020 DEFSYM (Qcurrent_input_method, "current-input-method");
2031 staticpro (&Qminibuffer_exit_hook); 2021 DEFSYM (Qactivate_input_method, "activate-input-method");
2032 2022 DEFSYM (Qcase_fold_search, "case-fold-search");
2033 Qhistory_length = intern_c_string ("history-length"); 2023 DEFSYM (Qmetadata, "metadata");
2034 staticpro (&Qhistory_length);
2035
2036 Qcurrent_input_method = intern_c_string ("current-input-method");
2037 staticpro (&Qcurrent_input_method);
2038
2039 Qactivate_input_method = intern_c_string ("activate-input-method");
2040 staticpro (&Qactivate_input_method);
2041
2042 Qcase_fold_search = intern_c_string ("case-fold-search");
2043 staticpro (&Qcase_fold_search);
2044 2024
2045 DEFVAR_LISP ("read-expression-history", Vread_expression_history, 2025 DEFVAR_LISP ("read-expression-history", Vread_expression_history,
2046 doc: /* A history list for arguments that are Lisp expressions to evaluate. 2026 doc: /* A history list for arguments that are Lisp expressions to evaluate.
2047For example, `eval-expression' uses this. */); 2027For example, `eval-expression' uses this. */);
2048 Vread_expression_history = Qnil; 2028 Vread_expression_history = Qnil;
2049 2029
2050 Qread_expression_history = intern_c_string ("read-expression-history"); 2030 DEFSYM (Qread_expression_history, "read-expression-history");
2051 staticpro (&Qread_expression_history);
2052 2031
2053 DEFVAR_LISP ("read-buffer-function", Vread_buffer_function, 2032 DEFVAR_LISP ("read-buffer-function", Vread_buffer_function,
2054 doc: /* If this is non-nil, `read-buffer' does its work by calling this function. 2033 doc: /* If this is non-nil, `read-buffer' does its work by calling this function.