jan, this should supersede your changes.
? fixup-427-5.diff
? lib-src/etags.pdb
? lib-src/hexl.pdb
? lib-src/i.pdb
? lib-src/make-docfile.pdb
? lib-src/mmencode.pdb
? lib-src/movemail.pdb
? lib-src/run.res
? lib-src/sorted-doc.pdb
? lib-src/vc50.pdb
? lib-src/wakeup.pdb
? lisp/process2.el
? nt/obj
? src/NEEDTODUMP
? src/runxemacs.pdb
? src/temacs.bsc
? src/temacs.map
? src/temacs.pdb
? src/xemacs.opt
? src/Xpm.dll
cvs server: Diffing .
cvs server: Diffing dynodump
cvs server: Diffing dynodump/i386
cvs server: Diffing dynodump/ppc
cvs server: Diffing dynodump/sparc
cvs server: Diffing etc
cvs server: Diffing etc/custom
cvs server: Diffing etc/custom/example-themes
cvs server: Diffing etc/eos
cvs server: Diffing etc/idd
cvs server: Diffing etc/photos
cvs server: Diffing etc/sparcworks
cvs server: Diffing etc/tests
cvs server: Diffing etc/tests/external-widget
cvs server: Diffing etc/toolbar
cvs server: Diffing info
cvs server: Diffing lib-src
cvs server: Diffing lisp
cvs server: Diffing lisp/mule
cvs server: Diffing lisp/term
cvs server: Diffing lock
cvs server: Diffing lwlib
cvs server: Diffing man
cvs server: Diffing man/internals
cvs server: Diffing man/lispref
cvs server: Diffing man/new-users-guide
cvs server: Diffing man/xemacs
cvs server: Diffing modules
cvs server: Diffing modules/base64
cvs server: Diffing modules/ldap
cvs server: Diffing modules/sample
cvs server: Diffing modules/zlib
cvs server: Diffing nt
cvs server: Diffing nt/inc
cvs server: Diffing nt/inc/arpa
cvs server: Diffing nt/inc/netinet
cvs server: Diffing nt/inc/sys
cvs server: Diffing nt/installer
cvs server: Diffing nt/installer/Wise
cvs server: Diffing src
Index: src/ChangeLog
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.154.2.589
diff -u -r1.154.2.589 ChangeLog
--- ChangeLog 2000/05/11 10:29:32 1.154.2.589
+++ ChangeLog 2000/05/12 09:03:44
@@ -1,3 +1,34 @@
+2000-05-12 Ben Wing <ben(a)xemacs.org>
+
+ * emacs.c:
+ * emacs.c (ensure_no_quitting_from_now_on):
+ * emacs.c (fatal_error_signal):
+ * emacs.c (mswindows_handle_hardware_exceptions):
+ * emacs.c (main):
+ * emacs.c (Fkill_emacs):
+ * emacs.c (shut_down_emacs):
+ * emacs.c (assert_failed):
+ various improvements in fatal error handling.
+
+ * eval.c:
+ move preparing_for_armageddon to emacs.c.
+
+ * lisp.h:
+ declare fatal_error_in_progress.
+
+ * print.c:
+ * print.c (std_handle_out_external):
+ * print.c (std_handle_out_va):
+ * print.c (stderr_out):
+ * print.c (stdout_out):
+ use console under mswin when no standard output.
+ don't do code conversion during fatal error.
+
+ * scrollbar.c (Fscrollbar_page_up):
+ * scrollbar.c (Fscrollbar_page_down):
+ fix missing else. reindent.
+
+
2000-05-11 Ben Wing <ben(a)xemacs.org>
* cmdloop.c (Freally_early_error_handler):
Index: src/emacs.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/emacs.c,v
retrieving revision 1.82.2.63
diff -u -r1.82.2.63 emacs.c
--- emacs.c 2000/05/11 05:40:14 1.82.2.63
+++ emacs.c 2000/05/12 09:03:45
@@ -2,6 +2,7 @@
Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994
Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
+ Copyright (C) 2000 Ben Wing.
This file is part of XEmacs.
@@ -305,8 +306,10 @@
priority. */
int emacs_priority;
-/* If non-zero a filter or a sentinel is running. Tested to save the match
- data on the first attempt to change it inside asynchronous code. */
+/* Some FSF junk with running_asynch_code, to preserve the match
+ data. Not necessary because we don't call process filters
+ asynchronously (i.e. from within QUIT). */
+/* #### Delete this when merging the rest of my code */
int running_asynch_code;
/* If non-zero, a window-system was specified on the command line. */
@@ -376,12 +379,64 @@
extern Lisp_Object Vlisp_EXEC_SUFFIXES;
-/* Signal code for the fatal signal that was received */
-static int fatal_error_code;
-/* Nonzero if handling a fatal error already */
-static int fatal_error_in_progress;
+/* Ben's capsule summary about expected and unexpected exits from XEmacs.
+ Expected exits occur when the user directs XEmacs to exit, for example
+ by pressing the close button on the only frame in XEmacs, or by typing
+ C-x C-c. This runs `save-buffers-kill-emacs', which saves any necessary
+ buffers, and then exits using the primitive `kill-emacs'.
+
+ However, unexpected exits occur in a few different ways:
+
+ -- a memory access violation or other hardware-generated exception
+ occurs. This is the worst possible problem to deal with, because
+ the fault can occur while XEmacs is in any state whatsoever, even
+ quite unstable ones. As a result, we need to be *extremely* careful
+ what we do.
+ -- we are using one X display (or if we've used more, we've closed the
+ others already), and some hardware or other problem happens and
+ suddenly we've lost our connection to the display. In this situation,
+ things are not so dire as in the last one; our code itself isn't
+ trashed, so we can continue execution as normal, after having set
+ things up so that we can exit at the appropriate time. Our exit
+ still needs to be of the emergency nature; we have no displays, so
+ any attempts to use them will fail. We simply want to auto-save
+ (the single most important thing to do during shut-down), do minimal
+ cleanup of stuff that has an independent existence outside of XEmacs,
+ and exit.
+
+ Currently, both unexpected exit scenarios described above set
+ preparing_for_armageddon to indicate that nonessential and possibly
+ dangerous things should not be done, specifically:
+
+ -- no garbage collection.
+ -- no hooks are run.
+ -- no messages of any sort from autosaving.
+ -- autosaving tries harder, ignoring certain failures.
+ -- existing frames are not deleted.
+
+ (Also, all places that set preparing_for_armageddon also
+ set dont_check_for_quit. This happens separately because it's
+ also necessary to set other variables to make absolutely sure
+ no quitting happens.)
+
+ In the first scenario above (the access violation), we also set
+ fatal_error_in_progress. This causes more things to not happen:
+
+ -- assertion failures do not abort.
+ -- printing code does not do code conversion or gettext when
+ printing to stdout/stderr.
+*/
+
+/* Nonzero if handling a fatal error already. */
+int fatal_error_in_progress;
+
+/* Non-nil means we're going down, so we better not run any hooks
+ or do other non-essential stuff. */
+int preparing_for_armageddon;
+
+
static JMP_BUF run_temacs_catch;
static int run_temacs_argc;
@@ -390,23 +445,54 @@
static size_t run_temacs_argv_size;
static size_t run_temacs_args_size;
-static void shut_down_emacs (int sig, Lisp_Object stuff);
+static void shut_down_emacs (int sig, Lisp_Object stuff, int no_auto_save);
+static void
+ensure_no_quitting_from_now_on (void)
+{
+ /* make sure no quitting from now on!! */
+ dont_check_for_quit = 1;
+ Vinhibit_quit = Qt;
+ Vquit_flag = Qnil;
+}
+
/* Handle bus errors, illegal instruction, etc. */
SIGTYPE
fatal_error_signal (int sig)
{
- fatal_error_code = sig;
- signal (sig, SIG_DFL);
+ fatal_error_in_progress++;
+ preparing_for_armageddon = 1;
+
+ ensure_no_quitting_from_now_on ();
+
/* Unblock the signal so that if the same signal gets sent in the
code below, we avoid a deadlock. */
- EMACS_UNBLOCK_SIGNAL (fatal_error_code);
+ EMACS_UNBLOCK_SIGNAL (sig);
+
+ /* Only try auto-saving first time through. If we crash in auto-saving,
+ don't do it again. */
+ if (fatal_error_in_progress == 1)
+ {
+ Fdo_auto_save (Qt, Qnil); /* do this before anything hazardous */
+ /* Do this so that the variable has the same value of 2 regardless of
+ whether we made it through auto-saving correctly. */
+ fatal_error_in_progress++;
+ }
+ else if (fatal_error_in_progress == 2)
+ stderr_out ("WARNING: Unable to auto-save your files properly.\n"
+ "Some or all may in fact have been auto-saved.\n"
+ "\n");
+
+ /* Now, reset our signal handler, so the next time, we just die.
+ Don't do this before auto-saving. */
+ signal (sig, SIG_DFL);
+ /* Keep in mind that there's more than one signal that we can crash
+ on. */
/* If fatal error occurs in code below, avoid infinite recursion. */
- if (! fatal_error_in_progress)
+ if (fatal_error_in_progress <= 2)
{
- fatal_error_in_progress = dont_check_for_quit = 1;
- shut_down_emacs (sig, Qnil);
+ shut_down_emacs (sig, Qnil, 1);
stderr_out ("\nLisp backtrace follows:\n\n");
Fbacktrace (Qexternal_debugging_output, Qt);
# if 0 /* This is evil, rarely useful, and causes grief in some cases. */
@@ -425,9 +511,62 @@
# endif
}
/* Signal the same code; this time it will really be fatal. */
- kill (getpid (), fatal_error_code);
+ kill (getpid (), sig);
SIGRETURN;
}
+
+#ifdef _MSC_VER
+
+static DWORD
+mswindows_handle_hardware_exceptions (DWORD code)
+{
+ if (code != STATUS_ACCESS_VIOLATION && code != STATUS_ILLEGAL_INSTRUCTION
+ && code != STATUS_PRIVILEGED_INSTRUCTION
+ && code != STATUS_DATATYPE_MISALIGNMENT)
+ return EXCEPTION_CONTINUE_SEARCH;
+
+ /* I don't know if this filter is still wrapped in the outer __try, but
+ it doesn't hurt to have another one. --ben */
+ __try
+ {
+ fatal_error_in_progress++;
+ preparing_for_armageddon = 1;
+
+ ensure_no_quitting_from_now_on ();
+
+ /* Only try auto-saving first time through. If we crash in auto-saving,
+ don't do it again. */
+ if (fatal_error_in_progress == 1)
+ {
+ Fdo_auto_save (Qt, Qnil); /* do this before anything hazardous */
+ /* Do this so that the variable has the same value of 2 regardless of
+ whether we made it through auto-saving correctly. */
+ fatal_error_in_progress++;
+ }
+ else if (fatal_error_in_progress == 2)
+ stderr_out ("WARNING: Unable to auto-save your files properly.\n"
+ "Some or all may in fact have been auto-saved.\n"
+ "\n");
+
+ /* If fatal error occurs in code below, avoid infinite recursion. */
+ if (fatal_error_in_progress <= 2)
+ {
+ shut_down_emacs (-1, Qnil, 1);
+ stderr_out ("\nLisp backtrace follows:\n\n");
+ Fbacktrace (Qexternal_debugging_output, Qt);
+ }
+ }
+ /* VC++ documentation says that
+ GetExceptionCode() cannot be called inside the filter itself. */
+ __except (mswindows_handle_hardware_exceptions (GetExceptionCode ())) {}
+
+ /* pretend we didn't handle this, so that the debugger is invoked and/or
+ the normal GPF box appears. */
+ return EXCEPTION_CONTINUE_SEARCH;
+}
+
+#endif /* _MSC_VER */
+
#ifdef SIGDANGER
@@ -2308,6 +2447,16 @@
int
main (int argc, char **argv, char **envp)
{
+
+#ifdef _MSC_VER
+ /* Under VC++, access violations and the like are not sent through
+ the standard signal() mechanism. Rather, they need to be handled
+ using the Microsoft "structured exception handling" mechanism,
+ which vaguely resembles the C++ mechanisms. */
+ __try
+ {
+#endif
+
int volatile vol_argc = argc;
char ** volatile vol_argv = argv;
char ** volatile vol_envp = envp;
@@ -2425,6 +2574,14 @@
run_temacs_argc = -1;
main_1 (vol_argc, vol_argv, vol_envp, restarted);
+
+#ifdef _MSC_VER
+ }
+ /* VC++ documentation says that
+ GetExceptionCode() cannot be called inside the filter itself. */
+ __except (mswindows_handle_hardware_exceptions (GetExceptionCode ())) {}
+#endif
+
return 0; /* unreached */
}
@@ -2469,9 +2626,7 @@
if (!preparing_for_armageddon && !noninteractive)
run_hook (Qkill_emacs_hook);
- /* make sure no quitting from now on!! */
- dont_check_for_quit = 1;
- Vinhibit_quit = Qt;
+ ensure_no_quitting_from_now_on ();
if (!preparing_for_armageddon)
{
@@ -2499,7 +2654,7 @@
UNGCPRO;
- shut_down_emacs (0, STRINGP (arg) ? arg : Qnil);
+ shut_down_emacs (0, STRINGP (arg) ? arg : Qnil, 0);
#if defined(GNU_MALLOC)
__free_hook =
@@ -2522,45 +2677,54 @@
If SIG is a signal number, print a message for it.
- This is called by fatal signal handlers, X protocol error handlers,
- and Fkill_emacs. */
+ This is called by fatal signal handlers and Fkill_emacs. It used to
+ be called by X protocol error handlers, but instead they now call
+ Fkill_emacs. */
static void
-shut_down_emacs (int sig, Lisp_Object stuff)
+shut_down_emacs (int sig, Lisp_Object stuff, int no_auto_save)
{
/* This function can GC */
/* Prevent running of hooks and other non-essential stuff
from now on. */
preparing_for_armageddon = 1;
- /* In case frames or windows are screwed up, avoid assertion
- failures here */
- Vinhibit_quit = Qt;
+ ensure_no_quitting_from_now_on ();
#ifdef QUANTIFY
quantify_stop_recording_data ();
#endif /* QUANTIFY */
-#if 0
/* This is absolutely the most important thing to do, so make sure
we do it now, before anything else. We might have crashed and
be in a weird inconsistent state, and potentially anything could
set off another protection fault and cause us to bail out
immediately. */
- /* I'm not removing the code entirely, yet. We have run up against
+ /* Steve writes the following:
+
+ [[I'm not removing the code entirely, yet. We have run up against
a spate of problems in diagnosing crashes due to crashes within
crashes. It has very definitely been determined that code called
during auto-saving cannot work if XEmacs crashed inside of GC.
We already auto-save on an itimer so there cannot be too much
unsaved stuff around, and if we get better crash reports we might
- be able to get more problems fixed so I'm disabling this. -slb */
- Fdo_auto_save (Qt, Qnil); /* do this before anything hazardous */
-#endif
+ be able to get more problems fixed so I'm disabling this. -slb]]
+ and DISABLES AUTO-SAVING ENTIRELY during crashes! Way way bad idea.
+
+ Instead let's just be more intelligent about avoiding crashing
+ when possible, esp. nested crashes.
+ */
+ if (!no_auto_save)
+ Fdo_auto_save (Qt, Qnil); /* do this before anything hazardous */
+
fflush (stdout);
reset_all_consoles ();
if (sig && sig != SIGTERM)
{
- stderr_out ("\nFatal error (%d).\n", sig);
+ if (sig == -1)
+ stderr_out ("\nFatal error.\n\n");
+ else
+ stderr_out ("\nFatal error (%d).\n\n", sig);
stderr_out
("Your files have been auto-saved.\n"
"Use `M-x recover-session' to recover them.\n"
@@ -2579,6 +2743,7 @@
#endif
"*MAKE SURE* to include the information in the command\n"
"M-x describe-installation.\n"
+#ifndef _MSC_VER
"\n"
"If at all possible, *please* try to obtain a C stack backtrace;\n"
"it will help us immensely in determining what went wrong.\n"
@@ -2587,7 +2752,10 @@
"directory in which you started the editor, or maybe in your home\n"
"directory), and type\n"
"\n"
- " gdb ");
+ " gdb "
+#endif
+ );
+#ifndef _MSC_VER
{
const char *name;
char *dir = 0;
@@ -2614,6 +2782,7 @@
"(If you don't have GDB on your system, you might have DBX,\n"
"or XDB, or SDB. A similar procedure should work for all of\n"
"these. Ask your system administrator if you need more help.)\n");
+#endif /* _MSC_VER */
}
stuff_buffered_input (stuff);
@@ -2877,17 +3046,75 @@
#ifdef USE_ASSERTIONS
/* This highly dubious kludge ... shut up Jamie, I'm tired of your slagging. */
-DOESNT_RETURN
-assert_failed (const char *file, int line, const char *expr)
-{
- stderr_out ("Fatal error: assertion failed, file %s, line %d, %s\n",
- file, line, expr);
+static int in_assert_failed;
+static const char *assert_failed_file;
+static int assert_failed_line;
+static const char *assert_failed_expr;
+
+#ifdef fprintf
+#undef fprintf
+#endif
+
#undef abort /* avoid infinite #define loop... */
+
#if defined (WINDOWSNT) && defined (DEBUG_XEMACS)
- DebugBreak ();
-#elif !defined (ASSERTIONS_DONT_ABORT)
+#define enter_debugger() DebugBreak ()
+#else
+#define enter_debugger()
+#endif
+
+void
+assert_failed (const char *file, int line, const char *expr)
+{
+ /* If we're already crashing, let's not crash again. This might be
+ critical to getting auto-saving working properly. */
+ if (fatal_error_in_progress)
+ return;
+
+ /* We are extremely paranoid so we sensibly deal with recursive
+ assertion failures. */
+ in_assert_failed++;
+
+ if (in_assert_failed >= 4)
+ _exit (-1);
+ else if (in_assert_failed == 3)
+ {
+ enter_debugger ();
+ _exit (-1);
+ }
+ else if (in_assert_failed == 2)
+ {
+ /* Not stderr_out(), which does additional things and may trigger
+ a recursive assertion failure. fprintf was undeffed above, in
+ case it was encapsulated. */
+ fprintf (stderr,
+ "Fatal error: recursive assertion failure, "
+ "file %s, line %d, %s\n",
+ file, line, expr);
+ fprintf (stderr,
+ "Original assertion failure: file %s, line %d, %s\n",
+ assert_failed_file, assert_failed_line, assert_failed_expr);
+ }
+ else
+ {
+ assert_failed_file = file;
+ assert_failed_line = line;
+ assert_failed_expr = expr;
+
+ if (!initialized)
+ fprintf (stderr,
+ "Fatal error: assertion failed, file %s, line %d, %s\n",
+ file, line, expr);
+ else
+ stderr_out ("Fatal error: assertion failed, file %s, line %d, %s\n",
+ file, line, expr);
+ }
+
+ enter_debugger ();
+#if !defined (ASSERTIONS_DONT_ABORT)
abort ();
#endif
+ in_assert_failed = 0;
}
#endif /* USE_ASSERTIONS */
Index: src/eval.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/eval.c,v
retrieving revision 1.27.2.22
diff -u -r1.27.2.22 eval.c
--- eval.c 2000/04/06 21:57:49 1.27.2.22
+++ eval.c 2000/05/12 09:03:47
@@ -143,10 +143,6 @@
/* Special catch tag used in call_with_suspended_errors(). */
Lisp_Object Qunbound_suspended_errors_tag;
-/* Non-nil means we're going down, so we better not run any hooks
- or do other non-essential stuff. */
-int preparing_for_armageddon;
-
/* Non-nil means record all fset's and provide's, to be undone
if the file being autoloaded is not fully loaded.
They are recorded by being consed onto the front of Vautoload_queue:
Index: src/lisp.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/lisp.h,v
retrieving revision 1.38.2.61
diff -u -r1.38.2.61 lisp.h
--- lisp.h 2000/05/11 10:29:36 1.38.2.61
+++ lisp.h 2000/05/12 09:03:48
@@ -2130,6 +2130,7 @@
Lisp_Object decode_path (const char *);
/* Nonzero means don't do interactive redisplay and don't change tty modes */
extern int noninteractive, noninteractive1;
+extern int fatal_error_in_progress;
extern int preparing_for_armageddon;
extern int emacs_priority;
extern int running_asynch_code;
Index: src/print.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/print.c,v
retrieving revision 1.27.2.17
diff -u -r1.27.2.17 print.c
--- print.c 2000/03/13 10:04:29 1.27.2.17
+++ print.c 2000/05/12 09:03:49
@@ -106,6 +106,10 @@
int stdout_needs_newline;
+#ifdef WINDOWSNT
+static int no_useful_stderr;
+#endif
+
static void
std_handle_out_external (FILE *stream, Lisp_Object lstream,
const Extbyte *extptr, Extcount extlen,
@@ -117,9 +121,12 @@
if (stream)
{
#ifdef WINDOWSNT
+ if (!no_useful_stderr)
+ no_useful_stderr = GetStdHandle (STD_ERROR_HANDLE) == 0 ? 1 : -1;
+
/* we typically have no useful stdout/stderr under windows if we're
being invoked graphically. */
- if (!noninteractive)
+ if (!noninteractive || no_useful_stderr > 0)
msw_output_console_string (extptr, extlen);
else
#endif
@@ -174,9 +181,16 @@
int retval;
retval = vsprintf ((char *) kludge, fmt, args);
- TO_EXTERNAL_FORMAT (DATA, (kludge, strlen ((char *) kludge)),
- ALLOCA, (extptr, extlen),
- Qnative);
+ if (initialized && !fatal_error_in_progress)
+ TO_EXTERNAL_FORMAT (DATA, (kludge, strlen ((char *) kludge)),
+ ALLOCA, (extptr, extlen),
+ Qnative);
+ else
+ {
+ extptr = (Extbyte *) kludge;
+ extlen = (Extcount) strlen ((char *) kludge);
+ }
+
std_handle_out_external (stream, Qnil, extptr, extlen, 1, 1);
return retval;
}
@@ -190,7 +204,10 @@
int retval;
va_list args;
va_start (args, fmt);
- retval = std_handle_out_va (stderr, GETTEXT (fmt), args);
+ retval =
+ std_handle_out_va
+ (stderr, initialized && !fatal_error_in_progress ? GETTEXT (fmt) : fmt,
+ args);
va_end (args);
return retval;
}
@@ -204,7 +221,10 @@
int retval;
va_list args;
va_start (args, fmt);
- retval = std_handle_out_va (stdout, GETTEXT (fmt), args);
+ retval =
+ std_handle_out_va
+ (stdout, initialized && !fatal_error_in_progress ? GETTEXT (fmt) : fmt,
+ args);
va_end (args);
return retval;
}
Index: src/scrollbar.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/scrollbar.c,v
retrieving revision 1.17.2.6
diff -u -r1.17.2.6 scrollbar.c
--- scrollbar.c 2000/05/08 12:32:06 1.17.2.6
+++ scrollbar.c 2000/05/12 09:03:49
@@ -737,24 +737,24 @@
cursor motion routines is necessary. */
if (NILP (XCDR (object)))
- window_scroll (window, Qnil, -1, ERROR_ME_NOT);
+ window_scroll (window, Qnil, -1, ERROR_ME_NOT);
else
- {
- Bufpos bufpos;
- Lisp_Object value = Fcdr (object);
-
- CHECK_INT (value);
- Fmove_to_window_line (Qzero, window);
- /* can't use Fvertical_motion() because it moves the buffer point
- rather than the window's point.
-
- #### It does? Why does it take a window argument then? */
- bufpos = vmotion (XWINDOW (window), XINT (Fwindow_point (window)),
- XINT (value), 0);
- Fset_window_point (window, make_int (bufpos));
- Fcenter_to_window_line (Qzero, window);
- }
+ {
+ Bufpos bufpos;
+ Lisp_Object value = Fcdr (object);
+ CHECK_INT (value);
+ Fmove_to_window_line (Qzero, window);
+ /* can't use Fvertical_motion() because it moves the buffer point
+ rather than the window's point.
+
+ #### It does? Why does it take a window argument then? */
+ bufpos = vmotion (XWINDOW (window), XINT (Fwindow_point (window)),
+ XINT (value), 0);
+ Fset_window_point (window, make_int (bufpos));
+ Fcenter_to_window_line (Qzero, window);
+ }
+
zmacs_region_stays = 1;
return Qnil;
}
@@ -776,14 +776,16 @@
with their standard behaviors. It is not possible to hide the
differences down in lwlib because knowledge of XEmacs buffer and
cursor motion routines is necessary. */
+
if (NILP (XCDR (object)))
- window_scroll (window, Qnil, 1, ERROR_ME_NOT);
- {
- Lisp_Object value = Fcdr (object);
- CHECK_INT (value);
- Fmove_to_window_line (value, window);
- Fcenter_to_window_line (Qzero, window);
- }
+ window_scroll (window, Qnil, 1, ERROR_ME_NOT);
+ else
+ {
+ Lisp_Object value = Fcdr (object);
+ CHECK_INT (value);
+ Fmove_to_window_line (value, window);
+ Fcenter_to_window_line (Qzero, window);
+ }
zmacs_region_stays = 1;
return Qnil;
cvs server: Diffing src/m
cvs server: Diffing src/s
cvs server: Diffing tests
cvs server: Diffing tests/DLL
cvs server: Diffing tests/Dnd
cvs server: Diffing tests/automated
cvs server: Diffing tests/mule
cvs server: Diffing tests/tooltalk
--
Ben
In order to save my hands, I am cutting back on my mail. I also write
as succinctly as possible -- please don't be offended. If you send me
mail, you _will_ get a response, but please be patient, especially for
XEmacs-related mail. If you need an immediate response and it is not
apparent in your message, please say so. Thanks for your understanding.
See also
http://www.666.com/ben/chronic-pain/