From f28c1bd9cd71668830a1db49d8e15be8a817c84f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 7 Nov 2004 03:50:11 +0000 Subject: (command_loop_1): Change Vtransient_mark_mode before deciding whether to inctivate mark. --- src/ChangeLog | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index b65bb2d5714..ea570820e1a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2004-11-06 Richard M. Stallman + + * callint.c (Fcall_interactively): Avoid reusing EVENT for other data. + + * xfaces.c (merge_named_face): GCPRO the face_name in the + named_merge_point struct that we make. + (merge_face_heights): Eliminate GCPRO arg. All callers changed. + + * keyboard.c (command_loop_1): Change Vtransient_mark_mode + before deciding whether to inactivate mark. + 2004-11-06 Lars Brinkhoff * config.in: Regenerate (add HAVE_GETRUSAGE). @@ -17,7 +28,6 @@ * xmenu.c (popup_get_selection, create_and_show_popup_menu) (create_and_show_dialog): Revert change from 2004-10-31. - 2004-11-05 Luc Teirlinck * macros.c (syms_of_macros) : Doc fix. -- cgit v1.3 From 31141c132b0e914551de73972577d3ae30d435dd Mon Sep 17 00:00:00 2001 From: Steven Tamm Date: Sun, 7 Nov 2004 05:57:08 +0000 Subject: editfns.c: Need to include sys/time.h before resource.h on darwin. --- src/ChangeLog | 4 ++++ src/editfns.c | 3 +++ 2 files changed, 7 insertions(+) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index ea570820e1a..0e3870669c0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-11-06 Steven Tamm + + * editfns.c: Need to include sys/time.h before resource.h on darwin. + 2004-11-06 Richard M. Stallman * callint.c (Fcall_interactively): Avoid reusing EVENT for other data. diff --git a/src/editfns.c b/src/editfns.c index 2e8134d4495..bcffc545b6a 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -40,6 +40,9 @@ Boston, MA 02111-1307, USA. */ #endif #if defined HAVE_SYS_RESOURCE_H +#ifdef MAC_OSX +#include +#endif #include #endif -- cgit v1.3 From 238a44a8657ff8cf0feee84619262255b354c55d Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Sun, 7 Nov 2004 09:13:26 +0000 Subject: * dosfns.c (Fdos_memget, Fdos_memput): Use integer variable offs in comparisons with integers instead of Lisp_Object address. (Fmsdos_set_keyboard): Declare argument allkeys. * msdos.c (IT_set_frame_parameters): Use EQ, not ==, for Lisp_Object:s. * dired.c: extern declare Fmsdos_downcase_filename on MSDOS to avoid int/Lisp_Object mixup. * fileio.c: Ditto. --- src/ChangeLog | 13 +++++++++++++ src/dired.c | 4 ++++ src/dosfns.c | 6 +++--- src/fileio.c | 1 + src/msdos.c | 2 +- 5 files changed, 22 insertions(+), 4 deletions(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index 0e3870669c0..e73fbe12775 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2004-11-07 Jan Dj,Ad(Brv + + * dosfns.c (Fdos_memget, Fdos_memput): Use integer variable offs in + comparisons with integers instead of Lisp_Object address. + (Fmsdos_set_keyboard): Declare argument allkeys. + + * msdos.c (IT_set_frame_parameters): Use EQ, not ==, for Lisp_Object:s. + + * dired.c: extern declare Fmsdos_downcase_filename on MSDOS to avoid + int/Lisp_Object mixup. + + * fileio.c: Ditto. + 2004-11-06 Steven Tamm * editfns.c: Need to include sys/time.h before resource.h on darwin. diff --git a/src/dired.c b/src/dired.c index e833ceb216b..97df606bb29 100644 --- a/src/dired.c +++ b/src/dired.c @@ -116,6 +116,10 @@ extern int completion_ignore_case; extern Lisp_Object Vcompletion_regexp_list; extern Lisp_Object Vfile_name_coding_system, Vdefault_file_name_coding_system; +#ifdef MSDOS +extern Lisp_Object Fmsdos_downcase_filename P_ ((Lisp_Object)); +#endif + Lisp_Object Vcompletion_ignored_extensions; Lisp_Object Qcompletion_ignore_case; Lisp_Object Qdirectory_files; diff --git a/src/dosfns.c b/src/dosfns.c index d9714693507..bd62147ad48 100644 --- a/src/dosfns.c +++ b/src/dosfns.c @@ -110,7 +110,7 @@ Return the updated VECTOR. */) offs = (unsigned long) XINT (address); CHECK_VECTOR (vector); len = XVECTOR (vector)-> size; - if (len < 1 || len > 2048 || address < 0 || address > 0xfffff - len) + if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len) return Qnil; buf = alloca (len); dosmemget (offs, len, buf); @@ -135,7 +135,7 @@ DEFUN ("msdos-memput", Fdos_memput, Sdos_memput, 2, 2, 0, offs = (unsigned long) XINT (address); CHECK_VECTOR (vector); len = XVECTOR (vector)-> size; - if (len < 1 || len > 2048 || address < 0 || address > 0xfffff - len) + if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len) return Qnil; buf = alloca (len); @@ -155,7 +155,7 @@ If the optional argument ALLKEYS is non-nil, the keyboard is mapped for all keys; otherwise it is only used when the ALT key is pressed. The current keyboard layout is available in dos-keyboard-code. */) (country_code, allkeys) - Lisp_Object country_code; + Lisp_Object country_code, allkeys; { CHECK_NUMBER (country_code); if (!dos_set_keyboard (XINT (country_code), !NILP (allkeys))) diff --git a/src/fileio.c b/src/fileio.c index aa37c296eb3..1fd0030a4f7 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -89,6 +89,7 @@ extern int errno; #ifdef MSDOS #include "msdos.h" #include +extern Lisp_Object Fmsdos_downcase_filename P_ ((Lisp_Object)); #if __DJGPP__ >= 2 #include #include diff --git a/src/msdos.c b/src/msdos.c index e0f4527e5ae..d75ea18ea97 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -2320,7 +2320,7 @@ IT_set_frame_parameters (f, alist) /* If we are creating a new frame, begin with the original screen colors used for the initial frame. */ - if (alist == Vdefault_frame_alist + if (EQ (alist, Vdefault_frame_alist) && initial_screen_colors[0] != -1 && initial_screen_colors[1] != -1) { FRAME_FOREGROUND_PIXEL (f) = initial_screen_colors[0]; -- cgit v1.3 From b72915a740baf0b2b2f46230ef3494e1925af4bc Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 7 Nov 2004 11:08:45 +0000 Subject: Don't declare Fmsdos_downcase_filename. --- src/ChangeLog | 6 ++++++ src/dired.c | 4 ---- src/fileio.c | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index e73fbe12775..ae4ef621f7e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-11-07 Andreas Schwab + + * lisp.h: Declare Fmsdos_downcase_filename. + * dired.c: Don't declare Fmsdos_downcase_filename. + * fileio.c: Likewise. + 2004-11-07 Jan Dj,Ad(Brv * dosfns.c (Fdos_memget, Fdos_memput): Use integer variable offs in diff --git a/src/dired.c b/src/dired.c index 97df606bb29..e833ceb216b 100644 --- a/src/dired.c +++ b/src/dired.c @@ -116,10 +116,6 @@ extern int completion_ignore_case; extern Lisp_Object Vcompletion_regexp_list; extern Lisp_Object Vfile_name_coding_system, Vdefault_file_name_coding_system; -#ifdef MSDOS -extern Lisp_Object Fmsdos_downcase_filename P_ ((Lisp_Object)); -#endif - Lisp_Object Vcompletion_ignored_extensions; Lisp_Object Qcompletion_ignore_case; Lisp_Object Qdirectory_files; diff --git a/src/fileio.c b/src/fileio.c index 1fd0030a4f7..aa37c296eb3 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -89,7 +89,6 @@ extern int errno; #ifdef MSDOS #include "msdos.h" #include -extern Lisp_Object Fmsdos_downcase_filename P_ ((Lisp_Object)); #if __DJGPP__ >= 2 #include #include -- cgit v1.3 From c37caf9d6bd241ec9a2006164441d2b3dd5a5ae8 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Sun, 7 Nov 2004 21:59:19 +0000 Subject: * emacs.c (Fdump_emacs): Only output warning on GNU/Linux. --- src/ChangeLog | 4 ++++ src/emacs.c | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index ae4ef621f7e..cd1fa804ca2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-11-07 Jan Dj,Ad(Brv + + * emacs.c (Fdump_emacs): Only output warning on GNU/Linux. + 2004-11-07 Andreas Schwab * lisp.h: Declare Fmsdos_downcase_filename. diff --git a/src/emacs.c b/src/emacs.c index e24b79aa116..3ca1022a08e 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2179,16 +2179,19 @@ You must run Emacs in batch mode in order to dump it. */) if (! noninteractive) error ("Dumping Emacs works only in batch mode"); +#ifdef __linux__ if (heap_bss_diff > MAX_HEAP_BSS_DIFF) { fprintf (stderr, "**************************************************\n"); fprintf (stderr, "Warning: Your system has a gap between BSS and the\n"); - fprintf (stderr, "heap. This usually means that exec-shield or\n"); - fprintf (stderr, "something similar is in effect. The dump may fail\n"); - fprintf (stderr, "because of this. See the section about exec-shield\n"); - fprintf (stderr, "in etc/PROBLEMS for more information.\n"); + fprintf (stderr, "heap (%d byte). This usually means that exec-shield\n", + heap_bss_diff); + fprintf (stderr, "or something similar is in effect. The dump may\n"); + fprintf (stderr, "fail because of this. See the section about \n"); + fprintf (stderr, "exec-shield in etc/PROBLEMS for more information.\n"); fprintf (stderr, "**************************************************\n"); } +#endif /* __linux__ */ /* Bind `command-line-processed' to nil before dumping, so that the dumped Emacs will process its command line -- cgit v1.3 From a653f81218951ad4776bdfe3314c76e10f7fb509 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 8 Nov 2004 00:38:48 +0000 Subject: (fontset_pattern_regexp): Cancel my previous change; don't pay attention to '\' before '*'. (fontset_pattern_regexp): Change the meaning of the second arg. (Fnew_fontset): Call fs_query_fontset, not Fquery_fontset. (check_fontset_name): Try NAME as literal at first, and if it failes, try NAME as pattern. --- src/ChangeLog | 9 +++++++++ src/fontset.c | 41 +++++++++++++++++++++++++++-------------- 2 files changed, 36 insertions(+), 14 deletions(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index cd1fa804ca2..b981d8970c1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2004-11-08 Kenichi Handa + + * fontset.c (fontset_pattern_regexp): Cancel my previous change; + don't pay attention to '\' before '*'. + (fontset_pattern_regexp): Change the meaning of the second arg. + (Fnew_fontset): Call fs_query_fontset, not Fquery_fontset. + (check_fontset_name): Try NAME as literal at first, and if it + failes, try NAME as pattern. + 2004-11-07 Jan Dj,Ad(Brv * emacs.c (Fdump_emacs): Only output warning on GNU/Linux. diff --git a/src/fontset.c b/src/fontset.c index 6d2840ffd26..f3bdc4c235e 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -796,7 +796,7 @@ fontset_pattern_regexp (pattern) { if (*p0 == '-') ndashes++; - else if (*p0 == '*' && p0 > SDATA (pattern) && p0[-1] != '\\') + else if (*p0 == '*') nstars++; } @@ -811,7 +811,7 @@ fontset_pattern_regexp (pattern) *p1++ = '^'; for (p0 = SDATA (pattern); *p0; p0++) { - if (*p0 == '*' && p0 > SDATA (pattern) && p0[-1] != '\\') + if (*p0 == '*') { if (ndashes < 14) *p1++ = '.'; @@ -835,29 +835,33 @@ fontset_pattern_regexp (pattern) } /* Return ID of the base fontset named NAME. If there's no such - fontset, return -1. */ + fontset, return -1. NAME_PATTERN specifies how to treat NAME as this: + 0: pattern containing '*' and '?' as wildcards + 1: regular expression + 2: literal fontset name +*/ int -fs_query_fontset (name, regexpp) +fs_query_fontset (name, name_pattern) Lisp_Object name; - int regexpp; + int name_pattern; { Lisp_Object tem; int i; name = Fdowncase (name); - if (!regexpp) + if (name_pattern != 1) { tem = Frassoc (name, Vfontset_alias_alist); if (CONSP (tem) && STRINGP (XCAR (tem))) name = XCAR (tem); - else + else if (name_pattern == 0) { tem = fontset_pattern_regexp (name); if (STRINGP (tem)) { name = tem; - regexpp = 1; + name_pattern = 1; } } } @@ -872,7 +876,7 @@ fs_query_fontset (name, regexpp) continue; this_name = FONTSET_NAME (fontset); - if (regexpp + if (name_pattern == 1 ? fast_string_match (name, this_name) >= 0 : !strcmp (SDATA (name), SDATA (this_name))) return i; @@ -963,6 +967,7 @@ FONTLIST is an alist of charsets vs corresponding font name patterns. */) { Lisp_Object fontset, elements, ascii_font; Lisp_Object tem, tail, elt; + int id; (*check_window_system_func) (); @@ -970,10 +975,14 @@ FONTLIST is an alist of charsets vs corresponding font name patterns. */) CHECK_LIST (fontlist); name = Fdowncase (name); - tem = Fquery_fontset (name, Qnil); - if (!NILP (tem)) - error ("Fontset `%s' matches the existing fontset `%s'", - SDATA (name), SDATA (tem)); + id = fs_query_fontset (name, 2); + if (id >= 0) + { + fontset = FONTSET_FROM_ID (id); + tem = FONTSET_NAME (fontset); + error ("Fontset `%s' matches the existing fontset `%s'", + SDATA (name), SDATA (tem)); + } /* Check the validity of FONTLIST while creating a template for fontset elements. */ @@ -1048,7 +1057,11 @@ check_fontset_name (name) return Vdefault_fontset; CHECK_STRING (name); - id = fs_query_fontset (name, 0); + /* First try NAME as literal. */ + id = fs_query_fontset (name, 2); + if (id < 0) + /* For backward compatibility, try again NAME as pattern. */ + id = fs_query_fontset (name, 0); if (id < 0) error ("Fontset `%s' does not exist", SDATA (name)); return FONTSET_FROM_ID (id); -- cgit v1.3 From 3f8ea68c981d4264ad7d5107373cfaca0bb9a2e2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 8 Nov 2004 13:02:27 +0000 Subject: *** empty log message *** --- msdos/ChangeLog | 4 ++++ src/ChangeLog | 6 ++++++ 2 files changed, 10 insertions(+) (limited to 'src/ChangeLog') diff --git a/msdos/ChangeLog b/msdos/ChangeLog index e906a8f4954..9f434fe08e1 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,3 +1,7 @@ +2004-11-08 Eli Zaretskii + + * sed2v2.inp (HAVE_BZERO): Define for GCC v3.x and later. + 2004-10-06 Eli Zaretskii * sed1v2.inp (LC_ALL=C): Fix src/Makefile breakage caused by diff --git a/src/ChangeLog b/src/ChangeLog index b981d8970c1..1757c128151 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-11-08 Eli Zaretskii + + * editfns.c: Move #include "systime.h" before . + Don't include explicitly. + Include unconditionally, not just on MacOS. + 2004-11-08 Kenichi Handa * fontset.c (fontset_pattern_regexp): Cancel my previous change; -- cgit v1.3 From bae9677d9551a6aa87028478556b23a90949830b Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 8 Nov 2004 22:11:40 +0000 Subject: *** empty log message *** --- src/ChangeLog | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index 1757c128151..d9150816605 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-11-08 Kim F. Storm + + * xdisp.c (fast_find_position): Fix start pos if header line present. + 2004-11-08 Eli Zaretskii * editfns.c: Move #include "systime.h" before . @@ -69,7 +73,7 @@ * xmenu.c (popup_get_selection, create_and_show_popup_menu) (create_and_show_dialog): Revert change from 2004-10-31. - + 2004-11-05 Luc Teirlinck * macros.c (syms_of_macros) : Doc fix. -- cgit v1.3 From b7127aa8d0dfb639356470be604223e887b04695 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 8 Nov 2004 22:24:51 +0000 Subject: *** empty log message *** --- src/ChangeLog | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index d9150816605..49bdc6230a9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2004-11-08 Kim F. Storm * xdisp.c (fast_find_position): Fix start pos if header line present. + (note_mouse_highlight): Clear mouse face if we move out of text area. 2004-11-08 Eli Zaretskii -- cgit v1.3 From b6709e77440e2559089c937f2177a4bc2451697d Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Mon, 8 Nov 2004 23:32:56 +0000 Subject: *** empty log message *** --- src/ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index 49bdc6230a9..3958f9a1153 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-11-09 Kim F. Storm + + * fringe.c (update_window_fringes): Update fringe bitmaps if + cur and row ends_at_zv_p differs. If bitmaps of a row is updated, + also update previous row to get rid of misc. artifacts. + 2004-11-08 Kim F. Storm * xdisp.c (fast_find_position): Fix start pos if header line present. -- cgit v1.3 From d87a9ab8930c5460b3ca510083679351c4178a7c Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Tue, 9 Nov 2004 08:19:51 +0000 Subject: * doc.c: New variable Vbuild_files. (Fsnarf_documentation): If Vbuild_files is nil, populate it with file names from buildobh.lst. Only attach docstrings from files that are in Vbuild_files. (syms_of_doc): Defvar Vbuild_files. * Makefile.in (SOME_MACHINE_OBJECTS): Add fringe.o, image.o and w32*.o. (temacs${EXEEXT}): Generate buildobj.lst when temacs is linked. (mostlyclean): rm buildobj.lst * makefile.w32-in ($(TEMACS)): Generate buildobj.lst when temacs is linked. --- src/ChangeLog | 16 +++++++++++ src/Makefile.in | 8 ++++-- src/doc.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++- src/makefile.w32-in | 3 +++ 4 files changed, 100 insertions(+), 3 deletions(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index 3958f9a1153..1c413d20c5b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2004-11-09 Jan Dj,Ad(Brv + + * doc.c: New variable Vbuild_files. + (Fsnarf_documentation): If Vbuild_files is nil, populate it with + file names from buildobh.lst. Only attach docstrings from files + that are in Vbuild_files. + (syms_of_doc): Defvar Vbuild_files. + + * Makefile.in (SOME_MACHINE_OBJECTS): Add fringe.o, image.o + and w32*.o. + (temacs${EXEEXT}): Generate buildobj.lst when temacs is linked. + (mostlyclean): rm buildobj.lst + + * makefile.w32-in ($(TEMACS)): Generate buildobj.lst when temacs + is linked. + 2004-11-09 Kim F. Storm * fringe.c (update_window_fringes): Update fringe bitmaps if diff --git a/src/Makefile.in b/src/Makefile.in index 758e74ebf64..48952f674bb 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -596,8 +596,10 @@ obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \ These go in the DOC file on all machines in case they are needed there. */ SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \ - xterm.o xfns.o xmenu.o xselect.o xrdb.o \ - mac.o macterm.o macfns.o macmenu.o fontset.o + xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \ + mac.o macterm.o macfns.o macmenu.o fontset.o \ + w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o \ + w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o #ifdef TERMINFO @@ -944,6 +946,7 @@ ${libsrc}make-docfile${EXEEXT}: #endif temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT} + echo "${obj} ${otherobj} " OBJECTS_MACHINE > buildobj.lst $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \ -o temacs ${STARTFILES} ${obj} ${otherobj} \ OBJECTS_MACHINE ${LIBES} @@ -1272,6 +1275,7 @@ mostlyclean: rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a rm -f ../etc/DOC rm -f bootstrap-emacs${EXEEXT} + rm -f buildobj.lst clean: mostlyclean rm -f emacs-*${EXEEXT} emacs${EXEEXT} /**/# This is used in making a distribution. diff --git a/src/doc.c b/src/doc.c index 82df9134f61..406773e6797 100644 --- a/src/doc.c +++ b/src/doc.c @@ -51,6 +51,9 @@ Lisp_Object Vdoc_file_name; Lisp_Object Qfunction_documentation; +/* A list of files used to build this Emacs binary. */ +static Lisp_Object Vbuild_files; + extern Lisp_Object Voverriding_local_map; /* For VMS versions with limited file name syntax, @@ -581,6 +584,7 @@ the same file name is found in the `doc-directory'. */) register char *p, *end; Lisp_Object sym; char *name; + int skip_file = 0; CHECK_STRING (filename); @@ -618,6 +622,54 @@ the same file name is found in the `doc-directory'. */) #endif /* VMS4_4 */ #endif /* VMS */ + /* Vbuild_files is nil when temacs is run, and non-nil after that. */ + if (NILP (Vbuild_files)) + { + size_t cp_size = 0; + size_t to_read; + int nr_read; + char *cp = NULL; + char *beg, *end; + + fd = emacs_open ("buildobj.lst", O_RDONLY, 0); + if (fd < 0) + report_file_error ("Opening file buildobj.lst", Qnil); + + filled = 0; + for (;;) + { + cp_size += 1024; + to_read = cp_size - 1 - filled; + cp = xrealloc (cp, cp_size); + nr_read = emacs_read (fd, &cp[filled], to_read); + filled += nr_read; + if (nr_read < to_read) + break; + } + + emacs_close (fd); + cp[filled] = 0; + + for (beg = cp; *beg; beg = end) + { + int len; + + while (*beg && isspace (*beg)) ++beg; + + for (end = beg; *end && ! isspace (*end); ++end) + if (*end == '/') beg = end+1; /* skip directory part */ + + len = end - beg; + if (len > 4 && end[-4] == '.' && end[-3] == 'o') + len -= 2; /* Just take .o if it ends in .obj */ + + if (len > 0) + Vbuild_files = Fcons (make_string (beg, len), Vbuild_files); + } + + xfree (cp); + } + fd = emacs_open (name, O_RDONLY, 0); if (fd < 0) report_file_error ("Opening doc string file", @@ -640,10 +692,28 @@ the same file name is found in the `doc-directory'. */) if (p != end) { end = (char *) index (p, '\n'); + + /* See if this is a file name, and if it is a file in build-files. */ + if (p[1] == 'S' && end - p > 4 && end[-2] == '.' + && (end[-1] == 'o' || end[-1] == 'c')) + { + int len = end - p - 2; + char *fromfile = alloca (len + 1); + strncpy (fromfile, &p[2], len); + fromfile[len] = 0; + if (fromfile[len-1] == 'c') + fromfile[len-1] = 'o'; + + if (EQ (Fmember (build_string (fromfile), Vbuild_files), Qnil)) + skip_file = 1; + else + skip_file = 0; + } + sym = oblookup (Vobarray, p + 2, multibyte_chars_in_text (p + 2, end - p - 2), end - p - 2); - if (SYMBOLP (sym)) + if (! skip_file && SYMBOLP (sym)) { /* Attach a docstring to a variable? */ if (p[1] == 'V') @@ -919,6 +989,10 @@ syms_of_doc () doc: /* Name of file containing documentation strings of built-in symbols. */); Vdoc_file_name = Qnil; + DEFVAR_LISP ("build-files", &Vbuild_files, + doc: /* A list of files used to build this Emacs binary. */); + Vbuild_files = Qnil; + defsubr (&Sdocumentation); defsubr (&Sdocumentation_property); defsubr (&Ssnarf_documentation); diff --git a/src/makefile.w32-in b/src/makefile.w32-in index a7efcc4cae5..5a232e28362 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in @@ -168,6 +168,9 @@ temacs: $(BLD) $(TEMACS) $(TEMACS): $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 16 + echo $(OBJ0) > $(BLD)/buildobj.lst + echo $(OBJ1) >> $(BLD)/buildobj.lst + echo $(WIN32OBJ) >> $(BLD)/buildobj.lst bootstrap: bootstrap-emacs -- cgit v1.3 From a8b16c80cd186806837a96ef101a0c4040ba44f0 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Tue, 9 Nov 2004 08:23:44 +0000 Subject: * .cvsignore: Add buildobj.lst. --- src/.gitignore | 1 + src/ChangeLog | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src/ChangeLog') diff --git a/src/.gitignore b/src/.gitignore index 406ff7cd5e2..48c78a4f3a6 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -17,3 +17,4 @@ obj prefix-args stamp-oldxmenu temacs +buildobj.lst diff --git a/src/ChangeLog b/src/ChangeLog index 1c413d20c5b..f04cb427831 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2004-11-09 Jan Dj,Ad(Brv + * .cvsignore: Add buildobj.lst. + * doc.c: New variable Vbuild_files. (Fsnarf_documentation): If Vbuild_files is nil, populate it with file names from buildobh.lst. Only attach docstrings from files -- cgit v1.3 From cdb805a93521d865839ed31a30d3752b2dc3e9e4 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 9 Nov 2004 09:40:07 +0000 Subject: *** empty log message *** --- src/ChangeLog | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index f04cb427831..bc7954f12d1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-11-09 Kim F. Storm + + * process.c (Fmake_network_process): Remove kludge for interrupted + connects on BSD. If connect is interrupted, just close socket and + start over rather than sleeping and retry with same socket. + 2004-11-09 Jan Dj,Ad(Brv * .cvsignore: Add buildobj.lst. @@ -11,7 +17,7 @@ * Makefile.in (SOME_MACHINE_OBJECTS): Add fringe.o, image.o and w32*.o. (temacs${EXEEXT}): Generate buildobj.lst when temacs is linked. - (mostlyclean): rm buildobj.lst + (mostlyclean): rm buildobj.lst * makefile.w32-in ($(TEMACS)): Generate buildobj.lst when temacs is linked. -- cgit v1.3 From 16bf4e3264ebe086f5a86b16f3adb3e9fdf7dbce Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Tue, 9 Nov 2004 10:59:49 +0000 Subject: * Makefile.in (stamp-oldxmenu): If HAVE_GTK, don't add dependencies to ${OLDXMENU}. --- src/ChangeLog | 7 ++++++- src/Makefile.in | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index bc7954f12d1..74903bd1a3e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-11-09 Jan Dj,Ad(Brv + + * Makefile.in (stamp-oldxmenu): If HAVE_GTK, don't add dependencies + to ${OLDXMENU}. + 2004-11-09 Kim F. Storm * process.c (Fmake_network_process): Remove kludge for interrupted @@ -5,7 +10,7 @@ start over rather than sleeping and retry with same socket. 2004-11-09 Jan Dj,Ad(Brv - + * .cvsignore: Add buildobj.lst. * doc.c: New variable Vbuild_files. diff --git a/src/Makefile.in b/src/Makefile.in index 48952f674bb..3fd63fe5251 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -962,7 +962,7 @@ prefix-args${EXEEXT}: prefix-args.c $(config_h) #define OLDXMENU_OPTIONS #endif -#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) +#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (HAVE_GTK) /* We use stamp-xmenu with these two deps to both ensure that lwlib gets remade based on its dependencies @@ -1018,12 +1018,12 @@ really-oldXMenu: @true /* make -t should not create really-oldXMenu. */ .PHONY: really-oldXMenu #endif /* not USE_X_TOOLKIT */ -#else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */ +#else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */ /* We don\'t really need this, but satisfy the dependency. */ stamp-oldxmenu: touch stamp-oldxmenu -#endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */ +#endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */ ../config.status:: epaths.in @echo "The file epaths.h needs to be set up from epaths.in." -- cgit v1.3 From 0faf68065e0f08d7f2987e77195d1f5df27c4035 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 9 Nov 2004 13:18:39 +0000 Subject: *** empty log message *** --- src/ChangeLog | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index 74903bd1a3e..221911121b5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,38 @@ +2004-11-09 Kim F. Storm + + * xselect.c: Include and (for getpid). + Fix various comments referring to XEvents instead of input events. + (x_queue_event): Fix format strings. + (x_stop_queuing_selection_requests): Likewise. + + * xdisp.c (produce_image_glyph): Remove unused variable 'face_ascent'. + (pint2hrstr): Add extra braces to silence compiler. + + * print.c (print_object): Fix format string. + + * lread.c (read1): Fix next_char matching. + + * lisp.h (Fdelete): Add EXFUN. + (replace_range_2): Add prototype. + + * keyboard.c (read_avail_input): Remove unused variable 'discard'. + + * intervals.h (NULL_INTERVAL_P): Add separate version when + ENABLE_CHECKING is not defined to silence compiler. + (compare_string_intervals): Add prototype. + + * fringe.c (destroy_fringe_bitmap): Fix return type. + (Ffringe_bitmaps_at_pos): Remove unused var 'old_buffer'. + + * emacs.c (Fdump_emacs): Fix format string. + + * doc.c: Include . + (Fsubstitute_command_keys): Remove unused variable 'firstkey'. + + * data.c (store_symval_forwarding): Remove unused variables. + + * callint.c (Fcall_interactively): Remove unused variable 'funcar'. + 2004-11-09 Jan Dj,Ad(Brv * Makefile.in (stamp-oldxmenu): If HAVE_GTK, don't add dependencies @@ -10,7 +45,7 @@ start over rather than sleeping and retry with same socket. 2004-11-09 Jan Dj,Ad(Brv - + * .cvsignore: Add buildobj.lst. * doc.c: New variable Vbuild_files. -- cgit v1.3 From 32e2fb042912d91fdb27290fb2c1ec76b45582a1 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 10 Nov 2004 22:35:21 +0000 Subject: (Fkeymap_prompt): Accept symbol keymaps. --- src/ChangeLog | 32 ++++++++++++++++++-------------- src/keymap.c | 6 +++--- 2 files changed, 21 insertions(+), 17 deletions(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index 221911121b5..e7d9d37aa3a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-11-10 Stefan Monnier + + * keymap.c (Fkeymap_prompt): Accept symbol keymaps. + 2004-11-09 Kim F. Storm * xselect.c: Include and (for getpid). @@ -164,8 +168,8 @@ (x_stop_queuing_selection_requests): Add new queue for selection input events to replace previous XEvent queue in xterm.c. (queue_selection_requests_unwind): Adapt to new queue. - (x_reply_selection_request): Adapt to new queue. Unexpect - wait_object in case of x errors (memory leak). + (x_reply_selection_request): Adapt to new queue. + Unexpect wait_object in case of x errors (memory leak). (x_handle_selection_request, x_handle_selection_clear): Make static. (x_handle_selection_event): New function. May queue selection events. (wait_for_property_change_unwind): Use save_value instead of cons. @@ -218,7 +222,7 @@ * gtkutil.h: Declare use_old_gtk_file_dialog. * gtkutil.c: Make use_old_gtk_file_dialog non-static. - (xg_initialize): Moved DEFVAR_BOOL for use_old_gtk_file_dialog ... + (xg_initialize): Move DEFVAR_BOOL for use_old_gtk_file_dialog ... * xfns.c (syms_of_xfns): ... to here. * gtkutil.c (xg_get_file_with_chooser): Expand DEFAULT_FILENAME if @@ -293,20 +297,20 @@ * lisp.h: Fx_file_dialog takes 5 parameters. - * xfns.c (Fx_file_dialog): Both Motif and GTK version: Add - parameter only_dir_p. + * xfns.c (Fx_file_dialog): Both Motif and GTK version: + Add parameter only_dir_p. In Motif version, don't put DEFAULT_FILENAME in filter part of the dialog, just text field part. Do not add DEFAULT_FILENAME to list of files if it isn't there. In GTK version, pass only_dir_p parameter to xg_get_file_name. - * macfns.c (Fx_file_dialog): Add parameter only_dir_p. Check - only_dir_p instead of comparing prompt to "Dired". When using + * macfns.c (Fx_file_dialog): Add parameter only_dir_p. + Check only_dir_p instead of comparing prompt to "Dired". When using a save dialog, add option kNavDontConfirmReplacement, change title to "Enter name", change text for save button to "Ok". - * w32fns.c (Fx_file_dialog): Add parameter only_dir_p. Check - only_dir_p instead of comparing prompt to "Dired". + * w32fns.c (Fx_file_dialog): Add parameter only_dir_p. + Check only_dir_p instead of comparing prompt to "Dired". * gtkutil.c (xg_get_file_with_chooser) (xg_get_file_with_selection): New functions, only defined ifdef @@ -323,8 +327,8 @@ 2004-11-01 Kim F. Storm - * process.c (connect_wait_mask, num_pending_connects): Only - declare and use them if NON_BLOCKING_CONNECT is defined. + * process.c (connect_wait_mask, num_pending_connects): + Only declare and use them if NON_BLOCKING_CONNECT is defined. (init_process): Initialize them if NON_BLOCKING_CONNECT defined. (IF_NON_BLOCKING_CONNECT): New helper macro. (wait_reading_process_output): Only declare and use local vars @@ -339,8 +343,8 @@ * xmenu.c: Add prototypes for forward function declarations. (popup_get_selection): Remove parameter do_timers, remove call to timer_check. - (create_and_show_popup_menu, create_and_show_dialog): Remove - parameter do_timers from call to popup_get_selection. + (create_and_show_popup_menu, create_and_show_dialog): + Remove parameter do_timers from call to popup_get_selection. * xdisp.c (update_tool_bar): Pass a copy of f->tool_bar_items to tool_bar_items and assign the result to f->tool_bar_items if @@ -359,7 +363,7 @@ * macterm.c: allow user to assign key modifiers to the Mac Option key via a 'mac-option-modifier' variable. -2004-10-28 Stefan +2004-10-28 Stefan Monnier * xselect.c (Vx_lost_selection_functions, Vx_sent_selection_functions): Rename from Vx_lost_selection_hooks and Vx_sent_selection_hooks. diff --git a/src/keymap.c b/src/keymap.c index 105a5b95793..a0d5c3b5be5 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -213,13 +213,13 @@ when reading a key-sequence to be looked-up in this keymap. */) (map) Lisp_Object map; { + map = get_keymap (map, 0, 0); while (CONSP (map)) { - register Lisp_Object tem; - tem = Fcar (map); + Lisp_Object tem = XCAR (map); if (STRINGP (tem)) return tem; - map = Fcdr (map); + map = XCDR (map); } return Qnil; } -- cgit v1.3 From c3438661cbfac6a4622ea16c25c237a4ecd43009 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Fri, 12 Nov 2004 08:33:51 +0000 Subject: * xmenu.c (x_menu_wait_for_event): New function. (popup_get_selection, popup_widget_loop): Call x_menu_wait_for_event to handle timers. (xmenu_show): Call XMenuActivateSetWaitFunction so that x_menu_wait_for_event is called by XMenuActivate. --- src/ChangeLog | 8 ++++++ src/xmenu.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 76 insertions(+), 10 deletions(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index e7d9d37aa3a..7f66e82bfc6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2004-11-12 Jan Dj,Ad(Brv + + * xmenu.c (x_menu_wait_for_event): New function. + (popup_get_selection, popup_widget_loop): Call x_menu_wait_for_event + to handle timers. + (xmenu_show): Call XMenuActivateSetWaitFunction so that + x_menu_wait_for_event is called by XMenuActivate. + 2004-11-10 Stefan Monnier * keymap.c (Fkeymap_prompt): Accept symbol keymaps. diff --git a/src/xmenu.c b/src/xmenu.c index 9868902f3f3..9b9de8aa16d 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -48,6 +48,7 @@ Boston, MA 02111-1307, USA. */ #include "buffer.h" #include "charset.h" #include "coding.h" +#include "sysselect.h" #ifdef MSDOS #include "msdos.h" @@ -157,8 +158,6 @@ static void single_keymap_panes P_ ((Lisp_Object, Lisp_Object, Lisp_Object, static void list_of_panes P_ ((Lisp_Object)); static void list_of_items P_ ((Lisp_Object)); -extern EMACS_TIME timer_check P_ ((int)); - /* This holds a Lisp vector that holds the results of decoding the keymaps or alist-of-alists that specify a menu. @@ -1115,6 +1114,60 @@ on the left of the dialog box and all following items on the right. } #endif } + + +#ifndef MSDOS + +/* Wait for an X event to arrive or for a timer to expire. */ + +static void +x_menu_wait_for_event (void *data) +{ + extern EMACS_TIME timer_check P_ ((int)); + + /* Another way to do this is to register a timer callback, that can be + done in GTK and Xt. But we have to do it like this when using only X + anyway, and with callbacks we would have three variants for timer handling + instead of the small ifdefs below. */ + + while ( +#ifdef USE_X_TOOLKIT + XtAppPending (Xt_app_con) +#elif defined USE_GTK + ! gtk_events_pending () +#else + ! XPending ((Display*) data) +#endif + ) + { + EMACS_TIME next_time = timer_check (1); + long secs = EMACS_SECS (next_time); + long usecs = EMACS_USECS (next_time); + SELECT_TYPE read_fds; + struct x_display_info *dpyinfo; + int n = 0; + + FD_ZERO (&read_fds); + for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next) + { + int fd = ConnectionNumber (dpyinfo->display); + FD_SET (fd, &read_fds); + if (fd > n) n = fd; + } + + if (secs < 0 || (secs == 0 && usecs == 0)) + { + /* Sometimes timer_check returns -1 (no timers) even if there are + timers. So do a timeout anyway. */ + EMACS_SET_SECS (next_time, 1); + EMACS_SET_USECS (next_time, 0); + } + + select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, &next_time); + } +} +#endif /* ! MSDOS */ + #if defined (USE_X_TOOLKIT) || defined (USE_GTK) @@ -1140,17 +1193,16 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) while (popup_activated_flag) { - /* If we have no events to run, consider timers. */ - if (do_timers && !XtAppPending (Xt_app_con)) - timer_check (1); - if (initial_event) { event = *initial_event; initial_event = 0; } else - XtAppNextEvent (Xt_app_con, &event); + { + if (do_timers) x_menu_wait_for_event (0); + XtAppNextEvent (Xt_app_con, &event); + } /* Make sure we don't consider buttons grabbed after menu goes. And make sure to deactivate for any ButtonRelease, @@ -1196,13 +1248,15 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) /* Loop util popup_activated_flag is set to zero in a callback. Used for popup menus and dialogs. */ static void -popup_widget_loop () +popup_widget_loop (do_timers) + int do_timers; { ++popup_activated_flag; /* Process events in the Gtk event loop until done. */ while (popup_activated_flag) { + if (do_timers) x_menu_wait_for_event (0); gtk_main_iteration (); } } @@ -2402,7 +2456,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) two. show_help_echo uses this to detect popup menus. */ popup_activated_flag = 1; /* Process events that apply to the menu. */ - popup_widget_loop (); + popup_widget_loop (0); gtk_widget_destroy (menu); @@ -2811,7 +2865,7 @@ create_and_show_dialog (f, first_wv) gtk_widget_show_all (menu); /* Process events that apply to the menu. */ - popup_widget_loop (); + popup_widget_loop (1); gtk_widget_destroy (menu); } @@ -3323,6 +3377,10 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) XMenuSetFreeze (menu, TRUE); pane = selidx = 0; +#ifndef MSDOS + XMenuActivateSetWaitFunction (x_menu_wait_for_event, FRAME_X_DISPLAY (f)); +#endif + /* Help display under X won't work because XMenuActivate contains a loop that doesn't give Emacs a chance to process it. */ menu_help_frame = f; -- cgit v1.3 From df00f4364c61cb4d813a158d6f7d4f31e1ea4adf Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Fri, 12 Nov 2004 09:36:55 +0000 Subject: (popup_widget_loop): Add argument do_timers. (create_and_show_popup_menu, create_and_show_dialog): Pass 1 for do_timers to popup_widget_loop. (create_and_show_popup_menu): Pass 1 for do_timers to popup_get_selection. --- src/ChangeLog | 5 +++++ src/xmenu.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index 7f66e82bfc6..b680abe8d4f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -3,8 +3,13 @@ * xmenu.c (x_menu_wait_for_event): New function. (popup_get_selection, popup_widget_loop): Call x_menu_wait_for_event to handle timers. + (popup_widget_loop): Add argument do_timers. + (create_and_show_popup_menu, create_and_show_dialog): Pass 1 for + do_timers to popup_widget_loop. (xmenu_show): Call XMenuActivateSetWaitFunction so that x_menu_wait_for_event is called by XMenuActivate. + (create_and_show_popup_menu): Pass 1 for do_timers to + popup_get_selection. 2004-11-10 Stefan Monnier diff --git a/src/xmenu.c b/src/xmenu.c index 9b9de8aa16d..d8ab2eb58aa 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -2456,7 +2456,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) two. show_help_echo uses this to detect popup menus. */ popup_activated_flag = 1; /* Process events that apply to the menu. */ - popup_widget_loop (0); + popup_widget_loop (1); gtk_widget_destroy (menu); @@ -2544,7 +2544,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) popup_activated_flag = 1; /* Process events that apply to the menu. */ - popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 0, 0); + popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 1, 0); /* fp turned off the following statement and wrote a comment that it is unnecessary--that the menu has already disappeared. -- cgit v1.3 From f1d1cd24db8ab975bbe9bf0c4260bd8025e8bd75 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Fri, 12 Nov 2004 10:34:36 +0000 Subject: (pop_down_menu): New function. (popup_get_selection, popup_widget_loop): Unwind protect to pop_down_menu. (popup_widget_loop): Add argument widget. (create_and_show_popup_menu, create_and_show_dialog): Pass new argument widget to popup_widget_loop. --- src/ChangeLog | 6 ++++++ src/xmenu.c | 44 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 45 insertions(+), 5 deletions(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index b680abe8d4f..89002eaadd1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -10,6 +10,12 @@ x_menu_wait_for_event is called by XMenuActivate. (create_and_show_popup_menu): Pass 1 for do_timers to popup_get_selection. + (pop_down_menu): New function. + (popup_get_selection, popup_widget_loop): Unwind protect to + pop_down_menu. + (popup_widget_loop): Add argument widget. + (create_and_show_popup_menu, create_and_show_dialog): Pass new + argument widget to popup_widget_loop. 2004-11-10 Stefan Monnier diff --git a/src/xmenu.c b/src/xmenu.c index d8ab2eb58aa..d7551cd7e45 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -1132,7 +1132,7 @@ x_menu_wait_for_event (void *data) while ( #ifdef USE_X_TOOLKIT - XtAppPending (Xt_app_con) + ! XtAppPending (Xt_app_con) #elif defined USE_GTK ! gtk_events_pending () #else @@ -1171,6 +1171,15 @@ x_menu_wait_for_event (void *data) #if defined (USE_X_TOOLKIT) || defined (USE_GTK) +#ifdef USE_X_TOOLKIT + +static Lisp_Object +pop_down_menu (dummy) + int dummy; +{ + popup_activated_flag = 0; +} + /* Loop in Xt until the menu pulldown or dialog popup has been popped down (deactivated). This is used for x-popup-menu and x-popup-dialog; it is not used for the menu bar. @@ -1180,7 +1189,6 @@ x_menu_wait_for_event (void *data) NOTE: All calls to popup_get_selection should be protected with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */ -#ifdef USE_X_TOOLKIT static void popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) XEvent *initial_event; @@ -1191,6 +1199,9 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) { XEvent event; + int specpdl_count = SPECPDL_INDEX (); + record_unwind_protect (pop_down_menu, Qnil); + while (popup_activated_flag) { if (initial_event) @@ -1240,6 +1251,8 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) x_dispatch_event (&event, event.xany.display); } + + unbind_to (specpdl_count, Qnil); } #endif /* USE_X_TOOLKIT */ @@ -1247,10 +1260,29 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) #ifdef USE_GTK /* Loop util popup_activated_flag is set to zero in a callback. Used for popup menus and dialogs. */ +static GtkWidget *current_menu; + +static Lisp_Object +pop_down_menu (dummy) + int dummy; +{ + if (current_menu) + { + gtk_widget_unmap (current_menu); + current_menu = 0; + popup_activated_flag = 0; + } +} + static void -popup_widget_loop (do_timers) +popup_widget_loop (do_timers, widget) int do_timers; + GtkWidget *widget; { + int specpdl_count = SPECPDL_INDEX (); + current_menu = widget; + record_unwind_protect (pop_down_menu, Qnil); + ++popup_activated_flag; /* Process events in the Gtk event loop until done. */ @@ -1259,6 +1291,8 @@ popup_widget_loop (do_timers) if (do_timers) x_menu_wait_for_event (0); gtk_main_iteration (); } + + unbind_to (specpdl_count, Qnil); } #endif @@ -2456,7 +2490,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) two. show_help_echo uses this to detect popup menus. */ popup_activated_flag = 1; /* Process events that apply to the menu. */ - popup_widget_loop (1); + popup_widget_loop (1, 0); gtk_widget_destroy (menu); @@ -2865,7 +2899,7 @@ create_and_show_dialog (f, first_wv) gtk_widget_show_all (menu); /* Process events that apply to the menu. */ - popup_widget_loop (1); + popup_widget_loop (1, menu); gtk_widget_destroy (menu); } -- cgit v1.3 From b9de078aa68bc403b9da6c801cdbd37eb77af44a Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 12 Nov 2004 13:47:13 +0000 Subject: (pop_down_menu): Return nil. --- src/ChangeLog | 6 +++++- src/xmenu.c | 8 +++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index 89002eaadd1..43283cc83e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-11-12 Kim F. Storm + + * xmenu.c (pop_down_menu): Return nil. + 2004-11-12 Jan Dj,Ad(Brv * xmenu.c (x_menu_wait_for_event): New function. @@ -8,7 +12,7 @@ do_timers to popup_widget_loop. (xmenu_show): Call XMenuActivateSetWaitFunction so that x_menu_wait_for_event is called by XMenuActivate. - (create_and_show_popup_menu): Pass 1 for do_timers to + (create_and_show_popup_menu): Pass 1 for do_timers to popup_get_selection. (pop_down_menu): New function. (popup_get_selection, popup_widget_loop): Unwind protect to diff --git a/src/xmenu.c b/src/xmenu.c index d7551cd7e45..3b813927281 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -524,7 +524,7 @@ single_menu_item (key, item, dummy, skp_v) return; /* Not a menu item. */ map = XVECTOR (item_properties)->contents[ITEM_PROPERTY_MAP]; - + if (skp->notreal) { /* We don't want to make a menu, just traverse the keymaps to @@ -1098,7 +1098,7 @@ on the left of the dialog box and all following items on the right. the dialog. Also, the lesstif/motif version crashes if there are no buttons. */ contents = Fcons (title, Fcons (Fcons (build_string ("Ok"), Qt), Qnil)); - + list_of_panes (Fcons (contents, Qnil)); /* Display them in a dialog box. */ @@ -1178,6 +1178,7 @@ pop_down_menu (dummy) int dummy; { popup_activated_flag = 0; + return Qnil; } /* Loop in Xt until the menu pulldown or dialog popup has been @@ -1272,6 +1273,7 @@ pop_down_menu (dummy) current_menu = 0; popup_activated_flag = 0; } + return Qnil; } static void @@ -2417,7 +2419,7 @@ menu_position_func (menu, x, y, push_in, user_data) GtkRequisition req; int disp_width = FRAME_X_DISPLAY_INFO (data->f)->width; int disp_height = FRAME_X_DISPLAY_INFO (data->f)->height; - + *x = data->x; *y = data->y; -- cgit v1.3 From 381f7091f64d97deb26781de0b24b30844b8e2bc Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Fri, 12 Nov 2004 14:21:27 +0000 Subject: *** empty log message *** --- src/ChangeLog | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/ChangeLog') diff --git a/src/ChangeLog b/src/ChangeLog index 43283cc83e3..cc9e71290d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,36 @@ 2004-11-12 Kim F. Storm + * dispextern.h (struct glyph_row): New member extra_line_spacing. + (struct it): New member max_extra_line_spacing. + (MR_PARTIALLY_VISIBLE, MR_PARTIALLY_VISIBLE_AT_TOP) + (MR_PARTIALLY_VISIBLE_AT_BOTTOM): New helper macros. + (MATRIX_ROW_PARTIALLY_VISIBLE_P): Fix to return false if invisible + part of last line is only extra line spacing (so the text on the + line is fully visible). Use helper macros. + Add W arg (to use them). All callers changed. + (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P) + (MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P): Use helper macros. + + * window.c (window_scroll_pixel_based, Frecenter): Use + move_it_vertically_backward directly. + (Frecenter): Fix calculation of new start pos for negative arg. + Before, the new start pos was sometimes chosen too far back, so + the last line became only partially visible, and thus would be + either only semi-visible or automatically scrolled to the middle + of the window by redisplay. + + * xdisp.c (init_iterator): Clear it.max_extra_line_spacing. + (move_it_vertically_backward): Don't recure to move further back. + (move_it_vertically): Remove superfluous condition. + (move_it_by_lines): Clear last_height when moved 0 lines. + (resize_mini_window): use it.max_extra_line_spacing. + (display_tool_bar_line): Clear row->extra_line_spacing. + (try_scrolling): Use move_it_vertically_backward directly. + (redisplay_window): Likewise. + (compute_line_metrics): Set row->extra_line_spacing. + (display_line, display_string): Likewise. + (x_produce_glyphs): Update it->max_extra_line_spacing. + * xmenu.c (pop_down_menu): Return nil. 2004-11-12 Jan Dj,Ad(Brv -- cgit v1.3