diff options
| author | Paul Eggert | 2011-06-02 00:42:55 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-06-02 00:42:55 -0700 |
| commit | af3c30cb283811135d9a1136fa5072e6922410a9 (patch) | |
| tree | 46c7ba217ef48f4951f6cb9ec8594d4169f6dfdc /src | |
| parent | 3870d916919d4ac5d052698e7ac61a04ad0beb94 (diff) | |
| parent | 7d5200893a8cc980744bb4c65355df5a936388bb (diff) | |
| download | emacs-af3c30cb283811135d9a1136fa5072e6922410a9.tar.gz emacs-af3c30cb283811135d9a1136fa5072e6922410a9.zip | |
Merge from trunk.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 36 | ||||
| -rw-r--r-- | src/bytecode.c | 10 | ||||
| -rw-r--r-- | src/data.c | 4 | ||||
| -rw-r--r-- | src/dispnew.c | 9 | ||||
| -rw-r--r-- | src/emacs.c | 2 | ||||
| -rw-r--r-- | src/frame.c | 2 | ||||
| -rw-r--r-- | src/makefile.w32-in | 2 | ||||
| -rw-r--r-- | src/minibuf.c | 71 |
8 files changed, 85 insertions, 51 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index a8a7f3761eb..6a6deb0be0a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,37 @@ | |||
| 1 | 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | Make it possible to build with GCC-4.6+ -O2 -flto. | ||
| 4 | |||
| 5 | * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE. | ||
| 6 | |||
| 7 | 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 8 | |||
| 9 | * minibuf.c (get_minibuffer, read_minibuf_unwind): | ||
| 10 | Call minibuffer-inactive-mode. | ||
| 11 | |||
| 12 | 2011-05-31 Juanma Barranquero <lekktu@gmail.com> | ||
| 13 | |||
| 14 | * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)): | ||
| 15 | Update dependencies. | ||
| 16 | |||
| 17 | 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 18 | |||
| 19 | * data.c (init_data): Remove code for UTS, this system is not | ||
| 20 | supported anymore. | ||
| 21 | |||
| 22 | 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 23 | |||
| 24 | Don't force ./temacs to start in terminal mode. | ||
| 25 | |||
| 26 | * frame.c (make_initial_frame): Initialize faces in all cases, not | ||
| 27 | only when CANNOT_DUMP is defined. | ||
| 28 | * dispnew.c (init_display): Remove CANNOT_DUMP condition. | ||
| 29 | |||
| 30 | 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 31 | |||
| 32 | * dispnew.c (add_window_display_history): Use const for the string | ||
| 33 | pointer. Remove declaration, not needed. | ||
| 34 | |||
| 1 | 2011-05-31 Paul Eggert <eggert@cs.ucla.edu> | 35 | 2011-05-31 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 36 | ||
| 3 | Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771) | 37 | Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771) |
| @@ -205,7 +239,7 @@ | |||
| 205 | 239 | ||
| 206 | merge count_size_as_multibyte, parse_str_to_multibyte | 240 | merge count_size_as_multibyte, parse_str_to_multibyte |
| 207 | * character.c, character.h (count_size_as_multibyte): | 241 | * character.c, character.h (count_size_as_multibyte): |
| 208 | Renamed from parse_str_to_multibyte; all uses changed. | 242 | Rename from parse_str_to_multibyte; all uses changed. |
| 209 | Check for integer overflow. | 243 | Check for integer overflow. |
| 210 | * insdel.c, lisp.h (count_size_as_multibyte): Remove, | 244 | * insdel.c, lisp.h (count_size_as_multibyte): Remove, |
| 211 | since it's now a duplicate of the other. This is more of | 245 | since it's now a duplicate of the other. This is more of |
diff --git a/src/bytecode.c b/src/bytecode.c index c3cd3d43072..74cf401bf1d 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -144,7 +144,7 @@ Lisp_Object Qbytecode; | |||
| 144 | #define Bcurrent_column 0151 | 144 | #define Bcurrent_column 0151 |
| 145 | #define Bindent_to 0152 | 145 | #define Bindent_to 0152 |
| 146 | #ifdef BYTE_CODE_SAFE | 146 | #ifdef BYTE_CODE_SAFE |
| 147 | #define Bscan_buffer 0153 /* No longer generated as of v18 */ | 147 | #define Bscan_buffer 0153 /* No longer generated as of v18. */ |
| 148 | #endif | 148 | #endif |
| 149 | #define Beolp 0154 | 149 | #define Beolp 0154 |
| 150 | #define Beobp 0155 | 150 | #define Beobp 0155 |
| @@ -956,7 +956,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 956 | save_restriction_save ()); | 956 | save_restriction_save ()); |
| 957 | break; | 957 | break; |
| 958 | 958 | ||
| 959 | case Bcatch: /* FIXME: ill-suited for lexbind */ | 959 | case Bcatch: /* FIXME: ill-suited for lexbind. */ |
| 960 | { | 960 | { |
| 961 | Lisp_Object v1; | 961 | Lisp_Object v1; |
| 962 | BEFORE_POTENTIAL_GC (); | 962 | BEFORE_POTENTIAL_GC (); |
| @@ -966,11 +966,11 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 966 | break; | 966 | break; |
| 967 | } | 967 | } |
| 968 | 968 | ||
| 969 | case Bunwind_protect: /* FIXME: avoid closure for lexbind */ | 969 | case Bunwind_protect: /* FIXME: avoid closure for lexbind. */ |
| 970 | record_unwind_protect (Fprogn, POP); | 970 | record_unwind_protect (Fprogn, POP); |
| 971 | break; | 971 | break; |
| 972 | 972 | ||
| 973 | case Bcondition_case: /* FIXME: ill-suited for lexbind */ | 973 | case Bcondition_case: /* FIXME: ill-suited for lexbind. */ |
| 974 | { | 974 | { |
| 975 | Lisp_Object handlers, body; | 975 | Lisp_Object handlers, body; |
| 976 | handlers = POP; | 976 | handlers = POP; |
| @@ -1779,8 +1779,8 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, | |||
| 1779 | PUSH (*ptr); | 1779 | PUSH (*ptr); |
| 1780 | break; | 1780 | break; |
| 1781 | } | 1781 | } |
| 1782 | /* stack-set-0 = discard; stack-set-1 = discard-1-preserve-tos. */ | ||
| 1783 | case Bstack_set: | 1782 | case Bstack_set: |
| 1783 | /* stack-set-0 = discard; stack-set-1 = discard-1-preserve-tos. */ | ||
| 1784 | { | 1784 | { |
| 1785 | Lisp_Object *ptr = top - (FETCH); | 1785 | Lisp_Object *ptr = top - (FETCH); |
| 1786 | *ptr = POP; | 1786 | *ptr = POP; |
diff --git a/src/data.c b/src/data.c index 443d78376d9..78bd454056d 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -3220,8 +3220,4 @@ init_data (void) | |||
| 3220 | return; | 3220 | return; |
| 3221 | #endif /* CANNOT_DUMP */ | 3221 | #endif /* CANNOT_DUMP */ |
| 3222 | signal (SIGFPE, arith_error); | 3222 | signal (SIGFPE, arith_error); |
| 3223 | |||
| 3224 | #ifdef uts | ||
| 3225 | signal (SIGEMT, arith_error); | ||
| 3226 | #endif /* uts */ | ||
| 3227 | } | 3223 | } |
diff --git a/src/dispnew.c b/src/dispnew.c index cd20bd6e9aa..501dc4ffd80 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -290,7 +290,6 @@ static int history_idx; | |||
| 290 | static unsigned history_tick; | 290 | static unsigned history_tick; |
| 291 | 291 | ||
| 292 | static void add_frame_display_history (struct frame *, int); | 292 | static void add_frame_display_history (struct frame *, int); |
| 293 | static void add_window_display_history (struct window *, char *, int); | ||
| 294 | 293 | ||
| 295 | /* Add to the redisplay history how window W has been displayed. | 294 | /* Add to the redisplay history how window W has been displayed. |
| 296 | MSG is a trace containing the information how W's glyph matrix | 295 | MSG is a trace containing the information how W's glyph matrix |
| @@ -298,7 +297,7 @@ static void add_window_display_history (struct window *, char *, int); | |||
| 298 | has been interrupted for pending input. */ | 297 | has been interrupted for pending input. */ |
| 299 | 298 | ||
| 300 | static void | 299 | static void |
| 301 | add_window_display_history (struct window *w, char *msg, int paused_p) | 300 | add_window_display_history (struct window *w, const char *msg, int paused_p) |
| 302 | { | 301 | { |
| 303 | char *buf; | 302 | char *buf; |
| 304 | 303 | ||
| @@ -6234,11 +6233,7 @@ init_display (void) | |||
| 6234 | } | 6233 | } |
| 6235 | } | 6234 | } |
| 6236 | 6235 | ||
| 6237 | if (!inhibit_window_system && display_arg | 6236 | if (!inhibit_window_system && display_arg) |
| 6238 | #ifndef CANNOT_DUMP | ||
| 6239 | && initialized | ||
| 6240 | #endif | ||
| 6241 | ) | ||
| 6242 | { | 6237 | { |
| 6243 | Vinitial_window_system = Qx; | 6238 | Vinitial_window_system = Qx; |
| 6244 | #ifdef HAVE_X11 | 6239 | #ifdef HAVE_X11 |
diff --git a/src/emacs.c b/src/emacs.c index 3a7c5c0bf3d..70d90fd5781 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -678,7 +678,7 @@ malloc_initialize_hook (void) | |||
| 678 | } | 678 | } |
| 679 | } | 679 | } |
| 680 | 680 | ||
| 681 | void (*__malloc_initialize_hook) (void) = malloc_initialize_hook; | 681 | void (*__malloc_initialize_hook) (void) EXTERNALLY_VISIBLE = malloc_initialize_hook; |
| 682 | 682 | ||
| 683 | #endif /* DOUG_LEA_MALLOC */ | 683 | #endif /* DOUG_LEA_MALLOC */ |
| 684 | 684 | ||
diff --git a/src/frame.c b/src/frame.c index 74e222f85fc..6008ba9567a 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -544,10 +544,8 @@ make_initial_frame (void) | |||
| 544 | /* The default value of menu-bar-mode is t. */ | 544 | /* The default value of menu-bar-mode is t. */ |
| 545 | set_menu_bar_lines (f, make_number (1), Qnil); | 545 | set_menu_bar_lines (f, make_number (1), Qnil); |
| 546 | 546 | ||
| 547 | #ifdef CANNOT_DUMP | ||
| 548 | if (!noninteractive) | 547 | if (!noninteractive) |
| 549 | init_frame_faces (f); | 548 | init_frame_faces (f); |
| 550 | #endif | ||
| 551 | 549 | ||
| 552 | return f; | 550 | return f; |
| 553 | } | 551 | } |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index 060b565b308..8da589a7115 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -654,6 +654,7 @@ $(BLD)/data.$(O) : \ | |||
| 654 | $(SRC)/data.c \ | 654 | $(SRC)/data.c \ |
| 655 | $(CONFIG_H) \ | 655 | $(CONFIG_H) \ |
| 656 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 656 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| 657 | $(EMACS_ROOT)/lib/intprops.h \ | ||
| 657 | $(LISP_H) \ | 658 | $(LISP_H) \ |
| 658 | $(SRC)/buffer.h \ | 659 | $(SRC)/buffer.h \ |
| 659 | $(SRC)/ccl.h \ | 660 | $(SRC)/ccl.h \ |
| @@ -753,6 +754,7 @@ $(BLD)/editfns.$(O) : \ | |||
| 753 | $(EMACS_ROOT)/nt/inc/sys/time.h \ | 754 | $(EMACS_ROOT)/nt/inc/sys/time.h \ |
| 754 | $(EMACS_ROOT)/lib/intprops.h \ | 755 | $(EMACS_ROOT)/lib/intprops.h \ |
| 755 | $(EMACS_ROOT)/lib/strftime.h \ | 756 | $(EMACS_ROOT)/lib/strftime.h \ |
| 757 | $(EMACS_ROOT)/lib/verify.h \ | ||
| 756 | $(LISP_H) \ | 758 | $(LISP_H) \ |
| 757 | $(SRC)/atimer.h \ | 759 | $(SRC)/atimer.h \ |
| 758 | $(SRC)/blockinput.h \ | 760 | $(SRC)/blockinput.h \ |
diff --git a/src/minibuf.c b/src/minibuf.c index 39831e73b98..b3f157ba69a 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -160,7 +160,7 @@ without invoking the usual minibuffer commands. */) | |||
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | 162 | ||
| 163 | /* Actual minibuffer invocation. */ | 163 | /* Actual minibuffer invocation. */ |
| 164 | 164 | ||
| 165 | static Lisp_Object read_minibuf_unwind (Lisp_Object); | 165 | static Lisp_Object read_minibuf_unwind (Lisp_Object); |
| 166 | static Lisp_Object run_exit_minibuf_hook (Lisp_Object); | 166 | static Lisp_Object run_exit_minibuf_hook (Lisp_Object); |
| @@ -266,7 +266,7 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial, | |||
| 266 | error ("Error reading from stdin"); | 266 | error ("Error reading from stdin"); |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | /* If Lisp form desired instead of string, parse it. */ | 269 | /* If Lisp form desired instead of string, parse it. */ |
| 270 | if (expflag) | 270 | if (expflag) |
| 271 | val = string_to_object (val, CONSP (defalt) ? XCAR (defalt) : defalt); | 271 | val = string_to_object (val, CONSP (defalt) ? XCAR (defalt) : defalt); |
| 272 | 272 | ||
| @@ -743,7 +743,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, | |||
| 743 | } | 743 | } |
| 744 | } | 744 | } |
| 745 | 745 | ||
| 746 | /* If Lisp form desired instead of string, parse it. */ | 746 | /* If Lisp form desired instead of string, parse it. */ |
| 747 | if (expflag) | 747 | if (expflag) |
| 748 | val = string_to_object (val, defalt); | 748 | val = string_to_object (val, defalt); |
| 749 | 749 | ||
| @@ -755,7 +755,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, | |||
| 755 | 755 | ||
| 756 | /* Return a buffer to be used as the minibuffer at depth `depth'. | 756 | /* Return a buffer to be used as the minibuffer at depth `depth'. |
| 757 | depth = 0 is the lowest allowed argument, and that is the value | 757 | depth = 0 is the lowest allowed argument, and that is the value |
| 758 | used for nonrecursive minibuffer invocations */ | 758 | used for nonrecursive minibuffer invocations. */ |
| 759 | 759 | ||
| 760 | Lisp_Object | 760 | Lisp_Object |
| 761 | get_minibuffer (int depth) | 761 | get_minibuffer (int depth) |
| @@ -793,7 +793,10 @@ get_minibuffer (int depth) | |||
| 793 | reset_buffer (XBUFFER (buf)); | 793 | reset_buffer (XBUFFER (buf)); |
| 794 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | 794 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); |
| 795 | Fset_buffer (buf); | 795 | Fset_buffer (buf); |
| 796 | Fkill_all_local_variables (); | 796 | if (!NILP (Ffboundp (intern ("minibuffer-inactive-mode")))) |
| 797 | call0 (intern ("minibuffer-inactive-mode")); | ||
| 798 | else | ||
| 799 | Fkill_all_local_variables (); | ||
| 797 | unbind_to (count, Qnil); | 800 | unbind_to (count, Qnil); |
| 798 | } | 801 | } |
| 799 | 802 | ||
| @@ -808,7 +811,7 @@ run_exit_minibuf_hook (Lisp_Object data) | |||
| 808 | } | 811 | } |
| 809 | 812 | ||
| 810 | /* This function is called on exiting minibuffer, whether normally or | 813 | /* This function is called on exiting minibuffer, whether normally or |
| 811 | not, and it restores the current window, buffer, etc. */ | 814 | not, and it restores the current window, buffer, etc. */ |
| 812 | 815 | ||
| 813 | static Lisp_Object | 816 | static Lisp_Object |
| 814 | read_minibuf_unwind (Lisp_Object data) | 817 | read_minibuf_unwind (Lisp_Object data) |
| @@ -868,6 +871,12 @@ read_minibuf_unwind (Lisp_Object data) | |||
| 868 | windows_or_buffers_changed++; | 871 | windows_or_buffers_changed++; |
| 869 | XSETFASTINT (XWINDOW (window)->last_modified, 0); | 872 | XSETFASTINT (XWINDOW (window)->last_modified, 0); |
| 870 | XSETFASTINT (XWINDOW (window)->last_overlay_modified, 0); | 873 | XSETFASTINT (XWINDOW (window)->last_overlay_modified, 0); |
| 874 | |||
| 875 | /* In case the previous minibuffer displayed in this miniwindow is | ||
| 876 | dead, we may keep displaying this buffer (tho it's inactive), so reset it, | ||
| 877 | to make sure we don't leave around bindings and stuff which only | ||
| 878 | made sense during the read_minibuf invocation. */ | ||
| 879 | call0 (intern ("minibuffer-inactive-mode")); | ||
| 871 | return Qnil; | 880 | return Qnil; |
| 872 | } | 881 | } |
| 873 | 882 | ||
| @@ -978,7 +987,7 @@ Such arguments are used as in `read-from-minibuffer'.) */) | |||
| 978 | Qnil); | 987 | Qnil); |
| 979 | } | 988 | } |
| 980 | 989 | ||
| 981 | /* Functions that use the minibuffer to read various things. */ | 990 | /* Functions that use the minibuffer to read various things. */ |
| 982 | 991 | ||
| 983 | DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, | 992 | DEFUN ("read-string", Fread_string, Sread_string, 1, 5, 0, |
| 984 | doc: /* Read a string from the minibuffer, prompting with string PROMPT. | 993 | doc: /* Read a string from the minibuffer, prompting with string PROMPT. |
| @@ -1146,7 +1155,7 @@ function, instead of the usual behavior. */) | |||
| 1146 | args[1] = prompt; | 1155 | args[1] = prompt; |
| 1147 | args[2] = def; | 1156 | args[2] = def; |
| 1148 | args[3] = require_match; | 1157 | args[3] = require_match; |
| 1149 | result = Ffuncall(4, args); | 1158 | result = Ffuncall (4, args); |
| 1150 | } | 1159 | } |
| 1151 | return unbind_to (count, result); | 1160 | return unbind_to (count, result); |
| 1152 | } | 1161 | } |
| @@ -1233,10 +1242,10 @@ is used to further constrain the set of candidates. */) | |||
| 1233 | 1242 | ||
| 1234 | while (1) | 1243 | while (1) |
| 1235 | { | 1244 | { |
| 1236 | /* Get the next element of the alist, obarray, or hash-table. */ | 1245 | /* Get the next element of the alist, obarray, or hash-table. */ |
| 1237 | /* Exit the loop if the elements are all used up. */ | 1246 | /* Exit the loop if the elements are all used up. */ |
| 1238 | /* elt gets the alist element or symbol. | 1247 | /* elt gets the alist element or symbol. |
| 1239 | eltstring gets the name to check as a completion. */ | 1248 | eltstring gets the name to check as a completion. */ |
| 1240 | 1249 | ||
| 1241 | if (type == list_table) | 1250 | if (type == list_table) |
| 1242 | { | 1251 | { |
| @@ -1278,7 +1287,7 @@ is used to further constrain the set of candidates. */) | |||
| 1278 | elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++); | 1287 | elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++); |
| 1279 | } | 1288 | } |
| 1280 | 1289 | ||
| 1281 | /* Is this element a possible completion? */ | 1290 | /* Is this element a possible completion? */ |
| 1282 | 1291 | ||
| 1283 | if (SYMBOLP (eltstring)) | 1292 | if (SYMBOLP (eltstring)) |
| 1284 | eltstring = Fsymbol_name (eltstring); | 1293 | eltstring = Fsymbol_name (eltstring); |
| @@ -1291,7 +1300,7 @@ is used to further constrain the set of candidates. */) | |||
| 1291 | completion_ignore_case ? Qt : Qnil), | 1300 | completion_ignore_case ? Qt : Qnil), |
| 1292 | EQ (Qt, tem))) | 1301 | EQ (Qt, tem))) |
| 1293 | { | 1302 | { |
| 1294 | /* Yes. */ | 1303 | /* Yes. */ |
| 1295 | Lisp_Object regexps; | 1304 | Lisp_Object regexps; |
| 1296 | 1305 | ||
| 1297 | /* Ignore this element if it fails to match all the regexps. */ | 1306 | /* Ignore this element if it fails to match all the regexps. */ |
| @@ -1313,7 +1322,7 @@ is used to further constrain the set of candidates. */) | |||
| 1313 | } | 1322 | } |
| 1314 | 1323 | ||
| 1315 | /* Ignore this element if there is a predicate | 1324 | /* Ignore this element if there is a predicate |
| 1316 | and the predicate doesn't like it. */ | 1325 | and the predicate doesn't like it. */ |
| 1317 | 1326 | ||
| 1318 | if (!NILP (predicate)) | 1327 | if (!NILP (predicate)) |
| 1319 | { | 1328 | { |
| @@ -1415,7 +1424,7 @@ is used to further constrain the set of candidates. */) | |||
| 1415 | } | 1424 | } |
| 1416 | 1425 | ||
| 1417 | if (NILP (bestmatch)) | 1426 | if (NILP (bestmatch)) |
| 1418 | return Qnil; /* No completions found */ | 1427 | return Qnil; /* No completions found. */ |
| 1419 | /* If we are ignoring case, and there is no exact match, | 1428 | /* If we are ignoring case, and there is no exact match, |
| 1420 | and no additional text was supplied, | 1429 | and no additional text was supplied, |
| 1421 | don't change the case of what the user typed. */ | 1430 | don't change the case of what the user typed. */ |
| @@ -1429,7 +1438,7 @@ is used to further constrain the set of candidates. */) | |||
| 1429 | return Qt; | 1438 | return Qt; |
| 1430 | 1439 | ||
| 1431 | XSETFASTINT (zero, 0); /* Else extract the part in which */ | 1440 | XSETFASTINT (zero, 0); /* Else extract the part in which */ |
| 1432 | XSETFASTINT (end, bestmatchsize); /* all completions agree */ | 1441 | XSETFASTINT (end, bestmatchsize); /* all completions agree. */ |
| 1433 | return Fsubstring (bestmatch, zero, end); | 1442 | return Fsubstring (bestmatch, zero, end); |
| 1434 | } | 1443 | } |
| 1435 | 1444 | ||
| @@ -1496,10 +1505,10 @@ with a space are ignored unless STRING itself starts with a space. */) | |||
| 1496 | 1505 | ||
| 1497 | while (1) | 1506 | while (1) |
| 1498 | { | 1507 | { |
| 1499 | /* Get the next element of the alist, obarray, or hash-table. */ | 1508 | /* Get the next element of the alist, obarray, or hash-table. */ |
| 1500 | /* Exit the loop if the elements are all used up. */ | 1509 | /* Exit the loop if the elements are all used up. */ |
| 1501 | /* elt gets the alist element or symbol. | 1510 | /* elt gets the alist element or symbol. |
| 1502 | eltstring gets the name to check as a completion. */ | 1511 | eltstring gets the name to check as a completion. */ |
| 1503 | 1512 | ||
| 1504 | if (type == 1) | 1513 | if (type == 1) |
| 1505 | { | 1514 | { |
| @@ -1541,7 +1550,7 @@ with a space are ignored unless STRING itself starts with a space. */) | |||
| 1541 | elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++); | 1550 | elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++); |
| 1542 | } | 1551 | } |
| 1543 | 1552 | ||
| 1544 | /* Is this element a possible completion? */ | 1553 | /* Is this element a possible completion? */ |
| 1545 | 1554 | ||
| 1546 | if (SYMBOLP (eltstring)) | 1555 | if (SYMBOLP (eltstring)) |
| 1547 | eltstring = Fsymbol_name (eltstring); | 1556 | eltstring = Fsymbol_name (eltstring); |
| @@ -1561,7 +1570,7 @@ with a space are ignored unless STRING itself starts with a space. */) | |||
| 1561 | completion_ignore_case ? Qt : Qnil), | 1570 | completion_ignore_case ? Qt : Qnil), |
| 1562 | EQ (Qt, tem))) | 1571 | EQ (Qt, tem))) |
| 1563 | { | 1572 | { |
| 1564 | /* Yes. */ | 1573 | /* Yes. */ |
| 1565 | Lisp_Object regexps; | 1574 | Lisp_Object regexps; |
| 1566 | 1575 | ||
| 1567 | /* Ignore this element if it fails to match all the regexps. */ | 1576 | /* Ignore this element if it fails to match all the regexps. */ |
| @@ -1583,7 +1592,7 @@ with a space are ignored unless STRING itself starts with a space. */) | |||
| 1583 | } | 1592 | } |
| 1584 | 1593 | ||
| 1585 | /* Ignore this element if there is a predicate | 1594 | /* Ignore this element if there is a predicate |
| 1586 | and the predicate doesn't like it. */ | 1595 | and the predicate doesn't like it. */ |
| 1587 | 1596 | ||
| 1588 | if (!NILP (predicate)) | 1597 | if (!NILP (predicate)) |
| 1589 | { | 1598 | { |
| @@ -1604,7 +1613,7 @@ with a space are ignored unless STRING itself starts with a space. */) | |||
| 1604 | } | 1613 | } |
| 1605 | if (NILP (tem)) continue; | 1614 | if (NILP (tem)) continue; |
| 1606 | } | 1615 | } |
| 1607 | /* Ok => put it on the list. */ | 1616 | /* Ok => put it on the list. */ |
| 1608 | allmatches = Fcons (eltstring, allmatches); | 1617 | allmatches = Fcons (eltstring, allmatches); |
| 1609 | } | 1618 | } |
| 1610 | } | 1619 | } |
| @@ -1810,9 +1819,9 @@ the values STRING, PREDICATE and `lambda'. */) | |||
| 1810 | if (SYMBOLP (tail)) | 1819 | if (SYMBOLP (tail)) |
| 1811 | while (1) | 1820 | while (1) |
| 1812 | { | 1821 | { |
| 1813 | if (EQ((Fcompare_strings (string, make_number (0), Qnil, | 1822 | if (EQ (Fcompare_strings (string, make_number (0), Qnil, |
| 1814 | Fsymbol_name (tail), | 1823 | Fsymbol_name (tail), |
| 1815 | make_number (0) , Qnil, Qt)), | 1824 | make_number (0) , Qnil, Qt), |
| 1816 | Qt)) | 1825 | Qt)) |
| 1817 | { | 1826 | { |
| 1818 | tem = tail; | 1827 | tem = tail; |
| @@ -1836,11 +1845,11 @@ the values STRING, PREDICATE and `lambda'. */) | |||
| 1836 | tem = HASH_KEY (h, i); | 1845 | tem = HASH_KEY (h, i); |
| 1837 | else | 1846 | else |
| 1838 | for (i = 0; i < HASH_TABLE_SIZE (h); ++i) | 1847 | for (i = 0; i < HASH_TABLE_SIZE (h); ++i) |
| 1839 | if (!NILP (HASH_HASH (h, i)) && | 1848 | if (!NILP (HASH_HASH (h, i)) |
| 1840 | EQ (Fcompare_strings (string, make_number (0), Qnil, | 1849 | && EQ (Fcompare_strings (string, make_number (0), Qnil, |
| 1841 | HASH_KEY (h, i), make_number (0) , Qnil, | 1850 | HASH_KEY (h, i), make_number (0) , Qnil, |
| 1842 | completion_ignore_case ? Qt : Qnil), | 1851 | completion_ignore_case ? Qt : Qnil), |
| 1843 | Qt)) | 1852 | Qt)) |
| 1844 | { | 1853 | { |
| 1845 | tem = HASH_KEY (h, i); | 1854 | tem = HASH_KEY (h, i); |
| 1846 | break; | 1855 | break; |
| @@ -1887,7 +1896,7 @@ If the argument FLAG is nil, invoke `try-completion', if it's t, invoke | |||
| 1887 | `all-completions', otherwise invoke `test-completion'. | 1896 | `all-completions', otherwise invoke `test-completion'. |
| 1888 | 1897 | ||
| 1889 | The arguments STRING and PREDICATE are as in `try-completion', | 1898 | The arguments STRING and PREDICATE are as in `try-completion', |
| 1890 | `all-completions', and `test-completion'. */) | 1899 | `all-completions', and `test-completion'. */) |
| 1891 | (Lisp_Object string, Lisp_Object predicate, Lisp_Object flag) | 1900 | (Lisp_Object string, Lisp_Object predicate, Lisp_Object flag) |
| 1892 | { | 1901 | { |
| 1893 | if (NILP (flag)) | 1902 | if (NILP (flag)) |