aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2009-08-12 05:07:48 +0000
committerStefan Monnier2009-08-12 05:07:48 +0000
commit1ac9108a3d6f91efbf9dc479af92d0f46faf30a7 (patch)
treec239abeed9573b080ab721c44a1afd11705b4177 /src
parentcf6e27cf471ef190f74f84659fcea68b38218656 (diff)
downloademacs-1ac9108a3d6f91efbf9dc479af92d0f46faf30a7.tar.gz
emacs-1ac9108a3d6f91efbf9dc479af92d0f46faf30a7.zip
* cmds.c (nonundocount): New global variable.
(keys_of_cmds): Initialize it. (Fself_insert_command): Use it to combine upto 20 sequential chars into a single undo entry, just like the Qself_insert_command code in keyboard.c does. Call frame_make_pointer_invisible, also like the Qself_insert_command code in keyboard.c does. * keyboard.c (command_loop_1): Use the new global nonundocount rather than its own local replacement for it.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog145
-rw-r--r--src/cmds.c36
-rw-r--r--src/keyboard.c6
3 files changed, 107 insertions, 80 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 935555f5b6b..266ebbb0878 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,12 +1,23 @@
12009-08-12 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * cmds.c (nonundocount): New global variable.
4 (keys_of_cmds): Initialize it.
5 (Fself_insert_command): Use it to combine upto 20 sequential chars
6 into a single undo entry, just like the Qself_insert_command code in
7 keyboard.c does.
8 Call frame_make_pointer_invisible, also like the Qself_insert_command
9 code in keyboard.c does.
10 * keyboard.c (command_loop_1): Use the new global nonundocount rather
11 than its own local replacement for it.
12
12009-08-10 Ken Raeburn <raeburn@raeburn.org> 132009-08-10 Ken Raeburn <raeburn@raeburn.org>
2 14
3 * fns.c (concat): Don't re-set string length to its current 15 * fns.c (concat): Don't re-set string length to its current value.
4 value.
5 16
6 * coding.h (decode_coding_string, encode_coding_string): Use 17 * coding.h (decode_coding_string, encode_coding_string):
7 SBYTES macro. 18 Use SBYTES macro.
8 19
9 * doprnt.c (doprnt_lisp): Unused function deleted. 20 * doprnt.c (doprnt_lisp): Delete unused function.
10 (doprnt): Merge with doprnt1, discarding lispstrings code. 21 (doprnt): Merge with doprnt1, discarding lispstrings code.
11 * lisp.h (doprnt_lisp): Don't declare. 22 * lisp.h (doprnt_lisp): Don't declare.
12 23
@@ -62,23 +73,21 @@
62 73
63 * nsfont.m (nsfont_draw): Revert 2009-07-15 change. 74 * nsfont.m (nsfont_draw): Revert 2009-07-15 change.
64 75
65 * nsterm.m (ns_maybe_dumpglyphs_background): Revert 2009-07-15 76 * nsterm.m (ns_maybe_dumpglyphs_background): Revert 2009-07-15 change.
66 change.
67 (ns_get_color): Revert 2009-07-16 change. 77 (ns_get_color): Revert 2009-07-16 change.
68 78
692009-07-25 Eli Zaretskii <eliz@gnu.org> 792009-07-25 Eli Zaretskii <eliz@gnu.org>
70 80
71 * lread.c (syms_of_lread) <force_load_messages>: New variable. 81 * lread.c (syms_of_lread) <force_load_messages>: New variable.
72 (Fload): Use it to force load messages, even if NOMESSAGES is 82 (Fload): Use it to force load messages, even if NOMESSAGES is non-nil.
73 non-nil.
74 83
752009-07-25 Ken Raeburn <raeburn@raeburn.org> 842009-07-25 Ken Raeburn <raeburn@raeburn.org>
76 85
77 * coding.h (decode_coding_string, encode_coding_string): Use 86 * coding.h (decode_coding_string, encode_coding_string):
78 SCHARS macro. 87 Use SCHARS macro.
79 88
80 * lread.c: Rewrite 2009-07-21 changes. 89 * lread.c: Rewrite 2009-07-21 changes.
81 (load_depth): Deleted. 90 (load_depth): Delete.
82 (Qload_in_progress): New variable. 91 (Qload_in_progress): New variable.
83 (load_unwind): Don't reference load_depth or load_in_progress. 92 (load_unwind): Don't reference load_depth or load_in_progress.
84 (Fload): Likewise; specbind Qload_in_progress instead. 93 (Fload): Likewise; specbind Qload_in_progress instead.
@@ -104,8 +113,8 @@
104 113
1052009-07-22 Jason Rumney <jasonr@gnu.org> 1142009-07-22 Jason Rumney <jasonr@gnu.org>
106 115
107 * w32fns.c (w32_wnd_proc) [WM_IME_STARTCOMPOSITION]: Position 116 * w32fns.c (w32_wnd_proc) [WM_IME_STARTCOMPOSITION]:
108 IME window at cursor (Bug#2570). 117 Position IME window at cursor (Bug#2570).
109 (w32_wnd_proc) [WM_IME_CHAR]: Release context when finished. 118 (w32_wnd_proc) [WM_IME_CHAR]: Release context when finished.
110 (globals_of_w32fns): Dynamically load functions required above. 119 (globals_of_w32fns): Dynamically load functions required above.
111 120
@@ -181,16 +190,15 @@
181 (font_delete_unmatched): Likewise. 190 (font_delete_unmatched): Likewise.
182 (font_list_entities): The return type changed. 191 (font_list_entities): The return type changed.
183 (font_select_entity): The format of the second argument changed. 192 (font_select_entity): The format of the second argument changed.
184 (font_find_for_lface): Adjusted for the above changes. Don't 193 (font_find_for_lface): Adjuste for the above changes.
185 suppress the checking of C even if the repertory supports it. 194 Don't suppress the checking of C even if the repertory supports it.
186 (Flist_fonts): Adjusted for the above changes. 195 (Flist_fonts): Adjust for the above changes.
187 196
188 * ftfont.c (ftfont_spec_pattern): New arg langname. Caller 197 * ftfont.c (ftfont_spec_pattern): New arg langname. Change caller.
189 changed. 198 (ftfont_list): Adjust for the change of ftfont_spec_pattern.
190 (ftfont_list): Adjusted for the change of ftfont_spec_pattern.
191 Reject a font who has adstyle property that is different from a 199 Reject a font who has adstyle property that is different from a
192 langname derived from registry property. 200 langname derived from registry property.
193 (ftfont_match): Adjusted for the change of ftfont_spec_pattern. 201 (ftfont_match): Adjust for the change of ftfont_spec_pattern.
194 202
1952009-07-13 Eli Zaretskii <eliz@gnu.org> 2032009-07-13 Eli Zaretskii <eliz@gnu.org>
196 204
@@ -207,10 +215,10 @@
207 215
2082009-07-11 Eli Zaretskii <eliz@gnu.org> 2162009-07-11 Eli Zaretskii <eliz@gnu.org>
209 217
210 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]: New 218 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
211 function. 219 New function.
212 (directory_files_internal) [WINDOWSNT]: Bind 220 (directory_files_internal) [WINDOWSNT]:
213 w32-get-true-file-attributes to either t or nil, depending whether 221 Bind w32-get-true-file-attributes to either t or nil, depending whether
214 the filesystem of the directory is fast or slow. 222 the filesystem of the directory is fast or slow.
215 223
216 * w32.c (logon_network_drive): Don't assume PATH is an absolute 224 * w32.c (logon_network_drive): Don't assume PATH is an absolute
@@ -232,8 +240,7 @@
232 240
2332009-07-09 Eli Zaretskii <eliz@gnu.org> 2412009-07-09 Eli Zaretskii <eliz@gnu.org>
234 242
235 * w32proc.c (syms_of_ntproc) <w32-get-true-file-attributes>: Doc 243 * w32proc.c (syms_of_ntproc) <w32-get-true-file-attributes>: Doc fix.
236 fix.
237 244
238 * w32.c (stat): Treat UNC file names as residing on remote 245 * w32.c (stat): Treat UNC file names as residing on remote
239 drives. (Bug#3542) 246 drives. (Bug#3542)
@@ -284,8 +291,7 @@
284 (multibyte_char_to_unibyte_safe): Likewise. 291 (multibyte_char_to_unibyte_safe): Likewise.
285 (Funibyte_char_to_multibyte): Don't check charset_unibyte. 292 (Funibyte_char_to_multibyte): Don't check charset_unibyte.
286 293
287 * xdisp.c (get_next_display_element): Decode it->c by 294 * xdisp.c (get_next_display_element): Decode it->c by charset_unibyte.
288 charset_unibyte.
289 (x_produce_glyphs): Likewise. 295 (x_produce_glyphs): Likewise.
290 296
291 * .gdbinit (xcharset): Fix the treating $arg0. 297 * .gdbinit (xcharset): Fix the treating $arg0.
@@ -345,8 +351,8 @@
345 (read_avail_input): Call frame_make_pointer_visible. 351 (read_avail_input): Call frame_make_pointer_visible.
346 352
347 * frame.c (Vmake_pointer_invisible): New variable. 353 * frame.c (Vmake_pointer_invisible): New variable.
348 (frame_make_pointer_invisible, frame_make_pointer_visible): New 354 (frame_make_pointer_invisible, frame_make_pointer_visible):
349 functions. 355 New functions.
350 (syms_of_frame): DEFVAR make-pointer-invisible, initialize to Qt. 356 (syms_of_frame): DEFVAR make-pointer-invisible, initialize to Qt.
351 357
352 * frame.h: Declare frame_make_pointer_invisible and 358 * frame.h: Declare frame_make_pointer_invisible and
@@ -365,7 +371,7 @@
365 371
366 * gtkutil.c (xg_frame_set_char_size): Do not set pixel width/height 372 * gtkutil.c (xg_frame_set_char_size): Do not set pixel width/height
367 here or call change_frame_size. Just call flush_and_sync. 373 here or call change_frame_size. Just call flush_and_sync.
368 (flush_and_sync): Reintroduced. 374 (flush_and_sync): Reintroduce.
369 375
3702009-07-01 Jan Djärv <jan.h.d@swipnet.se> 3762009-07-01 Jan Djärv <jan.h.d@swipnet.se>
371 377
@@ -402,8 +408,8 @@
402 (x_set_font, x_figure_window_size): Do not handle fullscreen specially. 408 (x_set_font, x_figure_window_size): Do not handle fullscreen specially.
403 (syms_of_frame): Initialize Qmaximized. 409 (syms_of_frame): Initialize Qmaximized.
404 410
405 * frame.h (fullscreen_type): Add FULLSCREEN_MAXIMIZED. Declare 411 * frame.h (fullscreen_type): Add FULLSCREEN_MAXIMIZED.
406 Qfullwidth, Qfullheight, Qfullboth, Qmaximized. 412 Declare Qfullwidth, Qfullheight, Qfullboth, Qmaximized.
407 413
408 * xterm.c (handle_one_xevent): Remove call to x_check_fullscreen 414 * xterm.c (handle_one_xevent): Remove call to x_check_fullscreen
409 for Expose event. Add call to x_check_fullscreen for MapNotify event. 415 for Expose event. Add call to x_check_fullscreen for MapNotify event.
@@ -421,8 +427,8 @@
421 flush_and_sync. 427 flush_and_sync.
422 (xg_height_changed): New function. 428 (xg_height_changed): New function.
423 (xg_create_frame_widgets): Remove call to gtk_widget_set_size_request 429 (xg_create_frame_widgets): Remove call to gtk_widget_set_size_request
424 and gtk_window_set_policy. Set frame gravity after parsing the geometry 430 and gtk_window_set_policy. Set frame gravity after parsing the
425 string. 431 geometry string.
426 (xg_update_frame_menubar, free_frame_menubar) 432 (xg_update_frame_menubar, free_frame_menubar)
427 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback) 433 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
428 (update_frame_tool_bar, free_frame_tool_bar): Call xg_height_changed. 434 (update_frame_tool_bar, free_frame_tool_bar): Call xg_height_changed.
@@ -433,8 +439,8 @@
433 * keyboard.c (decode_keyboard_code): New function. 439 * keyboard.c (decode_keyboard_code): New function.
434 (tty_read_avail_input): Decode the input bytes if necessary. 440 (tty_read_avail_input): Decode the input bytes if necessary.
435 441
436 * coding.c (setup_coding_system): Initialize 442 * coding.c (setup_coding_system):
437 coding->carryover_bytes to 0. 443 Initialize coding->carryover_bytes to 0.
438 (Fset_keyboard_coding_system_internal): If CODING-SYSTEM is nil, 444 (Fset_keyboard_coding_system_internal): If CODING-SYSTEM is nil,
439 use Qno_conversion. 445 use Qno_conversion.
440 446
@@ -444,8 +450,7 @@
444 450
4452009-06-30 Chong Yidong <cyd@stupidchicken.com> 4512009-06-30 Chong Yidong <cyd@stupidchicken.com>
446 452
447 * xftfont.c (xftfont_open): Avoid passing NULL argument to 453 * xftfont.c (xftfont_open): Avoid passing NULL argument to XftLockFace.
448 XftLockFace.
449 454
4502009-06-30 Jason Rumney <jasonr@gnu.org> 4552009-06-30 Jason Rumney <jasonr@gnu.org>
451 456
@@ -477,8 +482,8 @@
477 482
478 * xdisp.c (start_display, handle_face_prop) 483 * xdisp.c (start_display, handle_face_prop)
479 (move_it_vertically_backward, cursor_row_fully_visible_p) 484 (move_it_vertically_backward, cursor_row_fully_visible_p)
480 (redisplay_window, try_window_id, produce_image_glyph): Delete 485 (redisplay_window, try_window_id, produce_image_glyph):
481 some #ifdef-ed out code chunks that are now obsolete. 486 Delete some #ifdef-ed out code chunks that are now obsolete.
482 487
483 * xterm.c (x_update_window_begin, x_new_focus_frame) 488 * xterm.c (x_update_window_begin, x_new_focus_frame)
484 (x_scroll_bar_handle_click, handle_one_xevent) 489 (x_scroll_bar_handle_click, handle_one_xevent)
@@ -550,8 +555,8 @@
550 555
5512009-06-23 Jim Meyering <meyering@redhat.com> 5562009-06-23 Jim Meyering <meyering@redhat.com>
552 557
553 * src/ftfont.c (setup_otf_gstring, ftfont_shape_by_flt): Use 558 * src/ftfont.c (setup_otf_gstring, ftfont_shape_by_flt):
554 xmalloc and xrealloc (not malloc and realloc), so subsequent heap 559 Use xmalloc and xrealloc (not malloc and realloc), so subsequent heap
555 pointer dereferences are guaranteed to be valid. 560 pointer dereferences are guaranteed to be valid.
556 561
5572009-06-23 Kenichi Handa <handa@m17n.org> 5622009-06-23 Kenichi Handa <handa@m17n.org>
@@ -605,8 +610,7 @@
605 610
6062009-06-21 Chong Yidong <cyd@stupidchicken.com> 6112009-06-21 Chong Yidong <cyd@stupidchicken.com>
607 612
608 * xdisp.c (IT_DISPLAYING_WHITESPACE): Define for 613 * xdisp.c (IT_DISPLAYING_WHITESPACE): Define for !HAVE_WINDOW_SYSTEM.
609 !HAVE_WINDOW_SYSTEM.
610 (move_it_in_display_line_to, move_it_in_display_line_to) 614 (move_it_in_display_line_to, move_it_in_display_line_to)
611 (display_line): Remove #ifdef HAVE_WINDOW_SYSTEM. 615 (display_line): Remove #ifdef HAVE_WINDOW_SYSTEM.
612 616
@@ -635,8 +639,7 @@
635 639
6362009-06-18 Kenichi Handa <handa@m17n.org> 6402009-06-18 Kenichi Handa <handa@m17n.org>
637 641
638 * coding.c (decode_coding_iso_2022): Check MSB of bytes more 642 * coding.c (decode_coding_iso_2022): Check MSB of bytes more rigidly.
639 rigidly.
640 643
6412009-06-18 Andreas Schwab <aschwab@redhat.com> 6442009-06-18 Andreas Schwab <aschwab@redhat.com>
642 645
@@ -760,8 +763,7 @@
760 763
7612009-06-08 Felix Mueller <felix@enqueue.eu> (tiny change) 7642009-06-08 Felix Mueller <felix@enqueue.eu> (tiny change)
762 765
763 * nsterm.m (ns_init_paths): Append path separator to INFOPATH 766 * nsterm.m (ns_init_paths): Append path separator to INFOPATH variable.
764 variable.
765 767
7662009-06-08 Wolfgang Lux <wolfgang.lux@gmail.com> (tiny change) 7682009-06-08 Wolfgang Lux <wolfgang.lux@gmail.com> (tiny change)
767 769
@@ -786,8 +788,8 @@
786 788
7872009-05-29 Kenichi Handa <handa@m17n.org> 7892009-05-29 Kenichi Handa <handa@m17n.org>
788 790
789 * coding.c (get_translation_table): Check 791 * coding.c (get_translation_table):
790 Venable_character_translation. 792 Check Venable_character_translation.
791 793
7922009-05-26 David Reitter <david.reitter@gmail.com> 7942009-05-26 David Reitter <david.reitter@gmail.com>
793 795
@@ -1044,8 +1046,7 @@
1044 1046
1045 * dispnew.c (Fsend_string_to_terminal): Doc fix. 1047 * dispnew.c (Fsend_string_to_terminal): Doc fix.
1046 1048
1047 * data.c (Fterminal_local_value, Fset_terminal_local_value): Doc 1049 * data.c (Fterminal_local_value, Fset_terminal_local_value): Doc fixes.
1048 fixes.
1049 1050
1050 * coding.c (Fterminal_coding_system): Doc fix. 1051 * coding.c (Fterminal_coding_system): Doc fix.
1051 1052
@@ -1055,15 +1056,15 @@
1055 (Fx_server_vendor, Fx_server_version, Fx_display_screens) 1056 (Fx_server_vendor, Fx_server_version, Fx_display_screens)
1056 (Fx_display_mm_height, Fx_display_mm_width) 1057 (Fx_display_mm_height, Fx_display_mm_width)
1057 (Fx_display_backing_store, Fx_display_visual_class) 1058 (Fx_display_backing_store, Fx_display_visual_class)
1058 (Fx_display_save_under, Fx_close_connection, Fx_synchronize): Doc 1059 (Fx_display_save_under, Fx_close_connection, Fx_synchronize):
1059 fixes, replacing "terminal id" with "terminal object". 1060 Doc fixes, replacing "terminal id" with "terminal object".
1060 (check_x_display_info): Handle terminal objects instead of 1061 (check_x_display_info): Handle terminal objects instead of
1061 terminal ids. 1062 terminal ids.
1062 1063
1063 * term.c (Ftty_display_color_p, Ftty_display_color_cells) 1064 * term.c (Ftty_display_color_p, Ftty_display_color_cells)
1064 (Ftty_type, Fcontrolling_tty_p, Ftty_no_underline, Fsuspend_tty) 1065 (Ftty_type, Fcontrolling_tty_p, Ftty_no_underline, Fsuspend_tty)
1065 (Fresume_tty, Vsuspend_tty_functions, Vresume_tty_functions): Doc 1066 (Fresume_tty, Vsuspend_tty_functions, Vresume_tty_functions):
1066 fixes, replacing "terminal id" with "terminal object". 1067 Doc fixes, replacing "terminal id" with "terminal object".
1067 1068
10682009-04-21 Kenichi Handa <handa@m17n.org> 10692009-04-21 Kenichi Handa <handa@m17n.org>
1069 1070
@@ -1072,9 +1073,8 @@
1072 1073
1073 * coding.c (decode_coding_utf_16): Reduce charbuf_end for the 1074 * coding.c (decode_coding_utf_16): Reduce charbuf_end for the
1074 worst case. 1075 worst case.
1075 (decode_coding_emacs_mule, decode_coding_iso_2022) 1076 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
1076 (decode_coding_sjis, decode_coding_big5, decode_coding_charset): 1077 (decode_coding_emacs_mule, decode_coding_iso_2022): Likewise.
1077 Likewise.
1078 1078
10792009-04-19 Jason Rumney <jasonr@gnu.org> 10792009-04-19 Jason Rumney <jasonr@gnu.org>
1080 1080
@@ -1094,8 +1094,8 @@
1094 1094
10952009-04-19 Jan Djärv <jan.h.d@swipnet.se> 10952009-04-19 Jan Djärv <jan.h.d@swipnet.se>
1096 1096
1097 * gtkutil.c (xg_tool_bar_menu_proxy, update_frame_tool_bar): Use 1097 * gtkutil.c (xg_tool_bar_menu_proxy, update_frame_tool_bar):
1098 G_CALLBACK instead of GTK_SIGNAL_FUNC which is deprecated. 1098 Use G_CALLBACK instead of GTK_SIGNAL_FUNC which is deprecated.
1099 (xg_initialize): Use g_type_class_ref instead of gtk_type_class which 1099 (xg_initialize): Use g_type_class_ref instead of gtk_type_class which
1100 is deprecated. 1100 is deprecated.
1101 1101
@@ -1141,8 +1141,7 @@
1141 1141
11422009-04-16 Kenichi Handa <handa@m17n.org> 11422009-04-16 Kenichi Handa <handa@m17n.org>
1143 1143
1144 * xfont.c (xfont_has_char): Special handling of `ja' and `ko' 1144 * xfont.c (xfont_has_char): Special handling of `ja' and `ko' adstyle.
1145 adstyle.
1146 1145
1147 * xftfont.c (xftfont_has_char): Special handling of `ja' and `ko' 1146 * xftfont.c (xftfont_has_char): Special handling of `ja' and `ko'
1148 adstyle. 1147 adstyle.
@@ -1151,8 +1150,8 @@
1151 (enum ftfont_cache_for): New enum. 1150 (enum ftfont_cache_for): New enum.
1152 (fc_charset_table): Undo the previous change. 1151 (fc_charset_table): Undo the previous change.
1153 (ftfont_get_latin1_charset): Delete it. 1152 (ftfont_get_latin1_charset): Delete it.
1154 (ftfont_pattern_entity): Check cache by ftfont_lookup_cache. Set 1153 (ftfont_pattern_entity): Check cache by ftfont_lookup_cache.
1155 FONT_SIZE_INDEX of the entity to 0 for a scalable font. For a 1154 Set FONT_SIZE_INDEX of the entity to 0 for a scalable font. For a
1156 non-scarable font, try to get AVERAGE_WIDTH. 1155 non-scarable font, try to get AVERAGE_WIDTH.
1157 (ftfont_lookup_cache): Argument FOR-FACE is changed to CACHE_FOR. 1156 (ftfont_lookup_cache): Argument FOR-FACE is changed to CACHE_FOR.
1158 Change ft_face_cache from a list of a hash-table. Don't check 1157 Change ft_face_cache from a list of a hash-table. Don't check
@@ -1160,8 +1159,7 @@
1160 (ftfont_get_fc_charset): Call ftfont_lookup_cache with 1159 (ftfont_get_fc_charset): Call ftfont_lookup_cache with
1161 FTFONT_CACHE_FOR_CHARET. 1160 FTFONT_CACHE_FOR_CHARET.
1162 (ftfont_get_charset): Undo the previous change. 1161 (ftfont_get_charset): Undo the previous change.
1163 (ftfont_open): Call ftfont_lookup_cache with 1162 (ftfont_open): Call ftfont_lookup_cache with FTFONT_CACHE_FOR_FACE.
1164 FTFONT_CACHE_FOR_FACE.
1165 (ftfont_close): Likewise. 1163 (ftfont_close): Likewise.
1166 (ftfont_has_char): Special handling of `ja' and `ko' adstyle. 1164 (ftfont_has_char): Special handling of `ja' and `ko' adstyle.
1167 1165
@@ -1220,8 +1218,7 @@
1220 1218
12212009-04-13 Kenichi Handa <handa@m17n.org> 12192009-04-13 Kenichi Handa <handa@m17n.org>
1222 1220
1223 * font.c (font_delete_unmatched): Preserve the order of list 1221 * font.c (font_delete_unmatched): Preserve the order of list elements.
1224 elements.
1225 (font_select_entity): Suppress the code to optimize for the same 1222 (font_select_entity): Suppress the code to optimize for the same
1226 kind of fonts. 1223 kind of fonts.
1227 (font_load_for_lface): Get a font that supports at least ASCII 1224 (font_load_for_lface): Get a font that supports at least ASCII
@@ -1237,8 +1234,7 @@
1237 Delete iso-8859-1 range from the charset of fonts whose adstyle is 1234 Delete iso-8859-1 range from the charset of fonts whose adstyle is
1238 `ko' or `ja'. 1235 `ko' or `ja'.
1239 (ftfont_get_fc_charset): Call ftfont_lookup_cache with ENTITY. 1236 (ftfont_get_fc_charset): Call ftfont_lookup_cache with ENTITY.
1240 (ftfont_get_charset): For iso8859-1, call 1237 (ftfont_get_charset): For iso8859-1, call ftfont_get_latin1_charset.
1241 ftfont_get_latin1_charset.
1242 (ftfont_list): Don't refuse a font spec with non-nil `adstyle' 1238 (ftfont_list): Don't refuse a font spec with non-nil `adstyle'
1243 property. 1239 property.
1244 (ftfont_open): Call ftfont_lookup_cache with ENTITY. 1240 (ftfont_open): Call ftfont_lookup_cache with ENTITY.
@@ -1258,8 +1254,7 @@
1258 * dispnew.c (redraw_overlapping_rows): Fix detection of 1254 * dispnew.c (redraw_overlapping_rows): Fix detection of
1259 overlapping for topmost and bottommost rows. 1255 overlapping for topmost and bottommost rows.
1260 1256
1261 * ftfont.c (ftfont_text_extents): Fix calculation of 1257 * ftfont.c (ftfont_text_extents): Fix calculation of metrics->descent.
1262 metrics->descent.
1263 1258
12642009-04-06 Jason Rumney <jasonr@gnu.org> 12592009-04-06 Jason Rumney <jasonr@gnu.org>
1265 1260
diff --git a/src/cmds.c b/src/cmds.c
index 33472b5710b..c66db7a3f11 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -315,15 +315,42 @@ N was explicitly specified. */)
315 return value; 315 return value;
316} 316}
317 317
318int nonundocount;
319
318/* Note that there's code in command_loop_1 which typically avoids 320/* Note that there's code in command_loop_1 which typically avoids
319 calling this. */ 321 calling this. */
320DEFUN ("self-insert-command", Fself_insert_command, Sself_insert_command, 1, 1, "p", 322DEFUN ("self-insert-command", Fself_insert_command, Sself_insert_command, 1, 1, "p",
321 doc: /* Insert the character you type. 323 doc: /* Insert the character you type.
322Whichever character you type to run this command is inserted. */) 324Whichever character you type to run this command is inserted.
325Before insertion, `expand-abbrev' is executed if the inserted character does
326not have word syntax and the previous character in the buffer does.
327After insertion, the value of `auto-fill-function' is called if the
328`auto-fill-chars' table has a non-nil value for the inserted character. */)
323 (n) 329 (n)
324 Lisp_Object n; 330 Lisp_Object n;
325{ 331{
326 CHECK_NUMBER (n); 332 CHECK_NUMBER (n);
333 int remove_boundary = 1;
334
335 if (!EQ (Vthis_command, current_kboard->Vlast_command))
336 nonundocount = 0;
337
338 if (NILP (Vexecuting_kbd_macro)
339 && !EQ (minibuf_window, selected_window))
340 {
341 if (nonundocount <= 0 || nonundocount >= 20)
342 {
343 remove_boundary = 0;
344 nonundocount = 0;
345 }
346 nonundocount++;
347 }
348
349 if (remove_boundary
350 && CONSP (current_buffer->undo_list)
351 && NILP (XCAR (current_buffer->undo_list)))
352 /* Remove the undo_boundary that was just pushed. */
353 current_buffer->undo_list = XCDR (current_buffer->undo_list);
327 354
328 /* Barf if the key that invoked this was not a character. */ 355 /* Barf if the key that invoked this was not a character. */
329 if (!CHARACTERP (last_command_event)) 356 if (!CHARACTERP (last_command_event))
@@ -353,9 +380,13 @@ Whichever character you type to run this command is inserted. */)
353 else 380 else
354 while (XINT (n) > 0) 381 while (XINT (n) > 0)
355 { 382 {
383 int val;
356 /* Ok since old and new vals both nonneg */ 384 /* Ok since old and new vals both nonneg */
357 XSETFASTINT (n, XFASTINT (n) - 1); 385 XSETFASTINT (n, XFASTINT (n) - 1);
358 internal_self_insert (character, XFASTINT (n) != 0); 386 val = internal_self_insert (character, XFASTINT (n) != 0);
387 if (val == 2)
388 nonundocount = 0;
389 frame_make_pointer_invisible ();
359 } 390 }
360 } 391 }
361 392
@@ -611,6 +642,7 @@ keys_of_cmds ()
611{ 642{
612 int n; 643 int n;
613 644
645 nonundocount = 0;
614 initial_define_key (global_map, Ctl ('I'), "self-insert-command"); 646 initial_define_key (global_map, Ctl ('I'), "self-insert-command");
615 for (n = 040; n < 0177; n++) 647 for (n = 040; n < 0177; n++)
616 initial_define_key (global_map, n, "self-insert-command"); 648 initial_define_key (global_map, n, "self-insert-command");
diff --git a/src/keyboard.c b/src/keyboard.c
index b8714a393ec..a49c6465f41 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1519,12 +1519,13 @@ cancel_hourglass_unwind (arg)
1519} 1519}
1520#endif 1520#endif
1521 1521
1522extern int nonundocount; /* Declared in cmds.c. */
1523
1522Lisp_Object 1524Lisp_Object
1523command_loop_1 () 1525command_loop_1 ()
1524{ 1526{
1525 Lisp_Object cmd; 1527 Lisp_Object cmd;
1526 int lose; 1528 int lose;
1527 int nonundocount;
1528 Lisp_Object keybuf[30]; 1529 Lisp_Object keybuf[30];
1529 int i; 1530 int i;
1530 int prev_modiff = 0; 1531 int prev_modiff = 0;
@@ -1540,7 +1541,6 @@ command_loop_1 ()
1540 waiting_for_input = 0; 1541 waiting_for_input = 0;
1541 cancel_echoing (); 1542 cancel_echoing ();
1542 1543
1543 nonundocount = 0;
1544 this_command_key_count = 0; 1544 this_command_key_count = 0;
1545 this_command_key_count_reset = 0; 1545 this_command_key_count_reset = 0;
1546 this_single_command_key_start = 0; 1546 this_single_command_key_start = 0;
@@ -1898,7 +1898,7 @@ command_loop_1 ()
1898#endif 1898#endif
1899 1899
1900 nonundocount = 0; 1900 nonundocount = 0;
1901 if (NILP (current_kboard->Vprefix_arg)) 1901 if (NILP (current_kboard->Vprefix_arg)) /* FIXME: Why? --Stef */
1902 Fundo_boundary (); 1902 Fundo_boundary ();
1903 Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil); 1903 Fcommand_execute (Vthis_command, Qnil, Qnil, Qnil);
1904 1904