aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2006-02-01 10:07:17 +0000
committerMiles Bader2006-02-01 10:07:17 +0000
commit06eb776d8e80eaed0f6b04349dbd4df9292131d9 (patch)
treef8f308fcd75d052e99c7e176efc100c8488fda7f /src
parentdb856169c248b363fe3dc5ee4e8b1dd18c3a05a2 (diff)
parent46e8fe3d6ce114ae3ecd41f7add9ed7f0c13f4b6 (diff)
downloademacs-06eb776d8e80eaed0f6b04349dbd4df9292131d9.tar.gz
emacs-06eb776d8e80eaed0f6b04349dbd4df9292131d9.zip
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-9
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 16-33) - Update from CVS - Install ERC. - Fix ERC compiler warnings. - Use utf-8 encoding in ERC ChangeLogs. - Merge ERC-related Viper hacks into Viper. - Merge from erc--main--0 - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 8-13) - Merge from emacs--devo--0 - Update from CVS
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog57
-rw-r--r--src/alloc.c83
-rw-r--r--src/callproc.c22
-rw-r--r--src/cmds.c23
-rw-r--r--src/data.c13
-rw-r--r--src/dired.c3
-rw-r--r--src/editfns.c60
-rw-r--r--src/frame.c15
-rw-r--r--src/gtkutil.c64
-rw-r--r--src/keymap.c2
-rw-r--r--src/window.c6
-rw-r--r--src/xfns.c8
12 files changed, 268 insertions, 88 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 0a77c8fff3b..cce484a0e3a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,60 @@
12006-01-31 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * gtkutil.c (update_frame_tool_bar): Use new tool bar functions
4 (gtk_toolbar_insert) so we can have tool bars of different sizes.
5
62006-01-30 Luc Teirlinck <teirllm@auburn.edu>
7
8 * data.c (Flistp): Doc fix.
9
102006-01-30 Juanma Barranquero <lekktu@gmail.com>
11
12 * window.c (Fother_window, Fwindow_vscroll, Fset_window_vscroll):
13 Fix typos in docstrings.
14
152006-01-28 Luc Teirlinck <teirllm@auburn.edu>
16
17 * data.c (Fcar, Fcdr): Add links to Elisp manual to the docstrings.
18
192006-01-27 Chong Yidong <cyd@stupidchicken.com>
20
21 * alloc.c (make_interval, allocate_string)
22 (allocate_string_data, make_float, Fcons, allocate_vectorlike)
23 (Fmake_symbol, allocate_misc): Use BLOCK_INPUT when accessing
24 global variables.
25
262006-01-27 Eli Zaretskii <eliz@gnu.org>
27
28 * dired.c (DIRENTRY_NONEMPTY) [__CYGWIN__]: Don't use d_ino; use
29 the MSDOS definition.
30
312006-01-26 Richard M. Stallman <rms@gnu.org>
32
33 * alloc.c (check_pure_size): Make overflow message an "error message".
34
35 * keymap.c (Fmap_keymap): Doc fix.
36
37 * xfns.c (Fx_create_frame): Put all specified parms into f->param_alist
38 unless they were cleared out.
39
40 * frame.c (x_get_arg): "Clear out" the parm in ALIST if found there.
41
422006-01-26 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu>
43
44 * editfns.c (Fconstrain_to_field): Fix behaviour on field boundaries.
45 (find_field): Set before_field to after_field when pos is at BEGV.
46 (Fline_beginning_position, Fline_end_position): Clarify
47 confusing doc string.
48
49 * cmds.c (Fbeginning_of_line, Fend_of_line): Clarify confusing doc
50 string.
51
522006-01-26 Kenichi Handa <handa@m17n.org>
53
54 * callproc.c (Fcall_process): GCPRO error_file. Encode infile,
55 current_dir, and error_file. On reporting an error, decode them
56 back.
57
12006-01-24 Stefan Monnier <monnier@iro.umontreal.ca> 582006-01-24 Stefan Monnier <monnier@iro.umontreal.ca>
2 59
3 * regex.c (IMMEDIATE_QUIT_CHECK): Use it with SYNC_INPUT as well. 60 * regex.c (IMMEDIATE_QUIT_CHECK): Use it with SYNC_INPUT as well.
diff --git a/src/alloc.c b/src/alloc.c
index 48065382480..3d87710c772 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1422,7 +1422,11 @@ make_interval ()
1422{ 1422{
1423 INTERVAL val; 1423 INTERVAL val;
1424 1424
1425 eassert (!handling_signal); 1425 /* eassert (!handling_signal); */
1426
1427#ifndef SYNC_INPUT
1428 BLOCK_INPUT;
1429#endif
1426 1430
1427 if (interval_free_list) 1431 if (interval_free_list)
1428 { 1432 {
@@ -1445,6 +1449,11 @@ make_interval ()
1445 } 1449 }
1446 val = &interval_block->intervals[interval_block_index++]; 1450 val = &interval_block->intervals[interval_block_index++];
1447 } 1451 }
1452
1453#ifndef SYNC_INPUT
1454 UNBLOCK_INPUT;
1455#endif
1456
1448 consing_since_gc += sizeof (struct interval); 1457 consing_since_gc += sizeof (struct interval);
1449 intervals_consed++; 1458 intervals_consed++;
1450 RESET_INTERVAL (val); 1459 RESET_INTERVAL (val);
@@ -1842,7 +1851,11 @@ allocate_string ()
1842{ 1851{
1843 struct Lisp_String *s; 1852 struct Lisp_String *s;
1844 1853
1845 eassert (!handling_signal); 1854 /* eassert (!handling_signal); */
1855
1856#ifndef SYNC_INPUT
1857 BLOCK_INPUT;
1858#endif
1846 1859
1847 /* If the free-list is empty, allocate a new string_block, and 1860 /* If the free-list is empty, allocate a new string_block, and
1848 add all the Lisp_Strings in it to the free-list. */ 1861 add all the Lisp_Strings in it to the free-list. */
@@ -1873,6 +1886,10 @@ allocate_string ()
1873 s = string_free_list; 1886 s = string_free_list;
1874 string_free_list = NEXT_FREE_LISP_STRING (s); 1887 string_free_list = NEXT_FREE_LISP_STRING (s);
1875 1888
1889#ifndef SYNC_INPUT
1890 UNBLOCK_INPUT;
1891#endif
1892
1876 /* Probably not strictly necessary, but play it safe. */ 1893 /* Probably not strictly necessary, but play it safe. */
1877 bzero (s, sizeof *s); 1894 bzero (s, sizeof *s);
1878 1895
@@ -1920,6 +1937,12 @@ allocate_string_data (s, nchars, nbytes)
1920 /* Determine the number of bytes needed to store NBYTES bytes 1937 /* Determine the number of bytes needed to store NBYTES bytes
1921 of string data. */ 1938 of string data. */
1922 needed = SDATA_SIZE (nbytes); 1939 needed = SDATA_SIZE (nbytes);
1940 old_data = s->data ? SDATA_OF_STRING (s) : NULL;
1941 old_nbytes = GC_STRING_BYTES (s);
1942
1943#ifndef SYNC_INPUT
1944 BLOCK_INPUT;
1945#endif
1923 1946
1924 if (nbytes > LARGE_STRING_BYTES) 1947 if (nbytes > LARGE_STRING_BYTES)
1925 { 1948 {
@@ -1974,12 +1997,13 @@ allocate_string_data (s, nchars, nbytes)
1974 else 1997 else
1975 b = current_sblock; 1998 b = current_sblock;
1976 1999
1977 old_data = s->data ? SDATA_OF_STRING (s) : NULL;
1978 old_nbytes = GC_STRING_BYTES (s);
1979
1980 data = b->next_free; 2000 data = b->next_free;
1981 b->next_free = (struct sdata *) ((char *) data + needed + GC_STRING_EXTRA); 2001 b->next_free = (struct sdata *) ((char *) data + needed + GC_STRING_EXTRA);
1982 2002
2003#ifndef SYNC_INPUT
2004 UNBLOCK_INPUT;
2005#endif
2006
1983 data->string = s; 2007 data->string = s;
1984 s->data = SDATA_DATA (data); 2008 s->data = SDATA_DATA (data);
1985#ifdef GC_CHECK_STRING_BYTES 2009#ifdef GC_CHECK_STRING_BYTES
@@ -2560,7 +2584,11 @@ make_float (float_value)
2560{ 2584{
2561 register Lisp_Object val; 2585 register Lisp_Object val;
2562 2586
2563 eassert (!handling_signal); 2587 /* eassert (!handling_signal); */
2588
2589#ifndef SYNC_INPUT
2590 BLOCK_INPUT;
2591#endif
2564 2592
2565 if (float_free_list) 2593 if (float_free_list)
2566 { 2594 {
@@ -2587,6 +2615,10 @@ make_float (float_value)
2587 float_block_index++; 2615 float_block_index++;
2588 } 2616 }
2589 2617
2618#ifndef SYNC_INPUT
2619 UNBLOCK_INPUT;
2620#endif
2621
2590 XFLOAT_DATA (val) = float_value; 2622 XFLOAT_DATA (val) = float_value;
2591 eassert (!FLOAT_MARKED_P (XFLOAT (val))); 2623 eassert (!FLOAT_MARKED_P (XFLOAT (val)));
2592 consing_since_gc += sizeof (struct Lisp_Float); 2624 consing_since_gc += sizeof (struct Lisp_Float);
@@ -2681,7 +2713,11 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0,
2681{ 2713{
2682 register Lisp_Object val; 2714 register Lisp_Object val;
2683 2715
2684 eassert (!handling_signal); 2716 /* eassert (!handling_signal); */
2717
2718#ifndef SYNC_INPUT
2719 BLOCK_INPUT;
2720#endif
2685 2721
2686 if (cons_free_list) 2722 if (cons_free_list)
2687 { 2723 {
@@ -2707,6 +2743,10 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0,
2707 cons_block_index++; 2743 cons_block_index++;
2708 } 2744 }
2709 2745
2746#ifndef SYNC_INPUT
2747 UNBLOCK_INPUT;
2748#endif
2749
2710 XSETCAR (val, car); 2750 XSETCAR (val, car);
2711 XSETCDR (val, cdr); 2751 XSETCDR (val, cdr);
2712 eassert (!CONS_MARKED_P (XCONS (val))); 2752 eassert (!CONS_MARKED_P (XCONS (val)));
@@ -2880,8 +2920,17 @@ allocate_vectorlike (len, type)
2880 consing_since_gc += nbytes; 2920 consing_since_gc += nbytes;
2881 vector_cells_consed += len; 2921 vector_cells_consed += len;
2882 2922
2923#ifndef SYNC_INPUT
2924 BLOCK_INPUT;
2925#endif
2926
2883 p->next = all_vectors; 2927 p->next = all_vectors;
2884 all_vectors = p; 2928 all_vectors = p;
2929
2930#ifndef SYNC_INPUT
2931 UNBLOCK_INPUT;
2932#endif
2933
2885 ++n_vectors; 2934 ++n_vectors;
2886 return p; 2935 return p;
2887} 2936}
@@ -3119,6 +3168,10 @@ Its value and function definition are void, and its property list is nil. */)
3119 3168
3120 eassert (!handling_signal); 3169 eassert (!handling_signal);
3121 3170
3171#ifndef SYNC_INPUT
3172 BLOCK_INPUT;
3173#endif
3174
3122 if (symbol_free_list) 3175 if (symbol_free_list)
3123 { 3176 {
3124 XSETSYMBOL (val, symbol_free_list); 3177 XSETSYMBOL (val, symbol_free_list);
@@ -3140,6 +3193,10 @@ Its value and function definition are void, and its property list is nil. */)
3140 symbol_block_index++; 3193 symbol_block_index++;
3141 } 3194 }
3142 3195
3196#ifndef SYNC_INPUT
3197 UNBLOCK_INPUT;
3198#endif
3199
3143 p = XSYMBOL (val); 3200 p = XSYMBOL (val);
3144 p->xname = name; 3201 p->xname = name;
3145 p->plist = Qnil; 3202 p->plist = Qnil;
@@ -3199,7 +3256,11 @@ allocate_misc ()
3199{ 3256{
3200 Lisp_Object val; 3257 Lisp_Object val;
3201 3258
3202 eassert (!handling_signal); 3259 /* eassert (!handling_signal); */
3260
3261#ifndef SYNC_INPUT
3262 BLOCK_INPUT;
3263#endif
3203 3264
3204 if (marker_free_list) 3265 if (marker_free_list)
3205 { 3266 {
@@ -3223,6 +3284,10 @@ allocate_misc ()
3223 marker_block_index++; 3284 marker_block_index++;
3224 } 3285 }
3225 3286
3287#ifndef SYNC_INPUT
3288 UNBLOCK_INPUT;
3289#endif
3290
3226 --total_free_markers; 3291 --total_free_markers;
3227 consing_since_gc += sizeof (union Lisp_Misc); 3292 consing_since_gc += sizeof (union Lisp_Misc);
3228 misc_objects_consed++; 3293 misc_objects_consed++;
@@ -4616,7 +4681,7 @@ void
4616check_pure_size () 4681check_pure_size ()
4617{ 4682{
4618 if (pure_bytes_used_before_overflow) 4683 if (pure_bytes_used_before_overflow)
4619 message ("Pure Lisp storage overflow (approx. %d bytes needed)", 4684 message ("emacs:0:Pure Lisp storage overflow (approx. %d bytes needed)",
4620 (int) (pure_bytes_used + pure_bytes_used_before_overflow)); 4685 (int) (pure_bytes_used + pure_bytes_used_before_overflow));
4621} 4686}
4622 4687
diff --git a/src/callproc.c b/src/callproc.c
index 128bf8825e6..9e7ab915a97 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -355,11 +355,11 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
355 protected by the caller, so all we really have to worry about is 355 protected by the caller, so all we really have to worry about is
356 buffer. */ 356 buffer. */
357 { 357 {
358 struct gcpro gcpro1, gcpro2, gcpro3; 358 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
359 359
360 current_dir = current_buffer->directory; 360 current_dir = current_buffer->directory;
361 361
362 GCPRO3 (infile, buffer, current_dir); 362 GCPRO4 (infile, buffer, current_dir, error_file);
363 363
364 current_dir 364 current_dir
365 = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir), 365 = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir),
@@ -368,6 +368,12 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
368 report_file_error ("Setting current directory", 368 report_file_error ("Setting current directory",
369 Fcons (current_buffer->directory, Qnil)); 369 Fcons (current_buffer->directory, Qnil));
370 370
371 if (STRING_MULTIBYTE (infile))
372 infile = ENCODE_FILE (infile);
373 if (STRING_MULTIBYTE (current_dir))
374 current_dir = ENCODE_FILE (current_dir);
375 if (STRINGP (error_file) && STRING_MULTIBYTE (error_file))
376 error_file = ENCODE_FILE (error_file);
371 UNGCPRO; 377 UNGCPRO;
372 } 378 }
373 379
@@ -376,6 +382,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
376 filefd = emacs_open (SDATA (infile), O_RDONLY, 0); 382 filefd = emacs_open (SDATA (infile), O_RDONLY, 0);
377 if (filefd < 0) 383 if (filefd < 0)
378 { 384 {
385 infile = DECODE_FILE (infile);
379 report_file_error ("Opening process input file", Fcons (infile, Qnil)); 386 report_file_error ("Opening process input file", Fcons (infile, Qnil));
380 } 387 }
381 /* Search for program; barf if not found. */ 388 /* Search for program; barf if not found. */
@@ -529,14 +536,13 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */)
529#ifdef MSDOS 536#ifdef MSDOS
530 unlink (tempfile); 537 unlink (tempfile);
531#endif 538#endif
532 report_file_error ("Cannot redirect stderr", 539 if (NILP (error_file))
533 Fcons ((NILP (error_file) 540 error_file = build_string (NULL_DEVICE);
534 ? build_string (NULL_DEVICE) : error_file), 541 else if (STRINGP (error_file))
535 Qnil)); 542 error_file = DECODE_FILE (error_file);
543 report_file_error ("Cannot redirect stderr", Fcons (error_file, Qnil));
536 } 544 }
537 545
538 current_dir = ENCODE_FILE (current_dir);
539
540#ifdef MAC_OS8 546#ifdef MAC_OS8
541 { 547 {
542 /* Call run_mac_command in sysdep.c here directly instead of doing 548 /* Call run_mac_command in sysdep.c here directly instead of doing
diff --git a/src/cmds.c b/src/cmds.c
index 0b1ea9857ca..c8e7881a9fc 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -157,13 +157,13 @@ DEFUN ("beginning-of-line", Fbeginning_of_line, Sbeginning_of_line, 0, 1, "p",
157With argument N not nil or 1, move forward N - 1 lines first. 157With argument N not nil or 1, move forward N - 1 lines first.
158If point reaches the beginning or end of buffer, it stops there. 158If point reaches the beginning or end of buffer, it stops there.
159 159
160This command does not move point across a field boundary unless doing so 160This function constrains point to the current field unless this moves
161would move beyond there to a different line; If N is nil or 1, and point 161point to a different line than the original, unconstrained result. If
162starts at a field boundary, point does not move. To ignore field 162N is nil or 1, and a front-sticky field starts at point, the point
163boundaries, either bind `inhibit-field-text-motion' to t, or use the 163does not move. To ignore field boundaries bind
164`forward-line' function instead. For instance, `(forward-line 0)' does 164`inhibit-field-text-motion' to t, or use the `forward-line' function
165the same thing as `(beginning-of-line)', except that it ignores field 165instead. For instance, `(forward-line 0)' does the same thing as
166boundaries. */) 166`(beginning-of-line)', except that it ignores field boundaries. */)
167 (n) 167 (n)
168 Lisp_Object n; 168 Lisp_Object n;
169{ 169{
@@ -183,10 +183,11 @@ With argument N not nil or 1, move forward N - 1 lines first.
183If point reaches the beginning or end of buffer, it stops there. 183If point reaches the beginning or end of buffer, it stops there.
184To ignore intangibility, bind `inhibit-point-motion-hooks' to t. 184To ignore intangibility, bind `inhibit-point-motion-hooks' to t.
185 185
186This command does not move point across a field boundary unless doing so 186This function constrains point to the current field unless this moves
187would move beyond there to a different line; if N is nil or 1, and 187point to a different line than the original, unconstrained result. If
188point starts at a field boundary, point does not move. To ignore field 188N is nil or 1, and a rear-sticky field ends at point, the point does
189boundaries bind `inhibit-field-text-motion' to t. */) 189not move. To ignore field boundaries bind `inhibit-field-text-motion'
190to t. */)
190 (n) 191 (n)
191 Lisp_Object n; 192 Lisp_Object n;
192{ 193{
diff --git a/src/data.c b/src/data.c
index 78e52d8d51c..472aff990b1 100644
--- a/src/data.c
+++ b/src/data.c
@@ -274,7 +274,8 @@ DEFUN ("atom", Fatom, Satom, 1, 1, 0,
274} 274}
275 275
276DEFUN ("listp", Flistp, Slistp, 1, 1, 0, 276DEFUN ("listp", Flistp, Slistp, 1, 1, 0,
277 doc: /* Return t if OBJECT is a list. This includes nil. */) 277 doc: /* Return t if OBJECT is a list, that is, a cons cell or nil.
278Otherwise, return nil. */)
278 (object) 279 (object)
279 Lisp_Object object; 280 Lisp_Object object;
280{ 281{
@@ -521,7 +522,10 @@ DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0,
521 522
522DEFUN ("car", Fcar, Scar, 1, 1, 0, 523DEFUN ("car", Fcar, Scar, 1, 1, 0,
523 doc: /* Return the car of LIST. If arg is nil, return nil. 524 doc: /* Return the car of LIST. If arg is nil, return nil.
524Error if arg is not nil and not a cons cell. See also `car-safe'. */) 525Error if arg is not nil and not a cons cell. See also `car-safe'.
526
527See Info node `(elisp)Cons Cells' for a discussion of related basic
528Lisp concepts such as car, cdr, cons cell and list. */)
525 (list) 529 (list)
526 register Lisp_Object list; 530 register Lisp_Object list;
527{ 531{
@@ -549,7 +553,10 @@ DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0,
549 553
550DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, 554DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0,
551 doc: /* Return the cdr of LIST. If arg is nil, return nil. 555 doc: /* Return the cdr of LIST. If arg is nil, return nil.
552Error if arg is not nil and not a cons cell. See also `cdr-safe'. */) 556Error if arg is not nil and not a cons cell. See also `cdr-safe'.
557
558See Info node `(elisp)Cons Cells' for a discussion of related basic
559Lisp concepts such as cdr, car, cons cell and list. */)
553 (list) 560 (list)
554 register Lisp_Object list; 561 register Lisp_Object list;
555{ 562{
diff --git a/src/dired.c b/src/dired.c
index 650600b278e..f735c8189d6 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -85,7 +85,8 @@ extern struct direct *readdir ();
85#endif /* not MSDOS */ 85#endif /* not MSDOS */
86#endif /* not SYSV_SYSTEM_DIR */ 86#endif /* not SYSV_SYSTEM_DIR */
87 87
88#ifdef MSDOS 88/* Some versions of Cygwin don't have d_ino in `struct dirent'. */
89#if defined(MSDOS) || defined(__CYGWIN__)
89#define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != 0) 90#define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != 0)
90#else 91#else
91#define DIRENTRY_NONEMPTY(p) ((p)->d_ino) 92#define DIRENTRY_NONEMPTY(p) ((p)->d_ino)
diff --git a/src/editfns.c b/src/editfns.c
index c2f73bdea6a..073ee4bff80 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -524,7 +524,9 @@ find_field (pos, merge_at_boundary, beg_limit, beg, end_limit, end)
524 = (XFASTINT (pos) > BEGV 524 = (XFASTINT (pos) > BEGV
525 ? get_char_property_and_overlay (make_number (XINT (pos) - 1), 525 ? get_char_property_and_overlay (make_number (XINT (pos) - 1),
526 Qfield, Qnil, NULL) 526 Qfield, Qnil, NULL)
527 : Qnil); 527 /* Using nil here would be a more obvious choice, but it would
528 fail when the buffer starts with a non-sticky field. */
529 : after_field);
528 530
529 /* See if we need to handle the case where MERGE_AT_BOUNDARY is nil 531 /* See if we need to handle the case where MERGE_AT_BOUNDARY is nil
530 and POS is at beginning of a field, which can also be interpreted 532 and POS is at beginning of a field, which can also be interpreted
@@ -715,7 +717,8 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
715{ 717{
716 /* If non-zero, then the original point, before re-positioning. */ 718 /* If non-zero, then the original point, before re-positioning. */
717 int orig_point = 0; 719 int orig_point = 0;
718 720 int fwd, prev_old, prev_new;
721
719 if (NILP (new_pos)) 722 if (NILP (new_pos))
720 /* Use the current point, and afterwards, set it. */ 723 /* Use the current point, and afterwards, set it. */
721 { 724 {
@@ -723,23 +726,40 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
723 XSETFASTINT (new_pos, PT); 726 XSETFASTINT (new_pos, PT);
724 } 727 }
725 728
729 CHECK_NUMBER_COERCE_MARKER (new_pos);
730 CHECK_NUMBER_COERCE_MARKER (old_pos);
731
732 fwd = (XFASTINT (new_pos) > XFASTINT (old_pos));
733
734 prev_old = make_number (XFASTINT (old_pos) - 1);
735 prev_new = make_number (XFASTINT (new_pos) - 1);
736
726 if (NILP (Vinhibit_field_text_motion) 737 if (NILP (Vinhibit_field_text_motion)
727 && !EQ (new_pos, old_pos) 738 && !EQ (new_pos, old_pos)
728 && (!NILP (Fget_char_property (new_pos, Qfield, Qnil)) 739 && (!NILP (Fget_text_property (new_pos, Qfield, Qnil))
729 || !NILP (Fget_char_property (old_pos, Qfield, Qnil))) 740 || !NILP (Fget_text_property (old_pos, Qfield, Qnil))
741 /* To recognize field boundaries, we must also look at the
742 previous positions; we could use `get_pos_property'
743 instead, but in itself that would fail inside non-sticky
744 fields (like comint prompts). */
745 || (XFASTINT (new_pos) > BEGV
746 && !NILP (Fget_text_property (prev_new, Qfield, Qnil)))
747 || (XFASTINT (old_pos) > BEGV
748 && !NILP (Fget_text_property (prev_old, Qfield, Qnil))))
730 && (NILP (inhibit_capture_property) 749 && (NILP (inhibit_capture_property)
731 || NILP (Fget_char_property(old_pos, inhibit_capture_property, Qnil)))) 750 /* Field boundaries are again a problem; but now we must
732 /* NEW_POS is not within the same field as OLD_POS; try to 751 decide the case exactly, so we need to call
733 move NEW_POS so that it is. */ 752 `get_pos_property' as well. */
753 || (NILP (get_pos_property (old_pos, inhibit_capture_property, Qnil))
754 && (XFASTINT (old_pos) <= BEGV
755 || NILP (Fget_text_property (old_pos, inhibit_capture_property, Qnil))
756 || NILP (Fget_text_property (prev_old, inhibit_capture_property, Qnil))))))
757 /* It is possible that NEW_POS is not within the same field as
758 OLD_POS; try to move NEW_POS so that it is. */
734 { 759 {
735 int fwd, shortage; 760 int shortage;
736 Lisp_Object field_bound; 761 Lisp_Object field_bound;
737 762
738 CHECK_NUMBER_COERCE_MARKER (new_pos);
739 CHECK_NUMBER_COERCE_MARKER (old_pos);
740
741 fwd = (XFASTINT (new_pos) > XFASTINT (old_pos));
742
743 if (fwd) 763 if (fwd)
744 field_bound = Ffield_end (old_pos, escape_from_edge, new_pos); 764 field_bound = Ffield_end (old_pos, escape_from_edge, new_pos);
745 else 765 else
@@ -780,9 +800,10 @@ DEFUN ("line-beginning-position",
780With argument N not nil or 1, move forward N - 1 lines first. 800With argument N not nil or 1, move forward N - 1 lines first.
781If scan reaches end of buffer, return that position. 801If scan reaches end of buffer, return that position.
782 802
783The scan does not cross a field boundary unless doing so would move 803This function constrains the returned position to the current field
784beyond there to a different line; if N is nil or 1, and scan starts at a 804unless that would be on a different line than the original,
785field boundary, the scan stops as soon as it starts. To ignore field 805unconstrained result. If N is nil or 1, and a front-sticky field
806starts at point, the scan stops as soon as it starts. To ignore field
786boundaries bind `inhibit-field-text-motion' to t. 807boundaries bind `inhibit-field-text-motion' to t.
787 808
788This function does not move point. */) 809This function does not move point. */)
@@ -814,9 +835,10 @@ DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0,
814With argument N not nil or 1, move forward N - 1 lines first. 835With argument N not nil or 1, move forward N - 1 lines first.
815If scan reaches end of buffer, return that position. 836If scan reaches end of buffer, return that position.
816 837
817The scan does not cross a field boundary unless doing so would move 838This function constrains the returned position to the current field
818beyond there to a different line; if N is nil or 1, and scan starts at a 839unless that would be on a different line than the original,
819field boundary, the scan stops as soon as it starts. To ignore field 840unconstrained result. If N is nil or 1, and a rear-sticky field ends
841at point, the scan stops as soon as it starts. To ignore field
820boundaries bind `inhibit-field-text-motion' to t. 842boundaries bind `inhibit-field-text-motion' to t.
821 843
822This function does not move point. */) 844This function does not move point. */)
diff --git a/src/frame.c b/src/frame.c
index 3487552bbf7..9a442b6289f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3519,8 +3519,21 @@ x_get_arg (dpyinfo, alist, param, attribute, class, type)
3519 register Lisp_Object tem; 3519 register Lisp_Object tem;
3520 3520
3521 tem = Fassq (param, alist); 3521 tem = Fassq (param, alist);
3522 if (EQ (tem, Qnil)) 3522
3523 if (!NILP (tem))
3524 {
3525 /* If we find this parm in ALIST, clear it out
3526 so that it won't be "left over" at the end. */
3527#ifdef HAVE_X_WINDOWS /* macfns.c and w32fns.c have not yet
3528 been changed to cope with this. */
3529 XSETCAR (tem, Qnil);
3530#endif
3531 }
3532 else
3523 tem = Fassq (param, Vdefault_frame_alist); 3533 tem = Fassq (param, Vdefault_frame_alist);
3534
3535 /* If it wasn't specified in ALIST or the Lisp-level defaults,
3536 look in the X resources. */
3524 if (EQ (tem, Qnil)) 3537 if (EQ (tem, Qnil))
3525 { 3538 {
3526 if (attribute) 3539 if (attribute)
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 065adeb4937..67288cab33f 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3359,9 +3359,7 @@ xg_tool_bar_help_callback (w, event, client_data)
3359 Lisp_Object help, frame; 3359 Lisp_Object help, frame;
3360 3360
3361 if (! GTK_IS_BUTTON (w)) 3361 if (! GTK_IS_BUTTON (w))
3362 { 3362 return FALSE;
3363 return FALSE;
3364 }
3365 3363
3366 if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items)) 3364 if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items))
3367 return FALSE; 3365 return FALSE;
@@ -3596,54 +3594,56 @@ update_frame_tool_bar (f)
3596 if (! wicon) 3594 if (! wicon)
3597 { 3595 {
3598 GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL); 3596 GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL);
3597 GtkToolItem *ti = gtk_tool_button_new (w, "");
3599 3598
3600 gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin); 3599 gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
3601 3600
3601 gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget),
3602 ti,
3603 i);
3602 /* The EMACS_INT cast avoids a warning. */ 3604 /* The EMACS_INT cast avoids a warning. */
3603 gtk_toolbar_append_item (GTK_TOOLBAR (x->toolbar_widget), 3605 g_signal_connect (GTK_WIDGET (ti), "clicked",
3604 0, 0, 0, 3606 GTK_SIGNAL_FUNC (xg_tool_bar_callback),
3605 w, 3607 (gpointer) (EMACS_INT) i);
3606 GTK_SIGNAL_FUNC (xg_tool_bar_callback), 3608
3607 (gpointer) (EMACS_INT) i); 3609 gtk_widget_show (GTK_WIDGET (ti));
3610 gtk_widget_show (GTK_WIDGET (w));
3608 3611
3609 /* Save the image so we can see if an update is needed when 3612 /* Save the image so we can see if an update is needed when
3610 this function is called again. */ 3613 this function is called again. */
3611 g_object_set_data (G_OBJECT (w), XG_TOOL_BAR_IMAGE_DATA, 3614 g_object_set_data (G_OBJECT (w), XG_TOOL_BAR_IMAGE_DATA,
3612 (gpointer)img->pixmap); 3615 (gpointer)img->pixmap);
3613 3616
3617 g_object_set_data (G_OBJECT (ti), XG_FRAME_DATA, (gpointer)f);
3618
3614 /* Catch expose events to overcome an annoying redraw bug, see 3619 /* Catch expose events to overcome an annoying redraw bug, see
3615 comment for xg_tool_bar_item_expose_callback. */ 3620 comment for xg_tool_bar_item_expose_callback. */
3616 g_signal_connect (G_OBJECT (w), 3621 g_signal_connect (G_OBJECT (ti),
3617 "expose-event", 3622 "expose-event",
3618 G_CALLBACK (xg_tool_bar_item_expose_callback), 3623 G_CALLBACK (xg_tool_bar_item_expose_callback),
3619 0); 3624 0);
3620 3625
3621 /* We must set sensitive on the button that is the parent 3626 gtk_widget_set_sensitive (GTK_WIDGET (ti), enabled_p);
3622 of the GtkImage parent. Go upwards until we find the button. */ 3627 gtk_tool_item_set_homogeneous (GTK_TOOL_ITEM (ti), FALSE);
3628
3623 while (! GTK_IS_BUTTON (w)) 3629 while (! GTK_IS_BUTTON (w))
3624 w = gtk_widget_get_parent (w); 3630 w = gtk_widget_get_parent (w);
3625 3631
3626 if (w) 3632 g_object_set_data (G_OBJECT (w), XG_FRAME_DATA, (gpointer)f);
3627 { 3633
3628 /* Save the frame in the button so the xg_tool_bar_callback 3634 /* Use enter/leave notify to show help. We use the events
3629 can get at it. */ 3635 rather than the GtkButton specific signals "enter" and
3630 g_object_set_data (G_OBJECT (w), XG_FRAME_DATA, (gpointer)f); 3636 "leave", so we can have only one callback. The event
3631 gtk_widget_set_sensitive (w, enabled_p); 3637 will tell us what kind of event it is. */
3632 3638 /* The EMACS_INT cast avoids a warning. */
3633 /* Use enter/leave notify to show help. We use the events 3639 g_signal_connect (G_OBJECT (w),
3634 rather than the GtkButton specific signals "enter" and 3640 "enter-notify-event",
3635 "leave", so we can have only one callback. The event 3641 G_CALLBACK (xg_tool_bar_help_callback),
3636 will tell us what kind of event it is. */ 3642 (gpointer) (EMACS_INT) i);
3637 /* The EMACS_INT cast avoids a warning. */ 3643 g_signal_connect (G_OBJECT (w),
3638 g_signal_connect (G_OBJECT (w), 3644 "leave-notify-event",
3639 "enter-notify-event", 3645 G_CALLBACK (xg_tool_bar_help_callback),
3640 G_CALLBACK (xg_tool_bar_help_callback), 3646 (gpointer) (EMACS_INT) i);
3641 (gpointer) (EMACS_INT) i);
3642 g_signal_connect (G_OBJECT (w),
3643 "leave-notify-event",
3644 G_CALLBACK (xg_tool_bar_help_callback),
3645 (gpointer) (EMACS_INT) i);
3646 }
3647 } 3647 }
3648 else 3648 else
3649 { 3649 {
diff --git a/src/keymap.c b/src/keymap.c
index 31f80a2593a..41e58973033 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -718,7 +718,7 @@ map_keymap_call (key, val, fun, dummy)
718} 718}
719 719
720DEFUN ("map-keymap", Fmap_keymap, Smap_keymap, 2, 3, 0, 720DEFUN ("map-keymap", Fmap_keymap, Smap_keymap, 2, 3, 0,
721 doc: /* Call FUNCTION once for each binding in KEYMAP. 721 doc: /* Call FUNCTION once for each event binding in KEYMAP.
722FUNCTION is called with two arguments: the event that is bound, and 722FUNCTION is called with two arguments: the event that is bound, and
723the definition it is bound to. 723the definition it is bound to.
724 724
diff --git a/src/window.c b/src/window.c
index e2678a3f3b8..289cc1628eb 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1829,7 +1829,7 @@ DEFUN ("other-window", Fother_window, Sother_window, 1, 2, "p",
1829All windows on current frame are arranged in a cyclic order. 1829All windows on current frame are arranged in a cyclic order.
1830This command selects the window ARG steps away in that order. 1830This command selects the window ARG steps away in that order.
1831A negative ARG moves in the opposite order. The optional second 1831A negative ARG moves in the opposite order. The optional second
1832argument ALL_FRAMES has the same meaning as in `next-window', which see. */) 1832argument ALL-FRAMES has the same meaning as in `next-window', which see. */)
1833 (arg, all_frames) 1833 (arg, all_frames)
1834 Lisp_Object arg, all_frames; 1834 Lisp_Object arg, all_frames;
1835{ 1835{
@@ -6660,7 +6660,7 @@ DEFUN ("window-vscroll", Fwindow_vscroll, Swindow_vscroll, 0, 2, 0,
6660 doc: /* Return the amount by which WINDOW is scrolled vertically. 6660 doc: /* Return the amount by which WINDOW is scrolled vertically.
6661Use the selected window if WINDOW is nil or omitted. 6661Use the selected window if WINDOW is nil or omitted.
6662Normally, value is a multiple of the canonical character height of WINDOW; 6662Normally, value is a multiple of the canonical character height of WINDOW;
6663optional second arg PIXELS_P means value is measured in pixels. */) 6663optional second arg PIXELS-P means value is measured in pixels. */)
6664 (window, pixels_p) 6664 (window, pixels_p)
6665 Lisp_Object window, pixels_p; 6665 Lisp_Object window, pixels_p;
6666{ 6666{
@@ -6690,7 +6690,7 @@ DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll,
6690 doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. 6690 doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL.
6691WINDOW nil means use the selected window. Normally, VSCROLL is a 6691WINDOW nil means use the selected window. Normally, VSCROLL is a
6692non-negative multiple of the canonical character height of WINDOW; 6692non-negative multiple of the canonical character height of WINDOW;
6693optional third arg PIXELS_P non-nil means that VSCROLL is in pixels. 6693optional third arg PIXELS-P non-nil means that VSCROLL is in pixels.
6694If PIXELS-P is nil, VSCROLL may have to be rounded so that it 6694If PIXELS-P is nil, VSCROLL may have to be rounded so that it
6695corresponds to an integral number of pixels. The return value is the 6695corresponds to an integral number of pixels. The return value is the
6696result of this rounding. 6696result of this rounding.
diff --git a/src/xfns.c b/src/xfns.c
index 69573dbac65..48883733404 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2988,6 +2988,8 @@ This function is an internal primitive--use `make-frame' instead. */)
2988 2988
2989 check_x (); 2989 check_x ();
2990 2990
2991 parms = Fcopy_alist (parms);
2992
2991 /* Use this general default value to start with 2993 /* Use this general default value to start with
2992 until we know if this frame has a specified name. */ 2994 until we know if this frame has a specified name. */
2993 Vx_resource_name = Vinvocation_name; 2995 Vx_resource_name = Vinvocation_name;
@@ -3368,6 +3370,12 @@ This function is an internal primitive--use `make-frame' instead. */)
3368 || !FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame)))) 3370 || !FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame))))
3369 kb->Vdefault_minibuffer_frame = frame; 3371 kb->Vdefault_minibuffer_frame = frame;
3370 3372
3373 /* All remaining specified parameters, which have not been "used"
3374 by x_get_arg and friends, now go in the misc. alist of the frame. */
3375 for (tem = parms; !NILP (tem); tem = XCDR (tem))
3376 if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
3377 f->param_alist = Fcons (XCAR (tem), f->param_alist);
3378
3371 UNGCPRO; 3379 UNGCPRO;
3372 3380
3373 /* Make sure windows on this frame appear in calls to next-window 3381 /* Make sure windows on this frame appear in calls to next-window