From 8f59a4b0d6a9ab220ea5e2d83d9e512e8b95fb7f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 27 Mar 2005 14:23:09 +0000 Subject: (Fgoto_char): Fix docstring. Probably left-over from Emacs-20.1. --- src/editfns.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/editfns.c b/src/editfns.c index 0587d66bb0f..f77b9cafc80 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1,6 +1,6 @@ /* Lisp functions pertaining to editing. - Copyright (C) 1985,86,87,89,93,94,95,96,97,98,1999,2000,01,02,03,2004 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -265,10 +265,7 @@ clip_to_bounds (lower, num, upper) DEFUN ("goto-char", Fgoto_char, Sgoto_char, 1, 1, "NGoto char: ", doc: /* Set point to POSITION, a number or marker. -Beginning of buffer is position (point-min), end is (point-max). -If the position is in the middle of a multibyte form, -the actual point is set at the head of the multibyte form -except in the case that `enable-multibyte-characters' is nil. */) +Beginning of buffer is position (point-min), end is (point-max). */) (position) register Lisp_Object position; { -- cgit v1.2.1 From c70a4df6d2e683a591e7487c7940f7f18f5af65e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 28 Mar 2005 21:31:14 +0000 Subject: (Fexpand_file_name): Use IS_DEVICE_SEP. (file_name_absolute_p): New fun, extracted from Ffile_name_absolute_p. (Ffile_name_absolute_p): Use it. (search_embedded_absfilename): New fun, extracted from Fsubstitute_in_file_name. Use file_name_absolute_p. Free the pw data after use. (Fsubstitute_in_file_name): Use it. After cutting a prefix, re-check file-name-handler. --- src/ChangeLog | 11 ++++ src/fileio.c | 179 +++++++++++++++++++++++++++++----------------------------- 2 files changed, 99 insertions(+), 91 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 4ea174bdc60..1a5561160d0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2005-03-28 Stefan Monnier + + * fileio.c (Fexpand_file_name): Use IS_DEVICE_SEP. + (file_name_absolute_p): New fun, extracted from Ffile_name_absolute_p. + (Ffile_name_absolute_p): Use it. + (search_embedded_absfilename): New fun, extracted from + Fsubstitute_in_file_name. Use file_name_absolute_p. + Free the pw data after use. + (Fsubstitute_in_file_name): Use it. + After cutting a prefix, re-check file-name-handler. + 2005-03-26 Lennart Borgman * w32term.h (x_output): add focus_state. diff --git a/src/fileio.c b/src/fileio.c index dbbcace1212..58efa38c254 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1014,7 +1014,7 @@ probably use `make-temp-file' instead, except in three circumstances: DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, doc: /* Convert filename NAME to absolute, and canonicalize it. Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative - (does not start with slash); if DEFAULT-DIRECTORY is nil or missing, +\(does not start with slash); if DEFAULT-DIRECTORY is nil or missing, the current buffer's value of default-directory is used. File name components that are `.' are removed, and so are file name components followed by `..', along with the `..' itself; @@ -1464,7 +1464,7 @@ See also the function `substitute-in-file-name'. */) indirectly by prepending newdir to nm if necessary, and using cwd (or the wd of newdir's drive) as the new newdir. */ - if (IS_DRIVE (newdir[0]) && newdir[1] == ':') + if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1])) { drive = newdir[0]; newdir += 2; @@ -1487,7 +1487,7 @@ See also the function `substitute-in-file-name'. */) } /* Strip off drive name from prefix, if present. */ - if (IS_DRIVE (newdir[0]) && newdir[1] == ':') + if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1])) { drive = newdir[0]; newdir += 2; @@ -1721,7 +1721,7 @@ See also the function `substitute-in-file-name'. */) DEAFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, "Convert FILENAME to absolute, and canonicalize it.\n\ Second arg DEFAULT is directory to start with if FILENAME is relative\n\ - (does not start with slash); if DEFAULT is nil or missing,\n\ +\(does not start with slash); if DEFAULT is nil or missing,\n\ the current buffer's value of default-directory is used.\n\ Filenames containing `.' or `..' as components are simplified;\n\ initial `~/' expands to your home directory.\n\ @@ -2040,6 +2040,75 @@ See also the function `substitute-in-file-name'.") } #endif +/* If /~ or // appears, discard everything through first slash. */ +static int +file_name_absolute_p (filename) + const unsigned char *filename; +{ + return + (IS_DIRECTORY_SEP (*filename) || *filename == '~' +#ifdef VMS + /* ??? This criterion is probably wrong for '<'. */ + || index (filename, ':') || index (filename, '<') + || (*filename == '[' && (filename[1] != '-' + || (filename[2] != '.' && filename[2] != ']')) + && filename[1] != '.') +#endif /* VMS */ +#ifdef DOS_NT + || (IS_DRIVE (*filename) && IS_DEVICE_SEP (filename[1]) + && IS_DIRECTORY_SEP (filename[2])) +#endif + ); +} + +static unsigned char * +search_embedded_absfilename (nm, endp) + unsigned char *nm, *endp; +{ + unsigned char *p, *s; + + for (p = nm + 1; p < endp; p++) + { + if ((0 +#ifdef VMS + || p[-1] == ':' || p[-1] == ']' || p[-1] == '>' +#endif /* VMS */ + || IS_DIRECTORY_SEP (p[-1])) + && file_name_absolute_p (p) +#if defined (APOLLO) || defined (WINDOWSNT) || defined(CYGWIN) + /* // at start of file name is meaningful in Apollo, + WindowsNT and Cygwin systems. */ + && !(IS_DIRECTORY_SEP (p[0]) && p - 1 != nm) +#endif /* not (APOLLO || WINDOWSNT || CYGWIN) */ + ) + { + for (s = p; *s && (!IS_DIRECTORY_SEP (*s) +#ifdef VMS + && *s != ':' +#endif /* VMS */ + ); s++); + if (p[0] == '~' && s > p + 1) /* we've got "/~something/" */ + { + unsigned char *o = alloca (s - p + 1); + struct passwd *pw; + bcopy (p, o, s - p); + o [s - p] = 0; + + /* If we have ~user and `user' exists, discard + everything up to ~. But if `user' does not exist, leave + ~user alone, it might be a literal file name. */ + if ((pw = getpwnam (o + 1))) + return p; + else + xfree (pw); + } + else + return p; + } + } + return NULL; +} + DEFUN ("substitute-in-file-name", Fsubstitute_in_file_name, Ssubstitute_in_file_name, 1, 1, 0, doc: /* Substitute environment variables referred to in FILENAME. @@ -2061,7 +2130,6 @@ duplicates what `expand-file-name' does. */) int total = 0; int substituted = 0; unsigned char *xnm; - struct passwd *pw; Lisp_Object handler; CHECK_STRING (filename); @@ -2081,61 +2149,17 @@ duplicates what `expand-file-name' does. */) endp = nm + SBYTES (filename); /* If /~ or // appears, discard everything through first slash. */ - - for (p = nm; p != endp; p++) - { - if ((p[0] == '~' -#if defined (APOLLO) || defined (WINDOWSNT) || defined(CYGWIN) - /* // at start of file name is meaningful in Apollo, - WindowsNT and Cygwin systems. */ - || (IS_DIRECTORY_SEP (p[0]) && p - 1 != nm) -#else /* not (APOLLO || WINDOWSNT || CYGWIN) */ - || IS_DIRECTORY_SEP (p[0]) -#endif /* not (APOLLO || WINDOWSNT || CYGWIN) */ - ) - && p != nm - && (0 -#ifdef VMS - || p[-1] == ':' || p[-1] == ']' || p[-1] == '>' -#endif /* VMS */ - || IS_DIRECTORY_SEP (p[-1]))) - { - for (s = p; *s && (!IS_DIRECTORY_SEP (*s) -#ifdef VMS - && *s != ':' -#endif /* VMS */ - ); s++); - if (p[0] == '~' && s > p + 1) /* we've got "/~something/" */ - { - o = (unsigned char *) alloca (s - p + 1); - bcopy ((char *) p, o, s - p); - o [s - p] = 0; - - pw = (struct passwd *) getpwnam (o + 1); - } - /* If we have ~/ or ~user and `user' exists, discard - everything up to ~. But if `user' does not exist, leave - ~user alone, it might be a literal file name. */ - if (IS_DIRECTORY_SEP (p[0]) || s == p + 1 || pw) - { - nm = p; - substituted = 1; - } - } -#ifdef DOS_NT - /* see comment in expand-file-name about drive specifiers */ - else if (IS_DRIVE (p[0]) && p[1] == ':' - && p > nm && IS_DIRECTORY_SEP (p[-1])) - { - nm = p; - substituted = 1; - } -#endif /* DOS_NT */ - } + p = search_embedded_absfilename (nm, endp); + if (p) + /* Start over with the new string, so we check the file-name-handler + again. Important with filenames like "/home/foo//:/hello///there" + which whould substitute to "/:/hello///there" rather than "/there". */ + return Fsubstitute_in_file_name + (make_specified_string (p, -1, endp - p, + STRING_MULTIBYTE (filename))); #ifdef VMS - return make_specified_string (nm, -1, strlen (nm), - STRING_MULTIBYTE (filename)); + return filename; #else /* See if any variables are substituted into the string @@ -2261,22 +2285,11 @@ duplicates what `expand-file-name' does. */) *x = 0; /* If /~ or // appears, discard everything through first slash. */ - - for (p = xnm; p != x; p++) - if ((p[0] == '~' -#if defined (APOLLO) || defined (WINDOWSNT) || defined(CYGWIN) - || (IS_DIRECTORY_SEP (p[0]) && p - 1 != xnm) -#else /* not (APOLLO || WINDOWSNT || CYGWIN) */ - || IS_DIRECTORY_SEP (p[0]) -#endif /* not (APOLLO || WINDOWSNT || CYGWIN) */ - ) - && p != xnm && IS_DIRECTORY_SEP (p[-1])) - xnm = p; -#ifdef DOS_NT - else if (IS_DRIVE (p[0]) && p[1] == ':' - && p > xnm && IS_DIRECTORY_SEP (p[-1])) - xnm = p; -#endif + while ((p = search_embedded_absfilename (xnm, x))) + /* This time we do not start over because we've already expanded envvars + and replaced $$ with $. Maybe we should start over as well, but we'd + need to quote some $ to $$ first. */ + xnm = p; return make_specified_string (xnm, -1, x - xnm, STRING_MULTIBYTE (filename)); @@ -2959,24 +2972,8 @@ On Unix, this is a name starting with a `/' or a `~'. */) (filename) Lisp_Object filename; { - const unsigned char *ptr; - CHECK_STRING (filename); - ptr = SDATA (filename); - if (IS_DIRECTORY_SEP (*ptr) || *ptr == '~' -#ifdef VMS -/* ??? This criterion is probably wrong for '<'. */ - || index (ptr, ':') || index (ptr, '<') - || (*ptr == '[' && (ptr[1] != '-' || (ptr[2] != '.' && ptr[2] != ']')) - && ptr[1] != '.') -#endif /* VMS */ -#ifdef DOS_NT - || (IS_DRIVE (*ptr) && ptr[1] == ':' && IS_DIRECTORY_SEP (ptr[2])) -#endif - ) - return Qt; - else - return Qnil; + return file_name_absolute_p (SDATA (filename)) ? Qt : Qnil; } /* Return nonzero if file FILENAME exists and can be executed. */ -- cgit v1.2.1 From c364fe1954f1266e3f59df49a2de731a790551cf Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Tue, 29 Mar 2005 22:28:11 +0000 Subject: *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 1a5561160d0..55c11986e12 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-03-30 Kim F. Storm + + * xdisp.c (display_line): Allow multiple overlay arrows in window. + 2005-03-28 Stefan Monnier * fileio.c (Fexpand_file_name): Use IS_DEVICE_SEP. -- cgit v1.2.1 From 39df553f4d983f57c83fcca5c3f6ccd6e9d24c06 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Tue, 29 Mar 2005 22:28:27 +0000 Subject: (display_line): Allow multiple overlay arrows in window. --- src/xdisp.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/xdisp.c b/src/xdisp.c index fdaf2bf1a3c..d463a3d7fcd 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -462,7 +462,7 @@ static Lisp_Object Vwindow_size_change_functions; Lisp_Object Qmenu_bar_update_hook, Vmenu_bar_update_hook; -/* Nonzero if overlay arrow has been displayed once in this window. */ +/* Nonzero if an overlay arrow has been displayed in this window. */ static int overlay_arrow_seen; @@ -15261,10 +15261,9 @@ display_line (it) mark this glyph row as the one containing the overlay arrow. This is clearly a mess with variable size fonts. It would be better to let it be displayed like cursors under X. */ - if (! overlay_arrow_seen - && (overlay_arrow_string - = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap), - !NILP (overlay_arrow_string))) + if ((overlay_arrow_string + = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap), + !NILP (overlay_arrow_string))) { /* Overlay arrow in window redisplay is a fringe bitmap. */ if (STRINGP (overlay_arrow_string)) -- cgit v1.2.1 From f34574c6d51766120439a80da418a2700309c798 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 30 Mar 2005 22:33:00 +0000 Subject: (search_embedded_absfilename): Fix last change. --- src/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/fileio.c b/src/fileio.c index 58efa38c254..7e24c94783b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2078,7 +2078,7 @@ search_embedded_absfilename (nm, endp) #if defined (APOLLO) || defined (WINDOWSNT) || defined(CYGWIN) /* // at start of file name is meaningful in Apollo, WindowsNT and Cygwin systems. */ - && !(IS_DIRECTORY_SEP (p[0]) && p - 1 != nm) + && !(IS_DIRECTORY_SEP (p[0]) && p - 1 == nm) #endif /* not (APOLLO || WINDOWSNT || CYGWIN) */ ) { -- cgit v1.2.1 From f793f88572253947eff8d61d2ce28ffcee04ecb8 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Thu, 31 Mar 2005 10:10:59 +0000 Subject: *** empty log message *** --- src/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 55c11986e12..eec09dac664 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-03-31 Kim F. Storm + + * keyboard.c (Qmouse_fixup_help_message): New var. + (syms_of_keyboard): Intern and staticpro it. + (show_help_echo): Apply mouse-fixup-help-message to help string. + 2005-03-30 Kim F. Storm * xdisp.c (display_line): Allow multiple overlay arrows in window. -- cgit v1.2.1 From c22237f77ec94f5339311c1a3a7cb904b7c3f6ec Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Thu, 31 Mar 2005 10:11:14 +0000 Subject: (Qmouse_fixup_help_message): New var. (syms_of_keyboard): Intern and staticpro it. (show_help_echo): Apply mouse-fixup-help-message to help string. --- src/keyboard.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/keyboard.c b/src/keyboard.c index f9b0a843de5..f1a131a6f4e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -523,6 +523,10 @@ Lisp_Object Qmake_frame_visible; Lisp_Object Qselect_window; Lisp_Object Qhelp_echo; +#ifdef HAVE_MOUSE +Lisp_Object Qmouse_fixup_help_message; +#endif + /* Symbols to denote kinds of events. */ Lisp_Object Qfunction_key; Lisp_Object Qmouse_click; @@ -2304,6 +2308,11 @@ show_help_echo (help, window, object, pos, ok_to_overwrite_keystroke_echo) return; } +#ifdef HAVE_MOUSE + if (!noninteractive && STRINGP (help)) + help = call1 (Qmouse_fixup_help_message, help); +#endif + if (STRINGP (help) || NILP (help)) { if (!NILP (Vshow_help_function)) @@ -10875,6 +10884,11 @@ syms_of_keyboard () Qmenu_bar = intern ("menu-bar"); staticpro (&Qmenu_bar); +#ifdef HAVE_MOUSE + Qmouse_fixup_help_message = intern ("mouse-fixup-help-message"); + staticpro (&Qmouse_fixup_help_message); +#endif + Qabove_handle = intern ("above-handle"); staticpro (&Qabove_handle); Qhandle = intern ("handle"); -- cgit v1.2.1 From bf762c986c83b78cac247e5c96293db707cce184 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 31 Mar 2005 11:20:58 +0000 Subject: *** empty log message *** --- src/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index eec09dac664..298445b7935 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2005-03-31 Kenichi Handa + + * coding.c (syms_of_coding): Fix previous change. + +2005-03-25 Kenichi Handa + + * coding.c (syms_of_coding): Suggest to use set-coding-category in + the docstring of coding-category-list. + 2005-03-31 Kim F. Storm * keyboard.c (Qmouse_fixup_help_message): New var. -- cgit v1.2.1 From 4220560759fac850b5501c9cf5b60e94baac5f06 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 31 Mar 2005 11:21:14 +0000 Subject: (Vcoding_category_list): Docstring fix. --- src/coding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/coding.c b/src/coding.c index 1cc75fdae16..4ae1a25e8f0 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7825,7 +7825,7 @@ associated with each coding-category one by one in this order. When one algorithm agrees with a byte sequence of source text, the coding system bound to the corresponding coding-category is selected. -Don't modify this variable directly, but use `set-coding-category'. */); +Don't modify this variable directly, but use `set-coding-priority'. */); { int i; -- cgit v1.2.1 From fafbb99d577133c09d38ef2aa315a7b583c38079 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Thu, 31 Mar 2005 11:22:55 +0000 Subject: *** empty log message *** --- src/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 298445b7935..53469408d71 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,4 @@ -2005-03-31 Kenichi Handa +2005-03-31 Kenichi Handa * coding.c (syms_of_coding): Fix previous change. -- cgit v1.2.1 From 6ca5360192fbe50abd5e43ba2ed28aa115af4d65 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 31 Mar 2005 22:43:13 +0000 Subject: Include ThreeD.h for XtNbeNiceToColormap. (x_create_toolkit_scroll_bar): Test XtNbeNiceToColormap before using it. Use XtNtopShadowPixel and XtNbottomShadowPixel. (x_set_toolkit_scroll_bar_thumb): Remove ugly old hack that didn't really work and that breaks with some versions of Xaw3d. --- src/ChangeLog | 14 +++++++++++++- src/xterm.c | 29 +++++------------------------ 2 files changed, 18 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 53469408d71..258948bf5d3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,19 @@ +2005-03-31 Stefan Monnier + + * xterm.c [HAVE_XAW3D]: Include ThreeD.h for XtNbeNiceToColormap. + (x_create_toolkit_scroll_bar): Test XtNbeNiceToColormap before using it. + Use XtNtopShadowPixel and XtNbottomShadowPixel. + (x_set_toolkit_scroll_bar_thumb): Remove ugly old hack that didn't + really work and that breaks with some versions of Xaw3d. + 2005-03-31 Kenichi Handa * coding.c (syms_of_coding): Fix previous change. +2005-03-30 Stefan Monnier + + * fileio.c (search_embedded_absfilename): Fix last change. + 2005-03-25 Kenichi Handa * coding.c (syms_of_coding): Suggest to use set-coding-category in @@ -30,7 +42,7 @@ 2005-03-26 Lennart Borgman - * w32term.h (x_output): add focus_state. + * w32term.h (x_output): Add focus_state. * w32term.c (x_focus_changed, w32_detect_focus_change): New functions. (w32_read_socket) [WM_SETFOCUS]: Call w32_detect_focus_change. diff --git a/src/xterm.c b/src/xterm.c index 609ffefcbbe..fcc4c67743a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -130,9 +130,7 @@ extern void _XEditResCheckMessages (); #ifdef HAVE_XAW3D #include #include -#define ARROW_SCROLLBAR -#define XAW_ARROW_SCROLLBARS -#include +#include #else /* !HAVE_XAW3D */ #include #include @@ -4547,6 +4545,7 @@ x_create_toolkit_scroll_bar (f, bar) f->output_data.x->scroll_bar_bottom_shadow_pixel = pixel; } +#ifdef XtNbeNiceToColormap /* Tell the toolkit about them. */ if (f->output_data.x->scroll_bar_top_shadow_pixel == -1 || f->output_data.x->scroll_bar_bottom_shadow_pixel == -1) @@ -4570,16 +4569,17 @@ x_create_toolkit_scroll_bar (f, bar) pixel = f->output_data.x->scroll_bar_top_shadow_pixel; if (pixel != -1) { - XtSetArg (av[ac], "topShadowPixel", pixel); + XtSetArg (av[ac], XtNtopShadowPixel, pixel); ++ac; } pixel = f->output_data.x->scroll_bar_bottom_shadow_pixel; if (pixel != -1) { - XtSetArg (av[ac], "bottomShadowPixel", pixel); + XtSetArg (av[ac], XtNbottomShadowPixel, pixel); ++ac; } } +#endif widget = XtCreateWidget (scroll_bar_name, scrollbarWidgetClass, f->output_data.x->edit_widget, av, ac); @@ -4725,30 +4725,11 @@ x_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) XawScrollbarSetThumb (widget, top, shown); else { -#ifdef HAVE_XAW3D - ScrollbarWidget sb = (ScrollbarWidget) widget; - int scroll_mode = 0; - - /* `scroll_mode' only exists with Xaw3d + ARROW_SCROLLBAR. */ - if (xaw3d_arrow_scroll) - { - /* Xaw3d stupidly ignores resize requests while dragging - so we have to make it believe it's not in dragging mode. */ - scroll_mode = sb->scrollbar.scroll_mode; - if (scroll_mode == 2) - sb->scrollbar.scroll_mode = 0; - } -#endif /* Try to make the scrolling a tad smoother. */ if (!xaw3d_pick_top) shown = min (shown, old_shown); XawScrollbarSetThumb (widget, top, shown); - -#ifdef HAVE_XAW3D - if (xaw3d_arrow_scroll && scroll_mode == 2) - sb->scrollbar.scroll_mode = scroll_mode; -#endif } } } -- cgit v1.2.1 From b80785d3d35ba40ee3496ceedcf6805ad9d807f2 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 1 Apr 2005 01:05:05 +0000 Subject: (Vascii_upcase_table, Vascii_canon_table, Vascii_eqv_table): Extern them. --- src/lisp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lisp.h b/src/lisp.h index c80d8a822cc..9f82288fdb0 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1861,7 +1861,8 @@ extern Lisp_Object case_temp2; NATNUMP (case_temp2)) \ ? XFASTINT (case_temp2) : case_temp1) -extern Lisp_Object Vascii_downcase_table; +extern Lisp_Object Vascii_downcase_table, Vascii_upcase_table; +extern Lisp_Object Vascii_canon_table, Vascii_eqv_table; /* Number of bytes of structure consed since last GC. */ -- cgit v1.2.1 From f79609dc4ce7386f79a2b2f74e67c782622951cb Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 1 Apr 2005 01:05:29 +0000 Subject: (set_case_table): If standard is nonzero, setup Vascii_upcase_table, Vascii_canon_table, and Vascii_eqv_table. --- src/casetab.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/casetab.c b/src/casetab.c index 5ba025e2b5a..d7dcb420c83 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -162,7 +162,12 @@ set_case_table (table, standard) XCHAR_TABLE (canon)->extras[2] = eqv; if (standard) - Vascii_downcase_table = table; + { + Vascii_downcase_table = table; + Vascii_upcase_table = up; + Vascii_canon_table = canon; + Vascii_eqv_table = eqv; + } else { current_buffer->downcase_table = table; -- cgit v1.2.1 From 0190922fb49028aa5dc422378931a81ee59b5c9c Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 1 Apr 2005 01:05:46 +0000 Subject: (looking_at_1): Use current_buffer->case_canon_table, not DOWNCASE_TABLE. (string_match_1): Likewise. (fast_c_string_match_ignore_case): Use Vascii_canon_table, not Vascii_downcase_table. (fast_string_match_ignore_case): Likewise. (search_buffer): Fix checking of boyer-moore usability. (boyer_moore): Calculate translate_prev_byte1/2/3 in advance. No need of tranlating characters in PAT. Fix calculation of simple_translate. --- src/search.c | 223 ++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 129 insertions(+), 94 deletions(-) (limited to 'src') diff --git a/src/search.c b/src/search.c index 7e990f2bfd7..d86a7cca7b2 100644 --- a/src/search.c +++ b/src/search.c @@ -293,7 +293,7 @@ looking_at_1 (string, posix) CHECK_STRING (string); bufp = compile_pattern (string, &search_regs, (!NILP (current_buffer->case_fold_search) - ? DOWNCASE_TABLE : Qnil), + ? current_buffer->case_canon_table : Qnil), posix, !NILP (current_buffer->enable_multibyte_characters)); @@ -399,7 +399,7 @@ string_match_1 (regexp, string, start, posix) bufp = compile_pattern (regexp, &search_regs, (!NILP (current_buffer->case_fold_search) - ? DOWNCASE_TABLE : Qnil), + ? current_buffer->case_canon_table : Qnil), posix, STRING_MULTIBYTE (string)); immediate_quit = 1; @@ -499,7 +499,7 @@ fast_c_string_match_ignore_case (regexp, string) regexp = string_make_unibyte (regexp); re_match_object = Qt; bufp = compile_pattern (regexp, 0, - Vascii_downcase_table, 0, + Vascii_canon_table, 0, 0); immediate_quit = 1; val = re_search (bufp, string, len, 0, len, 0); @@ -516,7 +516,7 @@ fast_string_match_ignore_case (regexp, string) int val; struct re_pattern_buffer *bufp; - bufp = compile_pattern (regexp, 0, Vascii_downcase_table, + bufp = compile_pattern (regexp, 0, Vascii_canon_table, 0, STRING_MULTIBYTE (string)); immediate_quit = 1; re_match_object = string; @@ -1175,7 +1175,9 @@ search_buffer (string, pos, pos_byte, lim, lim_byte, n, unsigned char *patbuf; int multibyte = !NILP (current_buffer->enable_multibyte_characters); unsigned char *base_pat = SDATA (string); - int charset_base = -1; + /* Set to nozero if we find a non-ASCII char that need + translation. */ + int charset_base = 0; int boyer_moore_ok = 1; /* MULTIBYTE says whether the text to be searched is multibyte. @@ -1221,9 +1223,17 @@ search_buffer (string, pos, pos_byte, lim, lim_byte, n, base_pat = raw_pattern; if (multibyte) { + /* Fill patbuf by translated characters in STRING while + checking if we can use boyer-moore search. If TRT is + non-nil, we can use boyer-moore search only if TRT can be + represented by the byte array of 256 elements. For that, + all non-ASCII case-equivalents of all case-senstive + characters in STRING must belong to the same charset and + row. */ + while (--len >= 0) { - unsigned char str[MAX_MULTIBYTE_LENGTH]; + unsigned char str_base[MAX_MULTIBYTE_LENGTH], *str; int c, translated, inverse; int in_charlen, charlen; @@ -1233,50 +1243,62 @@ search_buffer (string, pos, pos_byte, lim, lim_byte, n, if (RE && *base_pat == '\\') { len--; + raw_pattern_size--; len_byte--; base_pat++; } c = STRING_CHAR_AND_LENGTH (base_pat, len_byte, in_charlen); - /* Translate the character, if requested. */ - TRANSLATE (translated, trt, c); - /* If translation changed the byte-length, go back - to the original character. */ - charlen = CHAR_STRING (translated, str); - if (in_charlen != charlen) + if (NILP (trt)) { - translated = c; - charlen = CHAR_STRING (c, str); + str = base_pat; + charlen = in_charlen; } - - /* If we are searching for something strange, - an invalid multibyte code, don't use boyer-moore. */ - if (! ASCII_BYTE_P (translated) - && (charlen == 1 /* 8bit code */ - || charlen != in_charlen /* invalid multibyte code */ - )) - boyer_moore_ok = 0; - - TRANSLATE (inverse, inverse_trt, c); - - /* Did this char actually get translated? - Would any other char get translated into it? */ - if (translated != c || inverse != c) + else { - /* Keep track of which character set row - contains the characters that need translation. */ - int charset_base_code = c & ~CHAR_FIELD3_MASK; - int inverse_charset_base = inverse & ~CHAR_FIELD3_MASK; - - if (charset_base_code != inverse_charset_base) - boyer_moore_ok = 0; - else if (charset_base == -1) - charset_base = charset_base_code; - else if (charset_base != charset_base_code) - /* If two different rows appear, needing translation, - then we cannot use boyer_moore search. */ - boyer_moore_ok = 0; + /* Translate the character. */ + TRANSLATE (translated, trt, c); + charlen = CHAR_STRING (translated, str_base); + str = str_base; + + /* Check if C has any other case-equivalents. */ + TRANSLATE (inverse, inverse_trt, c); + /* If so, check if we can use boyer-moore. */ + if (c != inverse && boyer_moore_ok) + { + /* Check if all equivalents belong to the same + charset & row. Note that the check of C + itself is done by the last iteration. Note + also that we don't have to check ASCII + characters because boyer-moore search can + always handle their translation. */ + while (1) + { + if (! ASCII_BYTE_P (inverse)) + { + if (SINGLE_BYTE_CHAR_P (inverse)) + { + /* Boyer-moore search can't handle a + translation of an eight-bit + character. */ + boyer_moore_ok = 0; + break; + } + else if (charset_base == 0) + charset_base = inverse & ~CHAR_FIELD3_MASK; + else if ((inverse & ~CHAR_FIELD3_MASK) + != charset_base) + { + boyer_moore_ok = 0; + break; + } + } + if (c == inverse) + break; + TRANSLATE (inverse, inverse_trt, inverse); + } + } } /* Store this character into the translated pattern. */ @@ -1300,6 +1322,7 @@ search_buffer (string, pos, pos_byte, lim, lim_byte, n, if (RE && *base_pat == '\\') { len--; + raw_pattern_size--; base_pat++; } c = *base_pat++; @@ -1533,16 +1556,18 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte) return n; } -/* Do Boyer-Moore search N times for the string PAT, +/* Do Boyer-Moore search N times for the string BASE_PAT, whose length is LEN/LEN_BYTE, from buffer position POS/POS_BYTE until LIM/LIM_BYTE. DIRECTION says which direction we search in. TRT and INVERSE_TRT are translation tables. + Characters in PAT are already translated by TRT. - This kind of search works if all the characters in PAT that have - nontrivial translation are the same aside from the last byte. This - makes it possible to translate just the last byte of a character, - and do so after just a simple test of the context. + This kind of search works if all the characters in BASE_PAT that + have nontrivial translation are the same aside from the last byte. + This makes it possible to translate just the last byte of a + character, and do so after just a simple test of the context. + CHARSET_BASE is nonzero iff there is such a non-ASCII character. If that criterion is not satisfied, do not call this function. */ @@ -1569,8 +1594,13 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, int multibyte = ! NILP (current_buffer->enable_multibyte_characters); unsigned char simple_translate[0400]; - int translate_prev_byte = 0; - int translate_anteprev_byte = 0; + /* These are set to the preceding bytes of a byte to be translated + if charset_base is nonzero. As the maximum byte length of a + multibyte character is 4, we have to check at most three previous + bytes. */ + int translate_prev_byte1 = 0; + int translate_prev_byte2 = 0; + int translate_prev_byte3 = 0; #ifdef C_ALLOCA int BM_tab_space[0400]; @@ -1636,6 +1666,23 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, for (i = 0; i < 0400; i++) simple_translate[i] = i; + if (charset_base) + { + /* Setup translate_prev_byte1/2/3 from CHARSET_BASE. Only a + byte following them are the target of translation. */ + int sample_char = charset_base | 0x20; + unsigned char str[MAX_MULTIBYTE_LENGTH]; + int len = CHAR_STRING (sample_char, str); + + translate_prev_byte1 = str[len - 2]; + if (len > 2) + { + translate_prev_byte2 = str[len - 3]; + if (len > 3) + translate_prev_byte3 = str[len - 4]; + } + } + i = 0; while (i != infinity) { @@ -1645,57 +1692,37 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, i = infinity; if (! NILP (trt)) { - int ch; - int untranslated; - int this_translated = 1; - - if (multibyte - /* Is *PTR the last byte of a character? */ - && (pat_end - ptr == 1 || CHAR_HEAD_P (ptr[1]))) + /* If the byte currently looking at is a head of a character + to check case-equivalents, set CH to that character. An + ASCII character and a non-ASCII character matching with + CHARSET_BASE are to be checked. */ + int ch = -1; + + if (ASCII_BYTE_P (*ptr) || ! multibyte) + ch = *ptr; + else if (charset_base && CHAR_HEAD_P (*ptr)) { - unsigned char *charstart = ptr; - while (! CHAR_HEAD_P (*charstart)) - charstart--; - untranslated = STRING_CHAR (charstart, ptr - charstart + 1); - if (charset_base == (untranslated & ~CHAR_FIELD3_MASK)) - { - TRANSLATE (ch, trt, untranslated); - if (! CHAR_HEAD_P (*ptr)) - { - translate_prev_byte = ptr[-1]; - if (! CHAR_HEAD_P (translate_prev_byte)) - translate_anteprev_byte = ptr[-2]; - } - } - else - { - this_translated = 0; - ch = *ptr; - } + ch = STRING_CHAR (ptr, pat_end - ptr); + if (charset_base != (ch & ~CHAR_FIELD3_MASK)) + ch = -1; } - else if (!multibyte) - TRANSLATE (ch, trt, *ptr); - else - { - ch = *ptr; - this_translated = 0; - } - - if (ch > 0400) - j = ((unsigned char) ch) | 0200; - else - j = (unsigned char) ch; + j = *ptr; if (i == infinity) stride_for_teases = BM_tab[j]; BM_tab[j] = dirlen - i; /* A translation table is accompanied by its inverse -- see */ /* comment following downcase_table for details */ - if (this_translated) + if (ch >= 0) { int starting_ch = ch; - int starting_j = j; + int starting_j; + + if (ch > 0400) + starting_j = ((unsigned char) ch) | 0200; + else + starting_j = (unsigned char) ch; while (1) { TRANSLATE (ch, inverse_trt, ch); @@ -1821,9 +1848,13 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, || ((cursor == tail_end_ptr || CHAR_HEAD_P (cursor[1])) && (CHAR_HEAD_P (cursor[0]) - || (translate_prev_byte == cursor[-1] - && (CHAR_HEAD_P (translate_prev_byte) - || translate_anteprev_byte == cursor[-2]))))) + /* Check if this is the last byte of + a translable character. */ + || (translate_prev_byte1 == cursor[-1] + && (CHAR_HEAD_P (translate_prev_byte1) + || (translate_prev_byte2 == cursor[-2] + && (CHAR_HEAD_P (translate_prev_byte2) + || (translate_prev_byte3 == cursor[-3])))))))) ch = simple_translate[*cursor]; else ch = *cursor; @@ -1901,9 +1932,13 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt, || ((ptr == tail_end_ptr || CHAR_HEAD_P (ptr[1])) && (CHAR_HEAD_P (ptr[0]) - || (translate_prev_byte == ptr[-1] - && (CHAR_HEAD_P (translate_prev_byte) - || translate_anteprev_byte == ptr[-2]))))) + /* Check if this is the last byte of a + translable character. */ + || (translate_prev_byte1 == ptr[-1] + && (CHAR_HEAD_P (translate_prev_byte1) + || (translate_prev_byte2 == ptr[-2] + && (CHAR_HEAD_P (translate_prev_byte2) + || translate_prev_byte3 == ptr[-3]))))))) ch = simple_translate[*ptr]; else ch = *ptr; -- cgit v1.2.1 From 41639988b2b9fc7cb071b2936c5822a7f8c8a741 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 1 Apr 2005 01:12:22 +0000 Subject: *** empty log message *** --- src/ChangeLog | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 258948bf5d3..517a0a2b479 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,23 @@ +<<<<<<< ChangeLog +2005-04-01 Kenichi Handa + + * lisp.h (Vascii_upcase_table, Vascii_canon_table, + Vascii_eqv_table): Extern them. + + * casetab.c (set_case_table): If standard is nonzero, setup + Vascii_upcase_table, Vascii_canon_table, and Vascii_eqv_table. + + * search.c (looking_at_1): Use current_buffer->case_canon_table, + not DOWNCASE_TABLE. + (string_match_1): Likewise. + (fast_c_string_match_ignore_case): Use Vascii_canon_table, not + Vascii_downcase_table. + (fast_string_match_ignore_case): Likewise. + (search_buffer): Fix checking of boyer-moore usability. + (boyer_moore): Calculate translate_prev_byte1/2/3 in advance. No + need of tranlating characters in PAT. Fix calculation of + simple_translate. + 2005-03-31 Stefan Monnier * xterm.c [HAVE_XAW3D]: Include ThreeD.h for XtNbeNiceToColormap. -- cgit v1.2.1 From 9cf97f2680013b54e00d1f7f9b4ea187a85c8357 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 1 Apr 2005 01:30:38 +0000 Subject: *** empty log message *** --- src/ChangeLog | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 517a0a2b479..9518de3af8f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,3 @@ -<<<<<<< ChangeLog 2005-04-01 Kenichi Handa * lisp.h (Vascii_upcase_table, Vascii_canon_table, -- cgit v1.2.1 From 1673df2e0d9f5c62211b6a9c89b6886ca288bde8 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Sat, 2 Apr 2005 12:05:38 +0000 Subject: * alloc.c (allocate_string_data): Call BLOCK_INPUT before calling mallopt. * ralloc.c (r_alloc_init): Ditto. --- src/ChangeLog | 7 +++++++ src/alloc.c | 4 ++++ src/ralloc.c | 4 +++- 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 9518de3af8f..ef635f206bd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2005-04-02 Jan Dj,Ad(Brv + + * alloc.c (allocate_string_data): Call BLOCK_INPUT before calling + mallopt. + + * ralloc.c (r_alloc_init): Ditto. + 2005-04-01 Kenichi Handa * lisp.h (Vascii_upcase_table, Vascii_canon_table, diff --git a/src/alloc.c b/src/alloc.c index d529ab9927b..a907247d21c 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1933,14 +1933,18 @@ allocate_string_data (s, nchars, nbytes) mmap'ed data typically have an address towards the top of the address space, which won't fit into an EMACS_INT (at least on 32-bit systems with the current tagging scheme). --fx */ + BLOCK_INPUT; mallopt (M_MMAP_MAX, 0); + UNBLOCK_INPUT; #endif b = (struct sblock *) lisp_malloc (size + GC_STRING_EXTRA, MEM_TYPE_NON_LISP); #ifdef DOUG_LEA_MALLOC /* Back to a reasonable maximum of mmap'ed areas. */ + BLOCK_INPUT; mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); + UNBLOCK_INPUT; #endif b->next_free = &b->first_data; diff --git a/src/ralloc.c b/src/ralloc.c index 75c25258a9d..e209db72673 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -1255,7 +1255,9 @@ r_alloc_init () #endif #ifdef DOUG_LEA_MALLOC - mallopt (M_TOP_PAD, 64 * 4096); + BLOCK_INPUT; + mallopt (M_TOP_PAD, 64 * 4096); + UNBLOCK_INPUT; #else #ifndef SYSTEM_MALLOC /* Give GNU malloc's morecore some hysteresis -- cgit v1.2.1 From a4766fd5e67e014c5a5ace2bab86810fc6212a51 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Sat, 2 Apr 2005 12:12:48 +0000 Subject: #include blockinput also --- src/ralloc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/ralloc.c b/src/ralloc.c index e209db72673..fd0d62e1977 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA. */ #include #include "lisp.h" /* Needed for VALBITS. */ +#include "blockinput.h" #ifdef HAVE_UNISTD_H #include -- cgit v1.2.1 From 2ba613a6aae7549399043fb350ef61710f792e57 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Sun, 3 Apr 2005 22:08:17 +0000 Subject: *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index ef635f206bd..c996cdb5f8b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-04-04 Kim F. Storm + + * eval.c (Ffuncall): Always call CHECK_CONS_LIST on entry. + Call it again after autoload. + 2005-04-02 Jan Dj,Ad(Brv * alloc.c (allocate_string_data): Call BLOCK_INPUT before calling -- cgit v1.2.1 From fff3ff9c18075000c0cf478fe76011769cdf027a Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Sun, 3 Apr 2005 22:08:58 +0000 Subject: (Ffuncall): Always call CHECK_CONS_LIST on entry. Call it again after autoload. --- src/eval.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/eval.c b/src/eval.c index bf4fec4f8a1..8700ca222ce 100644 --- a/src/eval.c +++ b/src/eval.c @@ -2742,6 +2742,8 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) if (debug_on_next_call) do_debug_on_call (Qlambda); + CHECK_CONS_LIST (); + retry: fun = args[0]; @@ -2750,9 +2752,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) if (SUBRP (fun)) { - CHECK_CONS_LIST (); - - if (numargs < XSUBR (fun)->min_args + if (numargs < XSUBR (fun)->min_args || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) { XSETFASTINT (lisp_numargs, numargs); @@ -2844,6 +2844,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) else if (EQ (funcar, Qautoload)) { do_autoload (fun, args[0]); + CHECK_CONS_LIST (); goto retry; } else -- cgit v1.2.1 From 4d5ddddce81222d58dcaa8840fe68c2fe4ecc7dc Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Sun, 3 Apr 2005 22:26:43 +0000 Subject: *** empty log message *** --- src/ChangeLog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index c996cdb5f8b..34bf8b41b45 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2005-04-04 Kim F. Storm + * alloc.c (Fgarbage_collect): Call CHECK_CONS_LIST before and after gc. + * eval.c (Ffuncall): Always call CHECK_CONS_LIST on entry. Call it again after autoload. -- cgit v1.2.1 From bbc012e0c3a0e91beecb09643956fa09979420ab Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Sun, 3 Apr 2005 22:27:05 +0000 Subject: (Fgarbage_collect): Call CHECK_CONS_LIST before and after gc. --- src/alloc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/alloc.c b/src/alloc.c index a907247d21c..f3af3940e15 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4687,6 +4687,8 @@ returns nil, because real GC can't be done. */) if (pure_bytes_used_before_overflow) return Qnil; + CHECK_CONS_LIST (); + /* Don't keep undo information around forever. Do this early on, so it is no problem if the user quits. */ { @@ -4880,6 +4882,8 @@ returns nil, because real GC can't be done. */) UNBLOCK_INPUT; + CHECK_CONS_LIST (); + /* clear_marks (); */ gc_in_progress = 0; -- cgit v1.2.1