diff options
| author | Miles Bader | 2005-03-31 09:58:14 +0000 |
|---|---|---|
| committer | Miles Bader | 2005-03-31 09:58:14 +0000 |
| commit | 773415d9340f12db3bd8654de5014deec57d49b7 (patch) | |
| tree | 579ecf466891c80df147934b0db24cb89d0abe3d /src | |
| parent | e9d5a4e18a8955cf60e78c54a511fd8e1259716f (diff) | |
| parent | 7c315e1cff9019c8af55921fab6f571e68b09623 (diff) | |
| download | emacs-773415d9340f12db3bd8654de5014deec57d49b7.tar.gz emacs-773415d9340f12db3bd8654de5014deec57d49b7.zip | |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-31
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 206-222)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 45-52)
- Update from CVS
- Update from CVS: texi Makefile.in CVS keyw cruft
- Update from CVS: ChangeLog tweaks
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 56 | ||||
| -rw-r--r-- | src/alloc.c | 2 | ||||
| -rw-r--r-- | src/callproc.c | 8 | ||||
| -rw-r--r-- | src/coding.c | 3 | ||||
| -rw-r--r-- | src/dired.c | 6 | ||||
| -rw-r--r-- | src/editfns.c | 4 | ||||
| -rw-r--r-- | src/fileio.c | 179 | ||||
| -rw-r--r-- | src/lisp.h | 6 | ||||
| -rw-r--r-- | src/minibuf.c | 17 | ||||
| -rw-r--r-- | src/process.c | 6 | ||||
| -rw-r--r-- | src/w32term.c | 95 | ||||
| -rw-r--r-- | src/w32term.h | 17 | ||||
| -rw-r--r-- | src/xdisp.c | 9 | ||||
| -rw-r--r-- | src/xmenu.c | 13 |
14 files changed, 278 insertions, 143 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 54b54b95f27..c3f13e624a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,54 @@ | |||
| 1 | 2005-03-30 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * xdisp.c (display_line): Allow multiple overlay arrows in window. | ||
| 4 | |||
| 5 | 2005-03-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 6 | |||
| 7 | * fileio.c (Fexpand_file_name): Use IS_DEVICE_SEP. | ||
| 8 | (file_name_absolute_p): New fun, extracted from Ffile_name_absolute_p. | ||
| 9 | (Ffile_name_absolute_p): Use it. | ||
| 10 | (search_embedded_absfilename): New fun, extracted from | ||
| 11 | Fsubstitute_in_file_name. Use file_name_absolute_p. | ||
| 12 | Free the pw data after use. | ||
| 13 | (Fsubstitute_in_file_name): Use it. | ||
| 14 | After cutting a prefix, re-check file-name-handler. | ||
| 15 | |||
| 16 | 2005-03-26 Lennart Borgman <lennart.borgman.073@student.lu.se> | ||
| 17 | |||
| 18 | * w32term.h (x_output): add focus_state. | ||
| 19 | |||
| 20 | * w32term.c (x_focus_changed, w32_detect_focus_change): New functions. | ||
| 21 | (w32_read_socket) [WM_SETFOCUS]: Call w32_detect_focus_change. | ||
| 22 | |||
| 23 | 2005-03-25 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 24 | |||
| 25 | * minibuf.c (Fminibuffer_complete_and_exit, Fself_insert_and_exit): | ||
| 26 | Use Fexit_minibuffer. | ||
| 27 | (Fexit_minibuffer): Mark it as no-return, deactivate the mark. | ||
| 28 | |||
| 29 | 2005-03-24 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 30 | |||
| 31 | * dired.c (Ffile_attributes): Add a missing gcpro. | ||
| 32 | |||
| 33 | * alloc.c (make_number): The arg can be bigger than `int'. | ||
| 34 | * lisp.h (make_number): Make prototype more precise. | ||
| 35 | |||
| 36 | * process.c, dired.c (Vfile_name_coding_system) | ||
| 37 | (Vdefault_file_name_coding_system): | ||
| 38 | * callproc.c (Vdoc_file_name, Vfile_name_coding_system) | ||
| 39 | (Vdefault_file_name_coding_system): Remove unused declarations. | ||
| 40 | |||
| 41 | 2005-03-24 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 42 | |||
| 43 | * xmenu.c (create_and_show_popup_menu): Just remove menu and return | ||
| 44 | if it failed to pop up (Gnome "show pointer on ctrl" option makes | ||
| 45 | menus fail to pop up). | ||
| 46 | |||
| 47 | 2005-03-24 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 48 | |||
| 49 | * xdisp.c (get_next_display_element): Also use `\ ' & `\-' for latin-9. | ||
| 50 | Just prepend a backslash without replacing the NBSP by an SPC. | ||
| 51 | |||
| 1 | 2005-03-22 Kim F. Storm <storm@cua.dk> | 52 | 2005-03-22 Kim F. Storm <storm@cua.dk> |
| 2 | 53 | ||
| 3 | * xfaces.c (lookup_derived_face): Add arg SIGNAL_P. | 54 | * xfaces.c (lookup_derived_face): Add arg SIGNAL_P. |
| @@ -17,7 +68,7 @@ | |||
| 17 | 2005-03-22 David Kastrup <dak@gnu.org> | 68 | 2005-03-22 David Kastrup <dak@gnu.org> |
| 18 | 69 | ||
| 19 | * textprop.c (Fnext_char_property_change) | 70 | * textprop.c (Fnext_char_property_change) |
| 20 | (Fprevious_char_property_change): allow marker as limit. | 71 | (Fprevious_char_property_change): Allow marker as limit. |
| 21 | (Fnext_single_char_property_change) | 72 | (Fnext_single_char_property_change) |
| 22 | (Fprevious_single_char_property_change): Check that limit is a | 73 | (Fprevious_single_char_property_change): Check that limit is a |
| 23 | number in strings. | 74 | number in strings. |
| @@ -51,8 +102,7 @@ | |||
| 51 | 102 | ||
| 52 | 2005-03-17 Kenichi Handa <handa@m17n.org> | 103 | 2005-03-17 Kenichi Handa <handa@m17n.org> |
| 53 | 104 | ||
| 54 | * coding.c (syms_of_coding): Docstring of coding-category-list | 105 | * coding.c (syms_of_coding): Docstring of coding-category-list fixed. |
| 55 | fixed. | ||
| 56 | 106 | ||
| 57 | 2005-03-17 Stefan Monnier <monnier@iro.umontreal.ca> | 107 | 2005-03-17 Stefan Monnier <monnier@iro.umontreal.ca> |
| 58 | 108 | ||
diff --git a/src/alloc.c b/src/alloc.c index 70cf2d7b70e..aacce3041d5 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1502,7 +1502,7 @@ mark_interval_tree (tree) | |||
| 1502 | #ifndef make_number | 1502 | #ifndef make_number |
| 1503 | Lisp_Object | 1503 | Lisp_Object |
| 1504 | make_number (n) | 1504 | make_number (n) |
| 1505 | int n; | 1505 | EMACS_INT n; |
| 1506 | { | 1506 | { |
| 1507 | Lisp_Object obj; | 1507 | Lisp_Object obj; |
| 1508 | obj.s.val = n; | 1508 | obj.s.val = n; |
diff --git a/src/callproc.c b/src/callproc.c index 623509ce199..c410b5a121b 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Synchronous subprocess invocation for GNU Emacs. | 1 | /* Synchronous subprocess invocation for GNU Emacs. |
| 2 | Copyright (C) 1985,86,87,88,93,94,95,99, 2000,01,02,03,04 | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001, |
| 3 | Free Software Foundation, Inc. | 3 | 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -130,10 +130,6 @@ int synch_process_termsig; | |||
| 130 | /* If synch_process_death is zero, | 130 | /* If synch_process_death is zero, |
| 131 | this is exit code of synchronous subprocess. */ | 131 | this is exit code of synchronous subprocess. */ |
| 132 | int synch_process_retcode; | 132 | int synch_process_retcode; |
| 133 | |||
| 134 | extern Lisp_Object Vdoc_file_name; | ||
| 135 | |||
| 136 | extern Lisp_Object Vfile_name_coding_system, Vdefault_file_name_coding_system; | ||
| 137 | 133 | ||
| 138 | /* Clean up when exiting Fcall_process. | 134 | /* Clean up when exiting Fcall_process. |
| 139 | On MSDOS, delete the temporary file on any kind of termination. | 135 | On MSDOS, delete the temporary file on any kind of termination. |
diff --git a/src/coding.c b/src/coding.c index c36060cad44..6fcb031b432 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -9357,8 +9357,7 @@ associated with each coding-category one by one in this order. When | |||
| 9357 | one algorithm agrees with a byte sequence of source text, the coding | 9357 | one algorithm agrees with a byte sequence of source text, the coding |
| 9358 | system bound to the corresponding coding-category is selected. | 9358 | system bound to the corresponding coding-category is selected. |
| 9359 | 9359 | ||
| 9360 | When you modify this variable, `update-coding-systems-internal' must | 9360 | Don't modify this variable directly, but use `set-coding-category'. */); |
| 9361 | be called. */); | ||
| 9362 | { | 9361 | { |
| 9363 | int i; | 9362 | int i; |
| 9364 | 9363 | ||
diff --git a/src/dired.c b/src/dired.c index 71597ebc9ea..032040222da 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Lisp functions for making directory listings. | 1 | /* Lisp functions for making directory listings. |
| 2 | Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2004 | 2 | Copyright (C) 1985, 1986, 1993, 1994, 1999, 2000, 2001, 2004, 2005 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -115,7 +115,6 @@ extern void filemodestring P_ ((struct stat *, char *)); | |||
| 115 | 115 | ||
| 116 | extern int completion_ignore_case; | 116 | extern int completion_ignore_case; |
| 117 | extern Lisp_Object Vcompletion_regexp_list; | 117 | extern Lisp_Object Vcompletion_regexp_list; |
| 118 | extern Lisp_Object Vfile_name_coding_system, Vdefault_file_name_coding_system; | ||
| 119 | 118 | ||
| 120 | Lisp_Object Vcompletion_ignored_extensions; | 119 | Lisp_Object Vcompletion_ignored_extensions; |
| 121 | Lisp_Object Qcompletion_ignore_case; | 120 | Lisp_Object Qcompletion_ignore_case; |
| @@ -908,6 +907,7 @@ Elements of the attribute list are: | |||
| 908 | #endif | 907 | #endif |
| 909 | char modes[10]; | 908 | char modes[10]; |
| 910 | Lisp_Object handler; | 909 | Lisp_Object handler; |
| 910 | struct gcpro gcpro1; | ||
| 911 | 911 | ||
| 912 | filename = Fexpand_file_name (filename, Qnil); | 912 | filename = Fexpand_file_name (filename, Qnil); |
| 913 | 913 | ||
| @@ -923,7 +923,9 @@ Elements of the attribute list are: | |||
| 923 | return call3 (handler, Qfile_attributes, filename, id_format); | 923 | return call3 (handler, Qfile_attributes, filename, id_format); |
| 924 | } | 924 | } |
| 925 | 925 | ||
| 926 | GCPRO1 (filename); | ||
| 926 | encoded = ENCODE_FILE (filename); | 927 | encoded = ENCODE_FILE (filename); |
| 928 | UNGCPRO; | ||
| 927 | 929 | ||
| 928 | if (lstat (SDATA (encoded), &s) < 0) | 930 | if (lstat (SDATA (encoded), &s) < 0) |
| 929 | return Qnil; | 931 | return Qnil; |
diff --git a/src/editfns.c b/src/editfns.c index 59e57565d49..1cbd28dd109 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Lisp functions pertaining to editing. | 1 | /* Lisp functions pertaining to editing. |
| 2 | Copyright (C) 1985,86,87,89,93,94,95,96,97,98,1999,2000,01,02,03,2004 | 2 | Copyright (C) 1985, 1986, 1987, 1989, 1993, 1994, 1995, 1996, 1997, 1998, |
| 3 | Free Software Foundation, Inc. | 3 | 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
diff --git a/src/fileio.c b/src/fileio.c index bd61d3847c5..9b3360a7fa8 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1018,7 +1018,7 @@ probably use `make-temp-file' instead, except in three circumstances: | |||
| 1018 | DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, | 1018 | DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, |
| 1019 | doc: /* Convert filename NAME to absolute, and canonicalize it. | 1019 | doc: /* Convert filename NAME to absolute, and canonicalize it. |
| 1020 | Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative | 1020 | Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative |
| 1021 | (does not start with slash); if DEFAULT-DIRECTORY is nil or missing, | 1021 | \(does not start with slash); if DEFAULT-DIRECTORY is nil or missing, |
| 1022 | the current buffer's value of default-directory is used. | 1022 | the current buffer's value of default-directory is used. |
| 1023 | File name components that are `.' are removed, and | 1023 | File name components that are `.' are removed, and |
| 1024 | so are file name components followed by `..', along with the `..' itself; | 1024 | so are file name components followed by `..', along with the `..' itself; |
| @@ -1468,7 +1468,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1468 | indirectly by prepending newdir to nm if necessary, and using | 1468 | indirectly by prepending newdir to nm if necessary, and using |
| 1469 | cwd (or the wd of newdir's drive) as the new newdir. */ | 1469 | cwd (or the wd of newdir's drive) as the new newdir. */ |
| 1470 | 1470 | ||
| 1471 | if (IS_DRIVE (newdir[0]) && newdir[1] == ':') | 1471 | if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1])) |
| 1472 | { | 1472 | { |
| 1473 | drive = newdir[0]; | 1473 | drive = newdir[0]; |
| 1474 | newdir += 2; | 1474 | newdir += 2; |
| @@ -1491,7 +1491,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1491 | } | 1491 | } |
| 1492 | 1492 | ||
| 1493 | /* Strip off drive name from prefix, if present. */ | 1493 | /* Strip off drive name from prefix, if present. */ |
| 1494 | if (IS_DRIVE (newdir[0]) && newdir[1] == ':') | 1494 | if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1])) |
| 1495 | { | 1495 | { |
| 1496 | drive = newdir[0]; | 1496 | drive = newdir[0]; |
| 1497 | newdir += 2; | 1497 | newdir += 2; |
| @@ -1725,7 +1725,7 @@ See also the function `substitute-in-file-name'. */) | |||
| 1725 | DEAFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, | 1725 | DEAFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, |
| 1726 | "Convert FILENAME to absolute, and canonicalize it.\n\ | 1726 | "Convert FILENAME to absolute, and canonicalize it.\n\ |
| 1727 | Second arg DEFAULT is directory to start with if FILENAME is relative\n\ | 1727 | Second arg DEFAULT is directory to start with if FILENAME is relative\n\ |
| 1728 | (does not start with slash); if DEFAULT is nil or missing,\n\ | 1728 | \(does not start with slash); if DEFAULT is nil or missing,\n\ |
| 1729 | the current buffer's value of default-directory is used.\n\ | 1729 | the current buffer's value of default-directory is used.\n\ |
| 1730 | Filenames containing `.' or `..' as components are simplified;\n\ | 1730 | Filenames containing `.' or `..' as components are simplified;\n\ |
| 1731 | initial `~/' expands to your home directory.\n\ | 1731 | initial `~/' expands to your home directory.\n\ |
| @@ -2044,6 +2044,75 @@ See also the function `substitute-in-file-name'.") | |||
| 2044 | } | 2044 | } |
| 2045 | #endif | 2045 | #endif |
| 2046 | 2046 | ||
| 2047 | /* If /~ or // appears, discard everything through first slash. */ | ||
| 2048 | static int | ||
| 2049 | file_name_absolute_p (filename) | ||
| 2050 | const unsigned char *filename; | ||
| 2051 | { | ||
| 2052 | return | ||
| 2053 | (IS_DIRECTORY_SEP (*filename) || *filename == '~' | ||
| 2054 | #ifdef VMS | ||
| 2055 | /* ??? This criterion is probably wrong for '<'. */ | ||
| 2056 | || index (filename, ':') || index (filename, '<') | ||
| 2057 | || (*filename == '[' && (filename[1] != '-' | ||
| 2058 | || (filename[2] != '.' && filename[2] != ']')) | ||
| 2059 | && filename[1] != '.') | ||
| 2060 | #endif /* VMS */ | ||
| 2061 | #ifdef DOS_NT | ||
| 2062 | || (IS_DRIVE (*filename) && IS_DEVICE_SEP (filename[1]) | ||
| 2063 | && IS_DIRECTORY_SEP (filename[2])) | ||
| 2064 | #endif | ||
| 2065 | ); | ||
| 2066 | } | ||
| 2067 | |||
| 2068 | static unsigned char * | ||
| 2069 | search_embedded_absfilename (nm, endp) | ||
| 2070 | unsigned char *nm, *endp; | ||
| 2071 | { | ||
| 2072 | unsigned char *p, *s; | ||
| 2073 | |||
| 2074 | for (p = nm + 1; p < endp; p++) | ||
| 2075 | { | ||
| 2076 | if ((0 | ||
| 2077 | #ifdef VMS | ||
| 2078 | || p[-1] == ':' || p[-1] == ']' || p[-1] == '>' | ||
| 2079 | #endif /* VMS */ | ||
| 2080 | || IS_DIRECTORY_SEP (p[-1])) | ||
| 2081 | && file_name_absolute_p (p) | ||
| 2082 | #if defined (APOLLO) || defined (WINDOWSNT) || defined(CYGWIN) | ||
| 2083 | /* // at start of file name is meaningful in Apollo, | ||
| 2084 | WindowsNT and Cygwin systems. */ | ||
| 2085 | && !(IS_DIRECTORY_SEP (p[0]) && p - 1 == nm) | ||
| 2086 | #endif /* not (APOLLO || WINDOWSNT || CYGWIN) */ | ||
| 2087 | ) | ||
| 2088 | { | ||
| 2089 | for (s = p; *s && (!IS_DIRECTORY_SEP (*s) | ||
| 2090 | #ifdef VMS | ||
| 2091 | && *s != ':' | ||
| 2092 | #endif /* VMS */ | ||
| 2093 | ); s++); | ||
| 2094 | if (p[0] == '~' && s > p + 1) /* we've got "/~something/" */ | ||
| 2095 | { | ||
| 2096 | unsigned char *o = alloca (s - p + 1); | ||
| 2097 | struct passwd *pw; | ||
| 2098 | bcopy (p, o, s - p); | ||
| 2099 | o [s - p] = 0; | ||
| 2100 | |||
| 2101 | /* If we have ~user and `user' exists, discard | ||
| 2102 | everything up to ~. But if `user' does not exist, leave | ||
| 2103 | ~user alone, it might be a literal file name. */ | ||
| 2104 | if ((pw = getpwnam (o + 1))) | ||
| 2105 | return p; | ||
| 2106 | else | ||
| 2107 | xfree (pw); | ||
| 2108 | } | ||
| 2109 | else | ||
| 2110 | return p; | ||
| 2111 | } | ||
| 2112 | } | ||
| 2113 | return NULL; | ||
| 2114 | } | ||
| 2115 | |||
| 2047 | DEFUN ("substitute-in-file-name", Fsubstitute_in_file_name, | 2116 | DEFUN ("substitute-in-file-name", Fsubstitute_in_file_name, |
| 2048 | Ssubstitute_in_file_name, 1, 1, 0, | 2117 | Ssubstitute_in_file_name, 1, 1, 0, |
| 2049 | doc: /* Substitute environment variables referred to in FILENAME. | 2118 | doc: /* Substitute environment variables referred to in FILENAME. |
| @@ -2065,7 +2134,6 @@ duplicates what `expand-file-name' does. */) | |||
| 2065 | int total = 0; | 2134 | int total = 0; |
| 2066 | int substituted = 0; | 2135 | int substituted = 0; |
| 2067 | unsigned char *xnm; | 2136 | unsigned char *xnm; |
| 2068 | struct passwd *pw; | ||
| 2069 | Lisp_Object handler; | 2137 | Lisp_Object handler; |
| 2070 | 2138 | ||
| 2071 | CHECK_STRING (filename); | 2139 | CHECK_STRING (filename); |
| @@ -2085,61 +2153,17 @@ duplicates what `expand-file-name' does. */) | |||
| 2085 | endp = nm + SBYTES (filename); | 2153 | endp = nm + SBYTES (filename); |
| 2086 | 2154 | ||
| 2087 | /* If /~ or // appears, discard everything through first slash. */ | 2155 | /* If /~ or // appears, discard everything through first slash. */ |
| 2088 | 2156 | p = search_embedded_absfilename (nm, endp); | |
| 2089 | for (p = nm; p != endp; p++) | 2157 | if (p) |
| 2090 | { | 2158 | /* Start over with the new string, so we check the file-name-handler |
| 2091 | if ((p[0] == '~' | 2159 | again. Important with filenames like "/home/foo//:/hello///there" |
| 2092 | #if defined (APOLLO) || defined (WINDOWSNT) || defined(CYGWIN) | 2160 | which whould substitute to "/:/hello///there" rather than "/there". */ |
| 2093 | /* // at start of file name is meaningful in Apollo, | 2161 | return Fsubstitute_in_file_name |
| 2094 | WindowsNT and Cygwin systems. */ | 2162 | (make_specified_string (p, -1, endp - p, |
| 2095 | || (IS_DIRECTORY_SEP (p[0]) && p - 1 != nm) | 2163 | STRING_MULTIBYTE (filename))); |
| 2096 | #else /* not (APOLLO || WINDOWSNT || CYGWIN) */ | ||
| 2097 | || IS_DIRECTORY_SEP (p[0]) | ||
| 2098 | #endif /* not (APOLLO || WINDOWSNT || CYGWIN) */ | ||
| 2099 | ) | ||
| 2100 | && p != nm | ||
| 2101 | && (0 | ||
| 2102 | #ifdef VMS | ||
| 2103 | || p[-1] == ':' || p[-1] == ']' || p[-1] == '>' | ||
| 2104 | #endif /* VMS */ | ||
| 2105 | || IS_DIRECTORY_SEP (p[-1]))) | ||
| 2106 | { | ||
| 2107 | for (s = p; *s && (!IS_DIRECTORY_SEP (*s) | ||
| 2108 | #ifdef VMS | ||
| 2109 | && *s != ':' | ||
| 2110 | #endif /* VMS */ | ||
| 2111 | ); s++); | ||
| 2112 | if (p[0] == '~' && s > p + 1) /* we've got "/~something/" */ | ||
| 2113 | { | ||
| 2114 | o = (unsigned char *) alloca (s - p + 1); | ||
| 2115 | bcopy ((char *) p, o, s - p); | ||
| 2116 | o [s - p] = 0; | ||
| 2117 | |||
| 2118 | pw = (struct passwd *) getpwnam (o + 1); | ||
| 2119 | } | ||
| 2120 | /* If we have ~/ or ~user and `user' exists, discard | ||
| 2121 | everything up to ~. But if `user' does not exist, leave | ||
| 2122 | ~user alone, it might be a literal file name. */ | ||
| 2123 | if (IS_DIRECTORY_SEP (p[0]) || s == p + 1 || pw) | ||
| 2124 | { | ||
| 2125 | nm = p; | ||
| 2126 | substituted = 1; | ||
| 2127 | } | ||
| 2128 | } | ||
| 2129 | #ifdef DOS_NT | ||
| 2130 | /* see comment in expand-file-name about drive specifiers */ | ||
| 2131 | else if (IS_DRIVE (p[0]) && p[1] == ':' | ||
| 2132 | && p > nm && IS_DIRECTORY_SEP (p[-1])) | ||
| 2133 | { | ||
| 2134 | nm = p; | ||
| 2135 | substituted = 1; | ||
| 2136 | } | ||
| 2137 | #endif /* DOS_NT */ | ||
| 2138 | } | ||
| 2139 | 2164 | ||
| 2140 | #ifdef VMS | 2165 | #ifdef VMS |
| 2141 | return make_specified_string (nm, -1, strlen (nm), | 2166 | return filename; |
| 2142 | STRING_MULTIBYTE (filename)); | ||
| 2143 | #else | 2167 | #else |
| 2144 | 2168 | ||
| 2145 | /* See if any variables are substituted into the string | 2169 | /* See if any variables are substituted into the string |
| @@ -2266,22 +2290,11 @@ duplicates what `expand-file-name' does. */) | |||
| 2266 | *x = 0; | 2290 | *x = 0; |
| 2267 | 2291 | ||
| 2268 | /* If /~ or // appears, discard everything through first slash. */ | 2292 | /* If /~ or // appears, discard everything through first slash. */ |
| 2269 | 2293 | while ((p = search_embedded_absfilename (xnm, x))) | |
| 2270 | for (p = xnm; p != x; p++) | 2294 | /* This time we do not start over because we've already expanded envvars |
| 2271 | if ((p[0] == '~' | 2295 | and replaced $$ with $. Maybe we should start over as well, but we'd |
| 2272 | #if defined (APOLLO) || defined (WINDOWSNT) || defined(CYGWIN) | 2296 | need to quote some $ to $$ first. */ |
| 2273 | || (IS_DIRECTORY_SEP (p[0]) && p - 1 != xnm) | 2297 | xnm = p; |
| 2274 | #else /* not (APOLLO || WINDOWSNT || CYGWIN) */ | ||
| 2275 | || IS_DIRECTORY_SEP (p[0]) | ||
| 2276 | #endif /* not (APOLLO || WINDOWSNT || CYGWIN) */ | ||
| 2277 | ) | ||
| 2278 | && p != xnm && IS_DIRECTORY_SEP (p[-1])) | ||
| 2279 | xnm = p; | ||
| 2280 | #ifdef DOS_NT | ||
| 2281 | else if (IS_DRIVE (p[0]) && p[1] == ':' | ||
| 2282 | && p > xnm && IS_DIRECTORY_SEP (p[-1])) | ||
| 2283 | xnm = p; | ||
| 2284 | #endif | ||
| 2285 | 2298 | ||
| 2286 | return make_specified_string (xnm, -1, x - xnm, STRING_MULTIBYTE (filename)); | 2299 | return make_specified_string (xnm, -1, x - xnm, STRING_MULTIBYTE (filename)); |
| 2287 | 2300 | ||
| @@ -2964,24 +2977,8 @@ On Unix, this is a name starting with a `/' or a `~'. */) | |||
| 2964 | (filename) | 2977 | (filename) |
| 2965 | Lisp_Object filename; | 2978 | Lisp_Object filename; |
| 2966 | { | 2979 | { |
| 2967 | const unsigned char *ptr; | ||
| 2968 | |||
| 2969 | CHECK_STRING (filename); | 2980 | CHECK_STRING (filename); |
| 2970 | ptr = SDATA (filename); | 2981 | return file_name_absolute_p (SDATA (filename)) ? Qt : Qnil; |
| 2971 | if (IS_DIRECTORY_SEP (*ptr) || *ptr == '~' | ||
| 2972 | #ifdef VMS | ||
| 2973 | /* ??? This criterion is probably wrong for '<'. */ | ||
| 2974 | || index (ptr, ':') || index (ptr, '<') | ||
| 2975 | || (*ptr == '[' && (ptr[1] != '-' || (ptr[2] != '.' && ptr[2] != ']')) | ||
| 2976 | && ptr[1] != '.') | ||
| 2977 | #endif /* VMS */ | ||
| 2978 | #ifdef DOS_NT | ||
| 2979 | || (IS_DRIVE (*ptr) && ptr[1] == ':' && IS_DIRECTORY_SEP (ptr[2])) | ||
| 2980 | #endif | ||
| 2981 | ) | ||
| 2982 | return Qt; | ||
| 2983 | else | ||
| 2984 | return Qnil; | ||
| 2985 | } | 2982 | } |
| 2986 | 2983 | ||
| 2987 | /* Return nonzero if file FILENAME exists and can be executed. */ | 2984 | /* Return nonzero if file FILENAME exists and can be executed. */ |
diff --git a/src/lisp.h b/src/lisp.h index 2da2fe6c7dd..160a5cb398b 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Fundamental definitions for GNU Emacs Lisp interpreter. | 1 | /* Fundamental definitions for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985,86,87,93,94,95,97,98,1999,2000,01,02,03,2004 | 2 | Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000, |
| 3 | Free Software Foundation, Inc. | 3 | 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -452,7 +452,7 @@ enum pvec_type | |||
| 452 | #define make_number(N) \ | 452 | #define make_number(N) \ |
| 453 | (__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; })) | 453 | (__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; })) |
| 454 | #else | 454 | #else |
| 455 | extern Lisp_Object make_number (); | 455 | extern Lisp_Object make_number P_ ((EMACS_INT)); |
| 456 | #endif | 456 | #endif |
| 457 | 457 | ||
| 458 | #define EQ(x, y) ((x).s.val == (y).s.val && (x).s.type == (y).s.type) | 458 | #define EQ(x, y) ((x).s.val == (y).s.val && (x).s.type == (y).s.type) |
diff --git a/src/minibuf.c b/src/minibuf.c index 329070c5cb3..538fd0b8dac 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Minibuffer input and completion. | 1 | /* Minibuffer input and completion. |
| 2 | Copyright (C) 1985,86,93,94,95,96,97,98,99,2000,01,03,04 | 2 | Copyright (C) 1985,86,93,94,95,96,97,98,99,2000,01,03,04,05 |
| 3 | Free Software Foundation, Inc. | 3 | Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| @@ -2080,6 +2080,8 @@ complete_and_exit_2 (ignore) | |||
| 2080 | return make_number (1); | 2080 | return make_number (1); |
| 2081 | } | 2081 | } |
| 2082 | 2082 | ||
| 2083 | EXFUN (Fexit_minibuffer, 0) NO_RETURN; | ||
| 2084 | |||
| 2083 | DEFUN ("minibuffer-complete-and-exit", Fminibuffer_complete_and_exit, | 2085 | DEFUN ("minibuffer-complete-and-exit", Fminibuffer_complete_and_exit, |
| 2084 | Sminibuffer_complete_and_exit, 0, 0, "", | 2086 | Sminibuffer_complete_and_exit, 0, 0, "", |
| 2085 | doc: /* If the minibuffer contents is a valid completion then exit. | 2087 | doc: /* If the minibuffer contents is a valid completion then exit. |
| @@ -2142,7 +2144,7 @@ a repetition of this command will exit. */) | |||
| 2142 | return Qnil; | 2144 | return Qnil; |
| 2143 | } | 2145 | } |
| 2144 | exit: | 2146 | exit: |
| 2145 | return Fthrow (Qexit, Qnil); | 2147 | return Fexit_minibuffer (); |
| 2146 | /* NOTREACHED */ | 2148 | /* NOTREACHED */ |
| 2147 | } | 2149 | } |
| 2148 | 2150 | ||
| @@ -2539,14 +2541,21 @@ DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0, | |||
| 2539 | else | 2541 | else |
| 2540 | bitch_at_user (); | 2542 | bitch_at_user (); |
| 2541 | 2543 | ||
| 2542 | return Fthrow (Qexit, Qnil); | 2544 | return Fexit_minibuffer (); |
| 2543 | } | 2545 | } |
| 2544 | 2546 | ||
| 2545 | DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "", | 2547 | DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "", |
| 2546 | doc: /* Terminate this minibuffer argument. */) | 2548 | doc: /* Terminate this minibuffer argument. */) |
| 2547 | () | 2549 | () |
| 2548 | { | 2550 | { |
| 2549 | return Fthrow (Qexit, Qnil); | 2551 | /* If the command that uses this has made modifications in the minibuffer, |
| 2552 | we don't want them to cause deactivation of the mark in the original | ||
| 2553 | buffer. | ||
| 2554 | A better solution would be to make deactivate-mark buffer-local | ||
| 2555 | (or to turn it into a list of buffers, ...), but in the mean time, | ||
| 2556 | this should do the trick in most cases. */ | ||
| 2557 | Vdeactivate_mark = Qnil; | ||
| 2558 | Fthrow (Qexit, Qnil); | ||
| 2550 | } | 2559 | } |
| 2551 | 2560 | ||
| 2552 | DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0, | 2561 | DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0, |
diff --git a/src/process.c b/src/process.c index 8ce21f3e8ee..26d40c26cd5 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Asynchronous subprocess control for GNU Emacs. | 1 | /* Asynchronous subprocess control for GNU Emacs. |
| 2 | Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 96, 98, 1999, | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1996, 1998, 1999, |
| 3 | 2001, 2002, 2003, 2004 Free Software Foundation, Inc. | 3 | 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -376,8 +376,6 @@ extern int timers_run; | |||
| 376 | /* Maximum number of bytes to send to a pty without an eof. */ | 376 | /* Maximum number of bytes to send to a pty without an eof. */ |
| 377 | static int pty_max_bytes; | 377 | static int pty_max_bytes; |
| 378 | 378 | ||
| 379 | extern Lisp_Object Vfile_name_coding_system, Vdefault_file_name_coding_system; | ||
| 380 | |||
| 381 | #ifdef HAVE_PTYS | 379 | #ifdef HAVE_PTYS |
| 382 | #ifdef HAVE_PTY_H | 380 | #ifdef HAVE_PTY_H |
| 383 | #include <pty.h> | 381 | #include <pty.h> |
diff --git a/src/w32term.c b/src/w32term.c index 151afb7e841..51f001bfd45 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -282,6 +282,10 @@ static void frame_highlight P_ ((struct frame *)); | |||
| 282 | static void frame_unhighlight P_ ((struct frame *)); | 282 | static void frame_unhighlight P_ ((struct frame *)); |
| 283 | static void x_new_focus_frame P_ ((struct w32_display_info *, | 283 | static void x_new_focus_frame P_ ((struct w32_display_info *, |
| 284 | struct frame *)); | 284 | struct frame *)); |
| 285 | static void x_focus_changed P_ ((int, int, struct w32_display_info *, | ||
| 286 | struct frame *, struct input_event *)); | ||
| 287 | static void w32_detect_focus_change P_ ((struct w32_display_info *, | ||
| 288 | W32Msg *, struct input_event *)); | ||
| 285 | static void w32_frame_rehighlight P_ ((struct frame *)); | 289 | static void w32_frame_rehighlight P_ ((struct frame *)); |
| 286 | static void x_frame_rehighlight P_ ((struct w32_display_info *)); | 290 | static void x_frame_rehighlight P_ ((struct w32_display_info *)); |
| 287 | static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); | 291 | static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); |
| @@ -2967,6 +2971,81 @@ x_new_focus_frame (dpyinfo, frame) | |||
| 2967 | x_frame_rehighlight (dpyinfo); | 2971 | x_frame_rehighlight (dpyinfo); |
| 2968 | } | 2972 | } |
| 2969 | 2973 | ||
| 2974 | |||
| 2975 | /* Handle FocusIn and FocusOut state changes for FRAME. | ||
| 2976 | If FRAME has focus and there exists more than one frame, puts | ||
| 2977 | a FOCUS_IN_EVENT into *BUFP. */ | ||
| 2978 | |||
| 2979 | static void | ||
| 2980 | x_focus_changed (type, state, dpyinfo, frame, bufp) | ||
| 2981 | int type; | ||
| 2982 | int state; | ||
| 2983 | struct w32_display_info *dpyinfo; | ||
| 2984 | struct frame *frame; | ||
| 2985 | struct input_event *bufp; | ||
| 2986 | { | ||
| 2987 | if (type == WM_SETFOCUS) | ||
| 2988 | { | ||
| 2989 | if (dpyinfo->w32_focus_event_frame != frame) | ||
| 2990 | { | ||
| 2991 | x_new_focus_frame (dpyinfo, frame); | ||
| 2992 | dpyinfo->w32_focus_event_frame = frame; | ||
| 2993 | |||
| 2994 | /* Don't stop displaying the initial startup message | ||
| 2995 | for a switch-frame event we don't need. */ | ||
| 2996 | if (GC_NILP (Vterminal_frame) | ||
| 2997 | && GC_CONSP (Vframe_list) | ||
| 2998 | && !GC_NILP (XCDR (Vframe_list))) | ||
| 2999 | { | ||
| 3000 | bufp->kind = FOCUS_IN_EVENT; | ||
| 3001 | XSETFRAME (bufp->frame_or_window, frame); | ||
| 3002 | } | ||
| 3003 | } | ||
| 3004 | |||
| 3005 | frame->output_data.x->focus_state |= state; | ||
| 3006 | |||
| 3007 | /* TODO: IME focus? */ | ||
| 3008 | } | ||
| 3009 | else if (type == WM_KILLFOCUS) | ||
| 3010 | { | ||
| 3011 | frame->output_data.x->focus_state &= ~state; | ||
| 3012 | |||
| 3013 | if (dpyinfo->w32_focus_event_frame == frame) | ||
| 3014 | { | ||
| 3015 | dpyinfo->w32_focus_event_frame = 0; | ||
| 3016 | x_new_focus_frame (dpyinfo, 0); | ||
| 3017 | } | ||
| 3018 | |||
| 3019 | /* TODO: IME focus? */ | ||
| 3020 | } | ||
| 3021 | } | ||
| 3022 | |||
| 3023 | |||
| 3024 | /* The focus may have changed. Figure out if it is a real focus change, | ||
| 3025 | by checking both FocusIn/Out and Enter/LeaveNotify events. | ||
| 3026 | |||
| 3027 | Returns FOCUS_IN_EVENT event in *BUFP. */ | ||
| 3028 | |||
| 3029 | static void | ||
| 3030 | w32_detect_focus_change (dpyinfo, event, bufp) | ||
| 3031 | struct w32_display_info *dpyinfo; | ||
| 3032 | W32Msg *event; | ||
| 3033 | struct input_event *bufp; | ||
| 3034 | { | ||
| 3035 | struct frame *frame; | ||
| 3036 | |||
| 3037 | frame = x_any_window_to_frame (dpyinfo, event->msg.hwnd); | ||
| 3038 | if (! frame) | ||
| 3039 | return; | ||
| 3040 | |||
| 3041 | /* On w32, this is only called from focus events, so no switch needed. */ | ||
| 3042 | x_focus_changed (event->msg.message, | ||
| 3043 | (event->msg.message == WM_KILLFOCUS ? | ||
| 3044 | FOCUS_IMPLICIT : FOCUS_EXPLICIT), | ||
| 3045 | dpyinfo, frame, bufp); | ||
| 3046 | } | ||
| 3047 | |||
| 3048 | |||
| 2970 | /* Handle an event saying the mouse has moved out of an Emacs frame. */ | 3049 | /* Handle an event saying the mouse has moved out of an Emacs frame. */ |
| 2971 | 3050 | ||
| 2972 | void | 3051 | void |
| @@ -4811,27 +4890,13 @@ w32_read_socket (sd, expected, hold_quit) | |||
| 4811 | break; | 4890 | break; |
| 4812 | 4891 | ||
| 4813 | case WM_SETFOCUS: | 4892 | case WM_SETFOCUS: |
| 4814 | /* TODO: Port this change: | 4893 | w32_detect_focus_change (dpyinfo, &msg, &inev); |
| 4815 | 2002-06-28 Jan D. <jan.h.d@swipnet.se> | ||
| 4816 | * xterm.h (struct x_output): Add focus_state. | ||
| 4817 | * xterm.c (x_focus_changed): New function. | ||
| 4818 | (x_detect_focus_change): New function. | ||
| 4819 | (XTread_socket): Call x_detect_focus_change for FocusIn/FocusOut | ||
| 4820 | EnterNotify and LeaveNotify to track X focus changes. | ||
| 4821 | */ | ||
| 4822 | f = x_any_window_to_frame (dpyinfo, msg.msg.hwnd); | ||
| 4823 | |||
| 4824 | dpyinfo->w32_focus_event_frame = f; | ||
| 4825 | |||
| 4826 | if (f) | ||
| 4827 | x_new_focus_frame (dpyinfo, f); | ||
| 4828 | 4894 | ||
| 4829 | dpyinfo->grabbed = 0; | 4895 | dpyinfo->grabbed = 0; |
| 4830 | check_visibility = 1; | 4896 | check_visibility = 1; |
| 4831 | break; | 4897 | break; |
| 4832 | 4898 | ||
| 4833 | case WM_KILLFOCUS: | 4899 | case WM_KILLFOCUS: |
| 4834 | /* TODO: some of this belongs in MOUSE_LEAVE */ | ||
| 4835 | f = x_top_window_to_frame (dpyinfo, msg.msg.hwnd); | 4900 | f = x_top_window_to_frame (dpyinfo, msg.msg.hwnd); |
| 4836 | 4901 | ||
| 4837 | if (f) | 4902 | if (f) |
diff --git a/src/w32term.h b/src/w32term.h index a25a3b49782..61c7c5b6115 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -278,8 +278,25 @@ struct x_output | |||
| 278 | { | 278 | { |
| 279 | PIX_TYPE background_pixel; | 279 | PIX_TYPE background_pixel; |
| 280 | PIX_TYPE foreground_pixel; | 280 | PIX_TYPE foreground_pixel; |
| 281 | |||
| 282 | /* Keep track of focus. May be EXPLICIT if we received a FocusIn for this | ||
| 283 | frame, or IMPLICIT if we received an EnterNotify. | ||
| 284 | FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ | ||
| 285 | int focus_state; | ||
| 286 | |||
| 281 | }; | 287 | }; |
| 282 | 288 | ||
| 289 | enum | ||
| 290 | { | ||
| 291 | /* Values for focus_state, used as bit mask. | ||
| 292 | EXPLICIT means we received a FocusIn for the frame and know it has | ||
| 293 | the focus. IMPLICIT means we recevied an EnterNotify and the frame | ||
| 294 | may have the focus if no window manager is running. | ||
| 295 | FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ | ||
| 296 | FOCUS_NONE = 0, | ||
| 297 | FOCUS_IMPLICIT = 1, | ||
| 298 | FOCUS_EXPLICIT = 2 | ||
| 299 | }; | ||
| 283 | 300 | ||
| 284 | struct w32_output | 301 | struct w32_output |
| 285 | { | 302 | { |
diff --git a/src/xdisp.c b/src/xdisp.c index 60ac47b0ec5..0b46eaf8621 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -463,7 +463,7 @@ static Lisp_Object Vwindow_size_change_functions; | |||
| 463 | 463 | ||
| 464 | Lisp_Object Qmenu_bar_update_hook, Vmenu_bar_update_hook; | 464 | Lisp_Object Qmenu_bar_update_hook, Vmenu_bar_update_hook; |
| 465 | 465 | ||
| 466 | /* Nonzero if overlay arrow has been displayed once in this window. */ | 466 | /* Nonzero if an overlay arrow has been displayed in this window. */ |
| 467 | 467 | ||
| 468 | static int overlay_arrow_seen; | 468 | static int overlay_arrow_seen; |
| 469 | 469 | ||
| @@ -15362,10 +15362,9 @@ display_line (it) | |||
| 15362 | mark this glyph row as the one containing the overlay arrow. | 15362 | mark this glyph row as the one containing the overlay arrow. |
| 15363 | This is clearly a mess with variable size fonts. It would be | 15363 | This is clearly a mess with variable size fonts. It would be |
| 15364 | better to let it be displayed like cursors under X. */ | 15364 | better to let it be displayed like cursors under X. */ |
| 15365 | if (! overlay_arrow_seen | 15365 | if ((overlay_arrow_string |
| 15366 | && (overlay_arrow_string | 15366 | = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap), |
| 15367 | = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap), | 15367 | !NILP (overlay_arrow_string))) |
| 15368 | !NILP (overlay_arrow_string))) | ||
| 15369 | { | 15368 | { |
| 15370 | /* Overlay arrow in window redisplay is a fringe bitmap. */ | 15369 | /* Overlay arrow in window redisplay is a fringe bitmap. */ |
| 15371 | if (STRINGP (overlay_arrow_string)) | 15370 | if (STRINGP (overlay_arrow_string)) |
diff --git a/src/xmenu.c b/src/xmenu.c index c8747689c1e..e369d04743c 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -2490,11 +2490,14 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) | |||
| 2490 | 2490 | ||
| 2491 | record_unwind_protect (pop_down_menu, make_save_value (menu, 0)); | 2491 | record_unwind_protect (pop_down_menu, make_save_value (menu, 0)); |
| 2492 | 2492 | ||
| 2493 | /* Set this to one. popup_widget_loop increases it by one, so it becomes | 2493 | if (GTK_WIDGET_MAPPED (menu)) |
| 2494 | two. show_help_echo uses this to detect popup menus. */ | 2494 | { |
| 2495 | popup_activated_flag = 1; | 2495 | /* Set this to one. popup_widget_loop increases it by one, so it becomes |
| 2496 | /* Process events that apply to the menu. */ | 2496 | two. show_help_echo uses this to detect popup menus. */ |
| 2497 | popup_widget_loop (1, menu); | 2497 | popup_activated_flag = 1; |
| 2498 | /* Process events that apply to the menu. */ | ||
| 2499 | popup_widget_loop (1, menu); | ||
| 2500 | } | ||
| 2498 | 2501 | ||
| 2499 | unbind_to (specpdl_count, Qnil); | 2502 | unbind_to (specpdl_count, Qnil); |
| 2500 | 2503 | ||