aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-05-20 17:44:36 +0000
committerKaroly Lorentey2005-05-20 17:44:36 +0000
commitb4bb3cbc7caca5c9c207d9ed42cacb978790af67 (patch)
tree6d347dbb4b2db074171d0bbcb89afe851cffe85b /src
parent35bc5d82600f330082298823f09f53259a90ea81 (diff)
parenta18ff9886771c41186eebf8d7984fee2120dbe36 (diff)
downloademacs-b4bb3cbc7caca5c9c207d9ed42cacb978790af67.tar.gz
emacs-b4bb3cbc7caca5c9c207d9ed42cacb978790af67.zip
Merged from miles@gnu.org--gnu-2005 (patch 69, 313-319)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-313 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-314 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-315 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-316 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-317 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-318 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-319 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-69 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-347
Diffstat (limited to 'src')
-rw-r--r--src/.gdbinit38
-rw-r--r--src/ChangeLog22
-rw-r--r--src/keyboard.c45
-rw-r--r--src/unexmacosx.c4
-rw-r--r--src/xdisp.c13
5 files changed, 70 insertions, 52 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index 09c70c9ead8..760822236fe 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -112,21 +112,45 @@ define pitx
112 if ($it->start.pos.charpos != $it->start.pos.bytepos) 112 if ($it->start.pos.charpos != $it->start.pos.bytepos)
113 printf "[%d]", $it->start.pos.bytepos 113 printf "[%d]", $it->start.pos.bytepos
114 end 114 end
115 printf " stop=%d ", $it->stop_charpos 115 printf " end=%d", $it->end_charpos
116 output $it->what 116 printf " stop=%d", $it->stop_charpos
117 printf " face=%d", $it->face_id
118 if ($it->multibyte_p)
119 printf " MB"
120 end
121 if ($it->header_line_p)
122 printf " HL"
123 end
124 if ($it->n_overlay_strings > 0)
125 printf " nov=%d"
126 end
127 if ($it->sp != 0)
128 printf " sp=%d", $it->sp
129 end
117 if ($it->what == IT_CHARACTER) 130 if ($it->what == IT_CHARACTER)
118 if ($it->len == 1 && $it->c >= ' ' && it->c < 255) 131 if ($it->len == 1 && $it->c >= ' ' && it->c < 255)
119 printf "['%c']", $it->c 132 printf "ch='%c'", $it->c
120 else 133 else
121 printf "[%d,%d]", $it->c, $it->len 134 printf "ch=[%d,%d]", $it->c, $it->len
135 end
136 else
137 if ($it->what == IT_IMAGE)
138 printf "IMAGE=%d", $it->image_id
139 else
140 output $it->what
122 end 141 end
123 end 142 end
124 printf " next=" 143 if ($it->method != GET_FROM_BUFFER)
125 output $it->method 144 printf " next="
145 output $it->method
146 end
126 printf "\n" 147 printf "\n"
148 if ($it->region_beg_charpos >= 0)
149 printf "reg=%d-%d ", $it->region_beg_charpos, $it->region_end_charpos
150 end
127 printf "vpos=%d hpos=%d", $it->vpos, $it->hpos, 151 printf "vpos=%d hpos=%d", $it->vpos, $it->hpos,
128 printf " y=%d lvy=%d", $it->current_y, $it->last_visible_y 152 printf " y=%d lvy=%d", $it->current_y, $it->last_visible_y
129 printf " x=%d lvx=%d", $it->current_x, $it->last_visible_x 153 printf " x=%d vx=%d-%d", $it->current_x, $it->first_visible_x, $it->last_visible_x
130 printf " a+d=%d+%d=%d", $it->ascent, $it->descent, $it->ascent+$it->descent 154 printf " a+d=%d+%d=%d", $it->ascent, $it->descent, $it->ascent+$it->descent
131 printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent 155 printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent
132 printf "\n" 156 printf "\n"
diff --git a/src/ChangeLog b/src/ChangeLog
index fd11243cbb0..951bf142541 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,23 @@
12005-05-19 Nick Roberts <nickrob@snap.net.nz>
2
3 * keyboard.c (syms_of_keyboard): Remove lisp variables
4 post-command-idle-hook and post-command-idle-delay.
5 (command_loop_1): Don't try to execute post-command-idle-hook.
6
72005-05-16 Kim F. Storm <storm@cua.dk>
8
9 * xdisp.c (handle_display_prop): Handle empty replacement.
10 (handle_single_display_spec): Return -1 for empty replacement.
11
12 * keyboard.c (adjust_point_for_property): Skip empty overlay string.
13
14 * .gdbinit (pitx): Print more info about iterator.
15
162005-05-16 Andreas Schwab <schwab@suse.de>
17
18 * unexmacosx.c (unexec_realloc): Move declarations before
19 statements.
20
12005-05-14 Richard M. Stallman <rms@gnu.org> 212005-05-14 Richard M. Stallman <rms@gnu.org>
2 22
3 * xdisp.c (message3): Call cancel_echoing. 23 * xdisp.c (message3): Call cancel_echoing.
@@ -18,7 +38,7 @@
18 (Finsert_file_contents): If we read 0 bytes from a special file, 38 (Finsert_file_contents): If we read 0 bytes from a special file,
19 unlock the visited file if we locked it. 39 unlock the visited file if we locked it.
20 (Fmake_symbolic_link, Frecent_auto_save_p): Doc fixes. 40 (Fmake_symbolic_link, Frecent_auto_save_p): Doc fixes.
21 (Ffile_exists_p, Ffile_symlink_p): Doc fixes. 41 (Ffile_exists_p, Ffile_symlink_p): Doc fixes.
22 42
232005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 432005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
24 44
diff --git a/src/keyboard.c b/src/keyboard.c
index 596df7aed79..490593750d3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -446,11 +446,6 @@ Lisp_Object Qecho_area_clear_hook;
446Lisp_Object Qpre_command_hook, Vpre_command_hook; 446Lisp_Object Qpre_command_hook, Vpre_command_hook;
447Lisp_Object Qpost_command_hook, Vpost_command_hook; 447Lisp_Object Qpost_command_hook, Vpost_command_hook;
448Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal; 448Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal;
449/* Hook run after a command if there's no more input soon. */
450Lisp_Object Qpost_command_idle_hook, Vpost_command_idle_hook;
451
452/* Delay time in microseconds before running post-command-idle-hook. */
453EMACS_INT post_command_idle_delay;
454 449
455/* List of deferred actions to be performed at a later time. 450/* List of deferred actions to be performed at a later time.
456 The precise format isn't relevant here; we just check whether it is nil. */ 451 The precise format isn't relevant here; we just check whether it is nil. */
@@ -1432,16 +1427,6 @@ command_loop_1 ()
1432 1427
1433 if (!NILP (Vdeferred_action_list)) 1428 if (!NILP (Vdeferred_action_list))
1434 safe_run_hooks (Qdeferred_action_function); 1429 safe_run_hooks (Qdeferred_action_function);
1435
1436 if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks))
1437 {
1438 if (NILP (Vunread_command_events)
1439 && NILP (Vunread_input_method_events)
1440 && NILP (Vunread_post_input_method_events)
1441 && NILP (Vexecuting_kbd_macro)
1442 && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1)))
1443 safe_run_hooks (Qpost_command_idle_hook);
1444 }
1445 } 1430 }
1446 1431
1447 Vmemory_full = Qnil; 1432 Vmemory_full = Qnil;
@@ -1807,16 +1792,6 @@ command_loop_1 ()
1807 if (!NILP (Vdeferred_action_list)) 1792 if (!NILP (Vdeferred_action_list))
1808 safe_run_hooks (Qdeferred_action_function); 1793 safe_run_hooks (Qdeferred_action_function);
1809 1794
1810 if (!NILP (Vpost_command_idle_hook) && !NILP (Vrun_hooks))
1811 {
1812 if (NILP (Vunread_command_events)
1813 && NILP (Vunread_input_method_events)
1814 && NILP (Vunread_post_input_method_events)
1815 && NILP (Vexecuting_kbd_macro)
1816 && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1)))
1817 safe_run_hooks (Qpost_command_idle_hook);
1818 }
1819
1820 /* If there is a prefix argument, 1795 /* If there is a prefix argument,
1821 1) We don't want Vlast_command to be ``universal-argument'' 1796 1) We don't want Vlast_command to be ``universal-argument''
1822 (that would be dumb), so don't set Vlast_command, 1797 (that would be dumb), so don't set Vlast_command,
@@ -1932,10 +1907,13 @@ adjust_point_for_property (last_pt, modified)
1932 ? get_property_and_range (PT, Qdisplay, &val, &beg, &end, Qnil) 1907 ? get_property_and_range (PT, Qdisplay, &val, &beg, &end, Qnil)
1933 : (beg = OVERLAY_POSITION (OVERLAY_START (overlay)), 1908 : (beg = OVERLAY_POSITION (OVERLAY_START (overlay)),
1934 end = OVERLAY_POSITION (OVERLAY_END (overlay)))) 1909 end = OVERLAY_POSITION (OVERLAY_END (overlay))))
1935 && beg < PT) /* && end > PT <- It's always the case. */ 1910 && (beg < PT /* && end > PT <- It's always the case. */
1911 || (beg <= PT && STRINGP (val) && SCHARS (val) == 0)))
1936 { 1912 {
1937 xassert (end > PT); 1913 xassert (end > PT);
1938 SET_PT (PT < last_pt ? beg : end); 1914 SET_PT (PT < last_pt
1915 ? (STRINGP (val) && SCHARS (val) == 0 ? beg - 1 : beg)
1916 : end);
1939 check_composition = check_invisible = 1; 1917 check_composition = check_invisible = 1;
1940 } 1918 }
1941 check_display = 0; 1919 check_display = 0;
@@ -10987,9 +10965,6 @@ syms_of_keyboard ()
10987 Qpost_command_hook = intern ("post-command-hook"); 10965 Qpost_command_hook = intern ("post-command-hook");
10988 staticpro (&Qpost_command_hook); 10966 staticpro (&Qpost_command_hook);
10989 10967
10990 Qpost_command_idle_hook = intern ("post-command-idle-hook");
10991 staticpro (&Qpost_command_idle_hook);
10992
10993 Qdeferred_action_function = intern ("deferred-action-function"); 10968 Qdeferred_action_function = intern ("deferred-action-function");
10994 staticpro (&Qdeferred_action_function); 10969 staticpro (&Qdeferred_action_function);
10995 10970
@@ -11435,16 +11410,6 @@ the hook value is set to nil, since otherwise the error
11435might happen repeatedly and make Emacs nonfunctional. */); 11410might happen repeatedly and make Emacs nonfunctional. */);
11436 Vpost_command_hook = Qnil; 11411 Vpost_command_hook = Qnil;
11437 11412
11438 DEFVAR_LISP ("post-command-idle-hook", &Vpost_command_idle_hook,
11439 doc: /* Normal hook run after each command is executed, if idle.
11440Errors running the hook are caught and ignored. */);
11441 Vpost_command_idle_hook = Qnil;
11442
11443 DEFVAR_INT ("post-command-idle-delay", &post_command_idle_delay,
11444 doc: /* Delay time before running `post-command-idle-hook'.
11445This is measured in microseconds. */);
11446 post_command_idle_delay = 100000;
11447
11448#if 0 11413#if 0
11449 DEFVAR_LISP ("echo-area-clear-hook", ..., 11414 DEFVAR_LISP ("echo-area-clear-hook", ...,
11450 doc: /* Normal hook run when clearing the echo area. */); 11415 doc: /* Normal hook run when clearing the echo area. */);
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index fc369eab7cd..e54dbea448c 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -1,5 +1,5 @@
1/* Dump Emacs in Mach-O format for use on Mac OS X. 1/* Dump Emacs in Mach-O format for use on Mac OS X.
2 Copyright (C) 2001, 2002 Free Software Foundation, Inc. 2 Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -1069,10 +1069,10 @@ unexec_realloc (void *old_ptr, size_t new_size)
1069 1069
1070 if (ptr_in_unexec_regions (old_ptr)) 1070 if (ptr_in_unexec_regions (old_ptr))
1071 { 1071 {
1072 p = (size_t *) malloc (new_size);
1073 size_t old_size = ((unexec_malloc_header_t *) old_ptr)[-1].u.size; 1072 size_t old_size = ((unexec_malloc_header_t *) old_ptr)[-1].u.size;
1074 size_t size = new_size > old_size ? old_size : new_size; 1073 size_t size = new_size > old_size ? old_size : new_size;
1075 1074
1075 p = (size_t *) malloc (new_size);
1076 if (size) 1076 if (size)
1077 memcpy (p, old_ptr, size); 1077 memcpy (p, old_ptr, size);
1078 } 1078 }
diff --git a/src/xdisp.c b/src/xdisp.c
index 7d4ac6916fa..6bde1970bf3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3458,7 +3458,10 @@ handle_display_prop (it)
3458 } 3458 }
3459 else 3459 else
3460 { 3460 {
3461 if (handle_single_display_spec (it, prop, object, position, 0)) 3461 int ret = handle_single_display_spec (it, prop, object, position, 0);
3462 if (ret < 0) /* Replaced by "", i.e. nothing. */
3463 return HANDLED_RECOMPUTE_PROPS;
3464 if (ret)
3462 display_replaced_p = 1; 3465 display_replaced_p = 1;
3463 } 3466 }
3464 3467
@@ -3502,7 +3505,8 @@ display_prop_end (it, object, start_pos)
3502 property ends. 3505 property ends.
3503 3506
3504 Value is non-zero if something was found which replaces the display 3507 Value is non-zero if something was found which replaces the display
3505 of buffer or string text. */ 3508 of buffer or string text. Specifically, the value is -1 if that
3509 "something" is "nothing". */
3506 3510
3507static int 3511static int
3508handle_single_display_spec (it, spec, object, position, 3512handle_single_display_spec (it, spec, object, position,
@@ -3816,6 +3820,11 @@ handle_single_display_spec (it, spec, object, position,
3816 3820
3817 if (STRINGP (value)) 3821 if (STRINGP (value))
3818 { 3822 {
3823 if (SCHARS (value) == 0)
3824 {
3825 pop_it (it);
3826 return -1; /* Replaced by "", i.e. nothing. */
3827 }
3819 it->string = value; 3828 it->string = value;
3820 it->multibyte_p = STRING_MULTIBYTE (it->string); 3829 it->multibyte_p = STRING_MULTIBYTE (it->string);
3821 it->current.overlay_string_index = -1; 3830 it->current.overlay_string_index = -1;