aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-04-11 12:40:15 +0000
committerKaroly Lorentey2005-04-11 12:40:15 +0000
commit221d5c8772dc29f854292ec7cb423fce925daecf (patch)
tree5fe05145ce31ffcc9d1a621c027410151e4a2106 /src
parent1b9ab2508610fea57aa777956de14ee84d66862f (diff)
parent9552bee8c6e7c5ee16ca60cddebaebdf5d238e05 (diff)
downloademacs-221d5c8772dc29f854292ec7cb423fce925daecf.tar.gz
emacs-221d5c8772dc29f854292ec7cb423fce925daecf.zip
Merged from miles@gnu.org--gnu-2005 (patch 59, 240-245)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-240 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-241 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-242 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-244 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-245 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-59 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-326
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog41
-rw-r--r--src/ChangeLog.62
-rw-r--r--src/buffer.c18
-rw-r--r--src/dispnew.c22
-rw-r--r--src/emacs.c6
-rw-r--r--src/fns.c33
-rw-r--r--src/keyboard.c14
-rw-r--r--src/keymap.c19
-rw-r--r--src/lread.c54
-rw-r--r--src/print.c16
-rw-r--r--src/window.c15
11 files changed, 182 insertions, 58 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ec60d4add5f..26b8a9ce5ad 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,40 @@
12005-04-10 Richard M. Stallman <rms@gnu.org>
2
3 * emacs.c (standard_args): Rename --bare-bones to --quick.
4 Add -D aka --basic-display.
5
6 * buffer.c (Fmake_indirect_buffer): Clear out some local variables.
7
82005-04-09 Richard M. Stallman <rms@gnu.org>
9
10 * keymap.c (where_is_internal): Convert a string used as event type
11 into "(any string)".
12
13 * lread.c (Vloads_in_progress): Not static.
14
15 * fns.c (Vloads_in_progress): Add extern.
16 (Frequire): Don't do LOADHIST_ATTACH if Vloads_in_progress is nil.
17
182005-04-09 Thien-Thi Nguyen <ttn@surf.glug.org>
19
20 * dispnew.c (mirror_line_dance): Avoid crash if W2 is null.
21
222005-04-09 Lute Kamstra <lute@gnu.org>
23
24 * print.c (PRINTPREPARE): Check if the marker PRINTCHARFUN is
25 within the accessible part of the buffer.
26
272005-04-09 Kim F. Storm <storm@cua.dk>
28
29 * lread.c (readevalloop): Add args START and END as region in
30 current buffer to read. Callers changed.
31 When specified, narrow to this region only when reading,
32 not during eval. Track next point to read from during eval.
33 Also restore point to "real" buffer position before eval.
34 (Feval_region): Don't save excursion and restriction here, and
35 don't narrow to region. Just pass region to readevalloop.
36 Note: Point is now preserved even when PRINTFLAG is nil.
37
12005-04-08 Kim F. Storm <storm@cua.dk> 382005-04-08 Kim F. Storm <storm@cua.dk>
2 39
3 * xdisp.c (syms_of_xdisp): Init overlay-arrow-string to "=>". 40 * xdisp.c (syms_of_xdisp): Init overlay-arrow-string to "=>".
@@ -30,8 +67,8 @@
30 67
312005-04-01 Kenichi Handa <handa@m17n.org> 682005-04-01 Kenichi Handa <handa@m17n.org>
32 69
33 * lisp.h (Vascii_upcase_table, Vascii_canon_table, 70 * lisp.h (Vascii_upcase_table, Vascii_canon_table)
34 Vascii_eqv_table): Extern them. 71 (Vascii_eqv_table): Extern them.
35 72
36 * casetab.c (set_case_table): If standard is nonzero, setup 73 * casetab.c (set_case_table): If standard is nonzero, setup
37 Vascii_upcase_table, Vascii_canon_table, and Vascii_eqv_table. 74 Vascii_upcase_table, Vascii_canon_table, and Vascii_eqv_table.
diff --git a/src/ChangeLog.6 b/src/ChangeLog.6
index 67569eedeca..2da83619eb4 100644
--- a/src/ChangeLog.6
+++ b/src/ChangeLog.6
@@ -1079,7 +1079,7 @@
1079 scroll_bar_up_arrow, scroll_bar_down_arrow. 1079 scroll_bar_up_arrow, scroll_bar_down_arrow.
1080 (win32_scroll_bar_click): New enum constant. 1080 (win32_scroll_bar_click): New enum constant.
1081 1081
10821996-05-03 Andrw Innes <andrewi@harlequin.co.uk> 10821996-05-03 Andrew Innes <andrewi@harlequin.co.uk>
1083 1083
1084 * makefile.nt (SUBSYSTEM) [NTGUI]: Remove conditional. 1084 * makefile.nt (SUBSYSTEM) [NTGUI]: Remove conditional.
1085 (LINK_FLAGS): Explicitly set base address, and stack and heap sizes. 1085 (LINK_FLAGS): Explicitly set base address, and stack and heap sizes.
diff --git a/src/buffer.c b/src/buffer.c
index c934bdf22c3..1fba9136375 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -630,7 +630,21 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
630 XMARKER (b->zv_marker)->insertion_type = 1; 630 XMARKER (b->zv_marker)->insertion_type = 1;
631 } 631 }
632 else 632 else
633 clone_per_buffer_values (b->base_buffer, b); 633 {
634 struct buffer *old_b = current_buffer;
635
636 clone_per_buffer_values (b->base_buffer, b);
637 b->filename = Qnil;
638 b->file_truename = Qnil;
639 b->display_count = make_number (0);
640 b->backed_up = Qnil;
641 b->auto_save_file_name = Qnil;
642 set_buffer_internal_1 (b);
643 Fset (intern ("buffer-save-without-query"), Qnil);
644 Fset (intern ("buffer-file-number"), Qnil);
645 Fset (intern ("buffer-stale-function"), Qnil);
646 set_buffer_internal_1 (old_b);
647 }
634 648
635 return buf; 649 return buf;
636} 650}
@@ -931,7 +945,7 @@ is the default binding of variable. */)
931} 945}
932 946
933/* Return an alist of the Lisp-level buffer-local bindings of 947/* Return an alist of the Lisp-level buffer-local bindings of
934 buffer BUF. That is, do't include the variables maintained 948 buffer BUF. That is, don't include the variables maintained
935 in special slots in the buffer object. */ 949 in special slots in the buffer object. */
936 950
937static Lisp_Object 951static Lisp_Object
diff --git a/src/dispnew.c b/src/dispnew.c
index 2f807b41cb4..f549a8dde91 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3154,14 +3154,20 @@ mirror_line_dance (w, unchanged_at_top, nlines, copy_from, retained_p)
3154 int m2_from; 3154 int m2_from;
3155 3155
3156 w2 = frame_row_to_window (root, frame_from); 3156 w2 = frame_row_to_window (root, frame_from);
3157 m2 = w2->current_matrix; 3157 /* ttn@surf.glug.org: when enabling menu bar using `emacs
3158 m2_from = frame_from - m2->matrix_y; 3158 -nw', FROM_FRAME sometimes has no associated window.
3159 copy_row_except_pointers (m->rows + window_to, 3159 This check avoids a segfault if W2 is null. */
3160 m2->rows + m2_from); 3160 if (w2)
3161 3161 {
3162 /* If frame line is empty, window line is empty, too. */ 3162 m2 = w2->current_matrix;
3163 if (!retained_p[copy_from[i]]) 3163 m2_from = frame_from - m2->matrix_y;
3164 m->rows[window_to].enabled_p = 0; 3164 copy_row_except_pointers (m->rows + window_to,
3165 m2->rows + m2_from);
3166
3167 /* If frame line is empty, window line is empty, too. */
3168 if (!retained_p[copy_from[i]])
3169 m->rows[window_to].enabled_p = 0;
3170 }
3165 sync_p = 1; 3171 sync_p = 1;
3166 } 3172 }
3167 else if (from_inside_window_p) 3173 else if (from_inside_window_p)
diff --git a/src/emacs.c b/src/emacs.c
index f6d32e175b3..c368c57a11f 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1806,8 +1806,8 @@ struct standard_args standard_args[] =
1806 { "-d", "--display", 60, 1 }, 1806 { "-d", "--display", 60, 1 },
1807 { "-display", 0, 60, 1 }, 1807 { "-display", 0, 60, 1 },
1808 /* Now for the options handled in startup.el. */ 1808 /* Now for the options handled in startup.el. */
1809 { "-Q", "--bare-bones", 55, 0 }, 1809 { "-Q", "--quick", 55, 0 },
1810 { "-bare-bones", 0, 55, 0 }, 1810 { "-quick", 0, 55, 0 },
1811 { "-q", "--no-init-file", 50, 0 }, 1811 { "-q", "--no-init-file", 50, 0 },
1812 { "-no-init-file", 0, 50, 0 }, 1812 { "-no-init-file", 0, 50, 0 },
1813 { "-no-site-file", "--no-site-file", 40, 0 }, 1813 { "-no-site-file", "--no-site-file", 40, 0 },
@@ -1818,6 +1818,8 @@ struct standard_args standard_args[] =
1818 { "-i", "--icon-type", 15, 0 }, 1818 { "-i", "--icon-type", 15, 0 },
1819 { "-itype", 0, 15, 0 }, 1819 { "-itype", 0, 15, 0 },
1820 { "-iconic", "--iconic", 15, 0 }, 1820 { "-iconic", "--iconic", 15, 0 },
1821 { "-D", "--basic-display", 12, 0},
1822 { "--basic-display", 0, 12, 0},
1821 { "-bg", "--background-color", 10, 1 }, 1823 { "-bg", "--background-color", 10, 1 },
1822 { "-background", 0, 10, 1 }, 1824 { "-background", 0, 10, 1 },
1823 { "-fg", "--foreground-color", 10, 1 }, 1825 { "-fg", "--foreground-color", 10, 1 },
diff --git a/src/fns.c b/src/fns.c
index 9a3121a3391..e921579f79b 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1,6 +1,6 @@
1/* Random utility Lisp functions. 1/* Random utility Lisp functions.
2 Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 98, 99, 2000, 2001, 02, 03, 2004 2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000,
3 Free Software Foundation, Inc. 3 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -66,6 +66,7 @@ int use_file_dialog;
66extern int minibuffer_auto_raise; 66extern int minibuffer_auto_raise;
67extern Lisp_Object minibuf_window; 67extern Lisp_Object minibuf_window;
68extern Lisp_Object Vlocale_coding_system; 68extern Lisp_Object Vlocale_coding_system;
69extern Lisp_Object Vloads_in_progress;
69 70
70Lisp_Object Qstring_lessp, Qprovide, Qrequire; 71Lisp_Object Qstring_lessp, Qprovide, Qrequire;
71Lisp_Object Qyes_or_no_p_history; 72Lisp_Object Qyes_or_no_p_history;
@@ -1147,7 +1148,18 @@ If STRING is multibyte, the result is STRING itself.
1147Otherwise it is a newly created string, with no text properties. 1148Otherwise it is a newly created string, with no text properties.
1148If STRING is unibyte and contains an individual 8-bit byte (i.e. not 1149If STRING is unibyte and contains an individual 8-bit byte (i.e. not
1149part of a multibyte form), it is converted to the corresponding 1150part of a multibyte form), it is converted to the corresponding
1150multibyte character of charset `eight-bit-control' or `eight-bit-graphic'. */) 1151multibyte character of charset `eight-bit-control' or `eight-bit-graphic'.
1152Beware, this often doesn't really do what you think it does.
1153It is similar to (decode-coding-string STRING 'emacs-mule-unix).
1154If you're not sure, whether to use `string-as-multibyte' or
1155`string-to-multibyte', use `string-to-multibyte'. Beware:
1156 (aref (string-as-multibyte "\201") 0) -> 129 (aka ?\201)
1157 (aref (string-as-multibyte "\300") 0) -> 192 (aka ?\300)
1158 (aref (string-as-multibyte "\300\201") 0) -> 192 (aka ?\300)
1159 (aref (string-as-multibyte "\300\201") 1) -> 129 (aka ?\201)
1160but
1161 (aref (string-as-multibyte "\201\300") 0) -> 2240
1162 (aref (string-as-multibyte "\201\300") 1) -> <error> */)
1151 (string) 1163 (string)
1152 Lisp_Object string; 1164 Lisp_Object string;
1153{ 1165{
@@ -1181,7 +1193,8 @@ Otherwise it is a newly created string, with no text properties.
1181Characters 0200 through 0237 are converted to eight-bit-control 1193Characters 0200 through 0237 are converted to eight-bit-control
1182characters of the same character code. Characters 0240 through 0377 1194characters of the same character code. Characters 0240 through 0377
1183are converted to eight-bit-graphic characters of the same character 1195are converted to eight-bit-graphic characters of the same character
1184codes. */) 1196codes.
1197This is similar to (decode-coding-string STRING 'binary) */)
1185 (string) 1198 (string)
1186 Lisp_Object string; 1199 Lisp_Object string;
1187{ 1200{
@@ -3444,9 +3457,15 @@ The normal messages at start and end of loading FILENAME are suppressed. */)
3444 CHECK_SYMBOL (feature); 3457 CHECK_SYMBOL (feature);
3445 3458
3446 /* Record the presence of `require' in this file 3459 /* Record the presence of `require' in this file
3447 even if the feature specified is already loaded. */ 3460 even if the feature specified is already loaded.
3448 LOADHIST_ATTACH (Fcons (Qrequire, feature)); 3461 But not more than once in any file,
3449 3462 and not when we aren't loading a file. */
3463 if (! NILP (Vloads_in_progress))
3464 {
3465 tem = Fcons (Qrequire, feature);
3466 if (NILP (Fmember (tem, Vcurrent_load_list)))
3467 LOADHIST_ATTACH (tem);
3468 }
3450 tem = Fmemq (feature, Vfeatures); 3469 tem = Fmemq (feature, Vfeatures);
3451 3470
3452 if (NILP (tem)) 3471 if (NILP (tem))
diff --git a/src/keyboard.c b/src/keyboard.c
index 39891b1a95d..48c47502f85 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2252,12 +2252,16 @@ make_ctrl_char (c)
2252 return c; 2252 return c;
2253} 2253}
2254 2254
2255/* Display help echo in the echo area. 2255/* Display the help-echo property of the character after the mouse pointer.
2256 Either show it in the echo area, or call show-help-function to display
2257 it by other means (maybe in a tooltip).
2256 2258
2257 HELP a string means display that string, HELP nil means clear the 2259 If HELP is nil, that means clear the previous help echo.
2258 help echo. If HELP is a function, call it with OBJECT and POS as 2260
2259 arguments; the function should return a help string or nil for 2261 If HELP is a string, display that string. If HELP is a function,
2260 none. For all other types of HELP evaluate it to obtain a string. 2262 call it with OBJECT and POS as arguments; the function should
2263 return a help string or nil for none. For all other types of HELP,
2264 evaluate it to obtain a string.
2261 2265
2262 WINDOW is the window in which the help was generated, if any. 2266 WINDOW is the window in which the help was generated, if any.
2263 It is nil if not in a window. 2267 It is nil if not in a window.
diff --git a/src/keymap.c b/src/keymap.c
index a55563a4e92..3706ad52c9e 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -765,7 +765,9 @@ usage: (map-keymap FUNCTION KEYMAP) */)
765 remove that. Also remove a menu help string as second element. 765 remove that. Also remove a menu help string as second element.
766 766
767 If AUTOLOAD is nonzero, load autoloadable keymaps 767 If AUTOLOAD is nonzero, load autoloadable keymaps
768 that are referred to with indirection. */ 768 that are referred to with indirection.
769
770 This can GC because menu_item_eval_property calls Feval. */
769 771
770Lisp_Object 772Lisp_Object
771get_keyelt (object, autoload) 773get_keyelt (object, autoload)
@@ -2555,6 +2557,19 @@ where_is_internal (definition, keymaps, firstonly, noindirect, no_remap)
2555 continue; 2557 continue;
2556 2558
2557 record_sequence: 2559 record_sequence:
2560 /* Don't annoy user with strings from a menu such as
2561 Select Paste. Change them all to "(any string)",
2562 so that there seems to be only one menu item
2563 to report. */
2564 if (! NILP (sequence))
2565 {
2566 Lisp_Object tem;
2567 tem = Faref (sequence, make_number (XVECTOR (sequence)->size - 1));
2568 if (STRINGP (tem))
2569 Faset (sequence, make_number (XVECTOR (sequence)->size - 1),
2570 build_string ("(any string)"));
2571 }
2572
2558 /* It is a true unshadowed match. Record it, unless it's already 2573 /* It is a true unshadowed match. Record it, unless it's already
2559 been seen (as could happen when inheriting keymaps). */ 2574 been seen (as could happen when inheriting keymaps). */
2560 if (NILP (Fmember (sequence, found))) 2575 if (NILP (Fmember (sequence, found)))
@@ -2732,7 +2747,7 @@ where_is_internal_2 (args, key, binding)
2732} 2747}
2733 2748
2734 2749
2735/* This function cannot GC. */ 2750/* This function can GC because get_keyelt can. */
2736 2751
2737static Lisp_Object 2752static Lisp_Object
2738where_is_internal_1 (binding, key, definition, noindirect, this, last, 2753where_is_internal_1 (binding, key, definition, noindirect, this, last,
diff --git a/src/lread.c b/src/lread.c
index 5b5ea478a16..d36d45c8c7d 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -194,7 +194,7 @@ static int new_backquote_flag;
194/* A list of file names for files being loaded in Fload. Used to 194/* A list of file names for files being loaded in Fload. Used to
195 check for recursive loads. */ 195 check for recursive loads. */
196 196
197static Lisp_Object Vloads_in_progress; 197Lisp_Object Vloads_in_progress;
198 198
199/* Non-zero means load dangerous compiled Lisp files. */ 199/* Non-zero means load dangerous compiled Lisp files. */
200 200
@@ -207,6 +207,7 @@ static Lisp_Object Vbytecomp_version_regexp;
207static void to_multibyte P_ ((char **, char **, int *)); 207static void to_multibyte P_ ((char **, char **, int *));
208static void readevalloop P_ ((Lisp_Object, FILE*, Lisp_Object, 208static void readevalloop P_ ((Lisp_Object, FILE*, Lisp_Object,
209 Lisp_Object (*) (), int, 209 Lisp_Object (*) (), int,
210 Lisp_Object, Lisp_Object,
210 Lisp_Object, Lisp_Object)); 211 Lisp_Object, Lisp_Object));
211static Lisp_Object load_unwind P_ ((Lisp_Object)); 212static Lisp_Object load_unwind P_ ((Lisp_Object));
212static Lisp_Object load_descriptor_unwind P_ ((Lisp_Object)); 213static Lisp_Object load_descriptor_unwind P_ ((Lisp_Object));
@@ -913,7 +914,8 @@ Return t if file exists. */)
913 load_descriptor_list 914 load_descriptor_list
914 = Fcons (make_number (fileno (stream)), load_descriptor_list); 915 = Fcons (make_number (fileno (stream)), load_descriptor_list);
915 load_in_progress++; 916 load_in_progress++;
916 readevalloop (Qget_file_char, stream, file, Feval, 0, Qnil, Qnil); 917 readevalloop (Qget_file_char, stream, file, Feval,
918 0, Qnil, Qnil, Qnil, Qnil);
917 unbind_to (count, Qnil); 919 unbind_to (count, Qnil);
918 920
919 /* Run any load-hooks for this file. */ 921 /* Run any load-hooks for this file. */
@@ -1291,16 +1293,19 @@ end_of_file_error ()
1291 1293
1292/* UNIBYTE specifies how to set load_convert_to_unibyte 1294/* UNIBYTE specifies how to set load_convert_to_unibyte
1293 for this invocation. 1295 for this invocation.
1294 READFUN, if non-nil, is used instead of `read'. */ 1296 READFUN, if non-nil, is used instead of `read'.
1297 START, END is region in current buffer (from eval-region). */
1295 1298
1296static void 1299static void
1297readevalloop (readcharfun, stream, sourcename, evalfun, printflag, unibyte, readfun) 1300readevalloop (readcharfun, stream, sourcename, evalfun,
1301 printflag, unibyte, readfun, start, end)
1298 Lisp_Object readcharfun; 1302 Lisp_Object readcharfun;
1299 FILE *stream; 1303 FILE *stream;
1300 Lisp_Object sourcename; 1304 Lisp_Object sourcename;
1301 Lisp_Object (*evalfun) (); 1305 Lisp_Object (*evalfun) ();
1302 int printflag; 1306 int printflag;
1303 Lisp_Object unibyte, readfun; 1307 Lisp_Object unibyte, readfun;
1308 Lisp_Object start, end;
1304{ 1309{
1305 register int c; 1310 register int c;
1306 register Lisp_Object val; 1311 register Lisp_Object val;
@@ -1328,28 +1333,41 @@ readevalloop (readcharfun, stream, sourcename, evalfun, printflag, unibyte, read
1328 continue_reading_p = 1; 1333 continue_reading_p = 1;
1329 while (continue_reading_p) 1334 while (continue_reading_p)
1330 { 1335 {
1336 int count1 = SPECPDL_INDEX ();
1337
1331 if (b != 0 && NILP (b->name)) 1338 if (b != 0 && NILP (b->name))
1332 error ("Reading from killed buffer"); 1339 error ("Reading from killed buffer");
1333 1340
1341 if (!NILP (start))
1342 {
1343 record_unwind_protect (save_excursion_restore, save_excursion_save ());
1344 record_unwind_protect (save_restriction_restore, save_restriction_save ());
1345 Fgoto_char (start);
1346 Fnarrow_to_region (make_number (BEGV), end);
1347 }
1348
1334 instream = stream; 1349 instream = stream;
1350 read_next:
1335 c = READCHAR; 1351 c = READCHAR;
1336 if (c == ';') 1352 if (c == ';')
1337 { 1353 {
1338 while ((c = READCHAR) != '\n' && c != -1); 1354 while ((c = READCHAR) != '\n' && c != -1);
1339 continue; 1355 goto read_next;
1356 }
1357 if (c < 0)
1358 {
1359 unbind_to (count1, Qnil);
1360 break;
1340 } 1361 }
1341 if (c < 0) break;
1342 1362
1343 /* Ignore whitespace here, so we can detect eof. */ 1363 /* Ignore whitespace here, so we can detect eof. */
1344 if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r') 1364 if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r')
1345 continue; 1365 goto read_next;
1346 1366
1347 if (!NILP (Vpurify_flag) && c == '(') 1367 if (!NILP (Vpurify_flag) && c == '(')
1348 { 1368 {
1349 int count1 = SPECPDL_INDEX ();
1350 record_unwind_protect (unreadpure, Qnil); 1369 record_unwind_protect (unreadpure, Qnil);
1351 val = read_list (-1, readcharfun); 1370 val = read_list (-1, readcharfun);
1352 unbind_to (count1, Qnil);
1353 } 1371 }
1354 else 1372 else
1355 { 1373 {
@@ -1375,6 +1393,10 @@ readevalloop (readcharfun, stream, sourcename, evalfun, printflag, unibyte, read
1375 val = read_internal_start (readcharfun, Qnil, Qnil); 1393 val = read_internal_start (readcharfun, Qnil, Qnil);
1376 } 1394 }
1377 1395
1396 if (!NILP (start) && continue_reading_p)
1397 start = Fpoint_marker ();
1398 unbind_to (count1, Qnil);
1399
1378 val = (*evalfun) (val); 1400 val = (*evalfun) (val);
1379 1401
1380 if (printflag) 1402 if (printflag)
@@ -1433,7 +1455,8 @@ This function preserves the position of point. */)
1433 specbind (Qstandard_output, tem); 1455 specbind (Qstandard_output, tem);
1434 record_unwind_protect (save_excursion_restore, save_excursion_save ()); 1456 record_unwind_protect (save_excursion_restore, save_excursion_save ());
1435 BUF_SET_PT (XBUFFER (buf), BUF_BEGV (XBUFFER (buf))); 1457 BUF_SET_PT (XBUFFER (buf), BUF_BEGV (XBUFFER (buf)));
1436 readevalloop (buf, 0, filename, Feval, !NILP (printflag), unibyte, Qnil); 1458 readevalloop (buf, 0, filename, Feval,
1459 !NILP (printflag), unibyte, Qnil, Qnil, Qnil);
1437 unbind_to (count, Qnil); 1460 unbind_to (count, Qnil);
1438 1461
1439 return Qnil; 1462 return Qnil;
@@ -1465,15 +1488,10 @@ This function does not move point. */)
1465 tem = printflag; 1488 tem = printflag;
1466 specbind (Qstandard_output, tem); 1489 specbind (Qstandard_output, tem);
1467 1490
1468 if (NILP (printflag)) 1491 /* readevalloop calls functions which check the type of start and end. */
1469 record_unwind_protect (save_excursion_restore, save_excursion_save ());
1470 record_unwind_protect (save_restriction_restore, save_restriction_save ());
1471
1472 /* This both uses start and checks its type. */
1473 Fgoto_char (start);
1474 Fnarrow_to_region (make_number (BEGV), end);
1475 readevalloop (cbuf, 0, XBUFFER (cbuf)->filename, Feval, 1492 readevalloop (cbuf, 0, XBUFFER (cbuf)->filename, Feval,
1476 !NILP (printflag), Qnil, read_function); 1493 !NILP (printflag), Qnil, read_function,
1494 start, end);
1477 1495
1478 return unbind_to (count, Qnil); 1496 return unbind_to (count, Qnil);
1479} 1497}
diff --git a/src/print.c b/src/print.c
index 8bb55f21248..47e338e8492 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1,6 +1,6 @@
1/* Lisp object printing and output streams. 1/* Lisp object printing and output streams.
2 Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 01, 03, 2004 2 Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999,
3 Free Software Foundation, Inc. 3 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -211,13 +211,17 @@ void print_interval ();
211 } \ 211 } \
212 if (MARKERP (printcharfun)) \ 212 if (MARKERP (printcharfun)) \
213 { \ 213 { \
214 if (!(XMARKER (original)->buffer)) \ 214 EMACS_INT marker_pos; \
215 if (!(XMARKER (printcharfun)->buffer)) \
215 error ("Marker does not point anywhere"); \ 216 error ("Marker does not point anywhere"); \
216 if (XMARKER (original)->buffer != current_buffer) \ 217 if (XMARKER (printcharfun)->buffer != current_buffer) \
217 set_buffer_internal (XMARKER (original)->buffer); \ 218 set_buffer_internal (XMARKER (printcharfun)->buffer); \
219 marker_pos = marker_position (printcharfun); \
220 if (marker_pos < BEGV || marker_pos > ZV) \
221 error ("Marker is outside the accessible part of the buffer"); \
218 old_point = PT; \ 222 old_point = PT; \
219 old_point_byte = PT_BYTE; \ 223 old_point_byte = PT_BYTE; \
220 SET_PT_BOTH (marker_position (printcharfun), \ 224 SET_PT_BOTH (marker_pos, \
221 marker_byte_position (printcharfun)); \ 225 marker_byte_position (printcharfun)); \
222 start_point = PT; \ 226 start_point = PT; \
223 start_point_byte = PT_BYTE; \ 227 start_point_byte = PT_BYTE; \
diff --git a/src/window.c b/src/window.c
index 574c348c460..e16416d6fb2 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3173,6 +3173,9 @@ selects the buffer of the selected window before each command. */)
3173 if (EQ (window, selected_window)) 3173 if (EQ (window, selected_window))
3174 return window; 3174 return window;
3175 3175
3176 /* Store the current buffer's actual point into the
3177 old selected window. It belongs to that window,
3178 and when the window is not selected, must be in the window. */
3176 if (!NILP (selected_window)) 3179 if (!NILP (selected_window))
3177 { 3180 {
3178 ow = XWINDOW (selected_window); 3181 ow = XWINDOW (selected_window);
@@ -5638,8 +5641,9 @@ the return value is nil. Otherwise the value is t. */)
5638#endif 5641#endif
5639#endif 5642#endif
5640 5643
5641 /* "Swap out" point from the selected window 5644 /* "Swap out" point from the selected window's buffer
5642 into its buffer. We do this now, before 5645 into the window itself. (Normally the pointm of the selected
5646 window holds garbage.) We do this now, before
5643 restoring the window contents, and prevent it from 5647 restoring the window contents, and prevent it from
5644 being done later on when we select a new window. */ 5648 being done later on when we select a new window. */
5645 if (! NILP (XWINDOW (selected_window)->buffer)) 5649 if (! NILP (XWINDOW (selected_window)->buffer))
@@ -5789,10 +5793,11 @@ the return value is nil. Otherwise the value is t. */)
5789 FRAME_ROOT_WINDOW (f) = data->root_window; 5793 FRAME_ROOT_WINDOW (f) = data->root_window;
5790 /* Prevent "swapping out point" in the old selected window 5794 /* Prevent "swapping out point" in the old selected window
5791 using the buffer that has been restored into it. 5795 using the buffer that has been restored into it.
5792 Use the point value from the beginning of this function 5796 We already swapped out point that from that window's old buffer. */
5793 since unshow_buffer (called from delete_all_subwindows)
5794 could have altered it. */
5795 selected_window = Qnil; 5797 selected_window = Qnil;
5798
5799 /* Arrange *not* to restore point in the buffer that was
5800 current when the window configuration was saved. */
5796 if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer)) 5801 if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))
5797 set_marker_restricted (XWINDOW (data->current_window)->pointm, 5802 set_marker_restricted (XWINDOW (data->current_window)->pointm,
5798 make_number (old_point), 5803 make_number (old_point),