aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-03-27 17:29:43 +0000
committerKaroly Lorentey2005-03-27 17:29:43 +0000
commita0a7e8c6de361d15703e78a1e934d0347475dcb8 (patch)
treebea99880ecb2d7b242c5fdddb69583b3d686e22b /src
parentcd5caccf0c791bcaa19190f5d62ace1ebe9987c8 (diff)
parent99a5658144bce7733e48d9c1877b2795afc1aa9d (diff)
downloademacs-a0a7e8c6de361d15703e78a1e934d0347475dcb8.tar.gz
emacs-a0a7e8c6de361d15703e78a1e934d0347475dcb8.zip
Merged from miles@gnu.org--gnu-2005 (patch 204-213)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-204 Clean up gdb-ui breakpoint faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-205 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-206 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-207 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-208 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-209 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-210 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-211 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-212 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-213 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-319
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog41
-rw-r--r--src/alloc.c2
-rw-r--r--src/callproc.c8
-rw-r--r--src/coding.c3
-rw-r--r--src/dired.c6
-rw-r--r--src/lisp.h6
-rw-r--r--src/minibuf.c17
-rw-r--r--src/process.c6
-rw-r--r--src/w32term.c95
-rw-r--r--src/w32term.h17
-rw-r--r--src/xdisp.c8
-rw-r--r--src/xmenu.c13
12 files changed, 174 insertions, 48 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2354e597844..4ea174bdc60 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,39 @@
12005-03-26 Lennart Borgman <lennart.borgman.073@student.lu.se>
2
3 * w32term.h (x_output): add focus_state.
4
5 * w32term.c (x_focus_changed, w32_detect_focus_change): New functions.
6 (w32_read_socket) [WM_SETFOCUS]: Call w32_detect_focus_change.
7
82005-03-25 Stefan Monnier <monnier@iro.umontreal.ca>
9
10 * minibuf.c (Fminibuffer_complete_and_exit, Fself_insert_and_exit):
11 Use Fexit_minibuffer.
12 (Fexit_minibuffer): Mark it as no-return, deactivate the mark.
13
142005-03-24 Stefan Monnier <monnier@iro.umontreal.ca>
15
16 * dired.c (Ffile_attributes): Add a missing gcpro.
17
18 * alloc.c (make_number): The arg can be bigger than `int'.
19 * lisp.h (make_number): Make prototype more precise.
20
21 * process.c, dired.c (Vfile_name_coding_system)
22 (Vdefault_file_name_coding_system):
23 * callproc.c (Vdoc_file_name, Vfile_name_coding_system)
24 (Vdefault_file_name_coding_system): Remove unused declarations.
25
262005-03-24 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
27
28 * xmenu.c (create_and_show_popup_menu): Just remove menu and return
29 if it failed to pop up (Gnome "show pointer on ctrl" option makes
30 menus fail to pop up).
31
322005-03-24 Stefan Monnier <monnier@iro.umontreal.ca>
33
34 * xdisp.c (get_next_display_element): Also use `\ ' & `\-' for latin-9.
35 Just prepend a backslash without replacing the NBSP by an SPC.
36
12005-03-22 Kim F. Storm <storm@cua.dk> 372005-03-22 Kim F. Storm <storm@cua.dk>
2 38
3 * xfaces.c (lookup_derived_face): Add arg SIGNAL_P. 39 * xfaces.c (lookup_derived_face): Add arg SIGNAL_P.
@@ -17,7 +53,7 @@
172005-03-22 David Kastrup <dak@gnu.org> 532005-03-22 David Kastrup <dak@gnu.org>
18 54
19 * textprop.c (Fnext_char_property_change) 55 * textprop.c (Fnext_char_property_change)
20 (Fprevious_char_property_change): allow marker as limit. 56 (Fprevious_char_property_change): Allow marker as limit.
21 (Fnext_single_char_property_change) 57 (Fnext_single_char_property_change)
22 (Fprevious_single_char_property_change): Check that limit is a 58 (Fprevious_single_char_property_change): Check that limit is a
23 number in strings. 59 number in strings.
@@ -51,8 +87,7 @@
51 87
522005-03-17 Kenichi Handa <handa@m17n.org> 882005-03-17 Kenichi Handa <handa@m17n.org>
53 89
54 * coding.c (syms_of_coding): Docstring of coding-category-list 90 * coding.c (syms_of_coding): Docstring of coding-category-list fixed.
55 fixed.
56 91
572005-03-17 Stefan Monnier <monnier@iro.umontreal.ca> 922005-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
58 93
diff --git a/src/alloc.c b/src/alloc.c
index 093919fee3d..dbb77f77128 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1503,7 +1503,7 @@ mark_interval_tree (tree)
1503#ifndef make_number 1503#ifndef make_number
1504Lisp_Object 1504Lisp_Object
1505make_number (n) 1505make_number (n)
1506 int n; 1506 EMACS_INT n;
1507{ 1507{
1508 Lisp_Object obj; 1508 Lisp_Object obj;
1509 obj.s.val = n; 1509 obj.s.val = n;
diff --git a/src/callproc.c b/src/callproc.c
index e251fc65941..6027ccdda9f 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
5This file is part of GNU Emacs. 5This 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. */
132int synch_process_retcode; 132int synch_process_retcode;
133
134extern Lisp_Object Vdoc_file_name;
135
136extern 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 6a3868b016d..3b6b82aeea4 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -7821,8 +7821,7 @@ associated with each coding-category one by one in this order. When
7821one algorithm agrees with a byte sequence of source text, the coding 7821one algorithm agrees with a byte sequence of source text, the coding
7822system bound to the corresponding coding-category is selected. 7822system bound to the corresponding coding-category is selected.
7823 7823
7824When you modify this variable, `update-coding-systems-internal' must 7824Don't modify this variable directly, but use `set-coding-category'. */);
7825be called. */);
7826 { 7825 {
7827 int i; 7826 int i;
7828 7827
diff --git a/src/dired.c b/src/dired.c
index e833ceb216b..62bf4beb384 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
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -114,7 +114,6 @@ extern void filemodestring P_ ((struct stat *, char *));
114 114
115extern int completion_ignore_case; 115extern int completion_ignore_case;
116extern Lisp_Object Vcompletion_regexp_list; 116extern Lisp_Object Vcompletion_regexp_list;
117extern Lisp_Object Vfile_name_coding_system, Vdefault_file_name_coding_system;
118 117
119Lisp_Object Vcompletion_ignored_extensions; 118Lisp_Object Vcompletion_ignored_extensions;
120Lisp_Object Qcompletion_ignore_case; 119Lisp_Object Qcompletion_ignore_case;
@@ -907,6 +906,7 @@ Elements of the attribute list are:
907#endif 906#endif
908 char modes[10]; 907 char modes[10];
909 Lisp_Object handler; 908 Lisp_Object handler;
909 struct gcpro gcpro1;
910 910
911 filename = Fexpand_file_name (filename, Qnil); 911 filename = Fexpand_file_name (filename, Qnil);
912 912
@@ -922,7 +922,9 @@ Elements of the attribute list are:
922 return call3 (handler, Qfile_attributes, filename, id_format); 922 return call3 (handler, Qfile_attributes, filename, id_format);
923 } 923 }
924 924
925 GCPRO1 (filename);
925 encoded = ENCODE_FILE (filename); 926 encoded = ENCODE_FILE (filename);
927 UNGCPRO;
926 928
927 if (lstat (SDATA (encoded), &s) < 0) 929 if (lstat (SDATA (encoded), &s) < 0)
928 return Qnil; 930 return Qnil;
diff --git a/src/lisp.h b/src/lisp.h
index f677eee0953..f770a29cf4f 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
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -451,7 +451,7 @@ enum pvec_type
451#define make_number(N) \ 451#define make_number(N) \
452 (__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; })) 452 (__extension__ ({ Lisp_Object _l; _l.s.val = (N); _l.s.type = Lisp_Int; _l; }))
453#else 453#else
454extern Lisp_Object make_number (); 454extern Lisp_Object make_number P_ ((EMACS_INT));
455#endif 455#endif
456 456
457#define EQ(x, y) ((x).s.val == (y).s.val && (x).s.type == (y).s.type) 457#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 b45e804feb5..85cee34420c 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
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -2085,6 +2085,8 @@ complete_and_exit_2 (ignore)
2085 return make_number (1); 2085 return make_number (1);
2086} 2086}
2087 2087
2088EXFUN (Fexit_minibuffer, 0) NO_RETURN;
2089
2088DEFUN ("minibuffer-complete-and-exit", Fminibuffer_complete_and_exit, 2090DEFUN ("minibuffer-complete-and-exit", Fminibuffer_complete_and_exit,
2089 Sminibuffer_complete_and_exit, 0, 0, "", 2091 Sminibuffer_complete_and_exit, 0, 0, "",
2090 doc: /* If the minibuffer contents is a valid completion then exit. 2092 doc: /* If the minibuffer contents is a valid completion then exit.
@@ -2147,7 +2149,7 @@ a repetition of this command will exit. */)
2147 return Qnil; 2149 return Qnil;
2148 } 2150 }
2149 exit: 2151 exit:
2150 return Fthrow (Qexit, Qnil); 2152 return Fexit_minibuffer ();
2151 /* NOTREACHED */ 2153 /* NOTREACHED */
2152} 2154}
2153 2155
@@ -2554,14 +2556,21 @@ DEFUN ("self-insert-and-exit", Fself_insert_and_exit, Sself_insert_and_exit, 0,
2554 else 2556 else
2555 bitch_at_user (); 2557 bitch_at_user ();
2556 2558
2557 return Fthrow (Qexit, Qnil); 2559 return Fexit_minibuffer ();
2558} 2560}
2559 2561
2560DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "", 2562DEFUN ("exit-minibuffer", Fexit_minibuffer, Sexit_minibuffer, 0, 0, "",
2561 doc: /* Terminate this minibuffer argument. */) 2563 doc: /* Terminate this minibuffer argument. */)
2562 () 2564 ()
2563{ 2565{
2564 return Fthrow (Qexit, Qnil); 2566 /* If the command that uses this has made modifications in the minibuffer,
2567 we don't want them to cause deactivation of the mark in the original
2568 buffer.
2569 A better solution would be to make deactivate-mark buffer-local
2570 (or to turn it into a list of buffers, ...), but in the mean time,
2571 this should do the trick in most cases. */
2572 Vdeactivate_mark = Qnil;
2573 Fthrow (Qexit, Qnil);
2565} 2574}
2566 2575
2567DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0, 2576DEFUN ("minibuffer-depth", Fminibuffer_depth, Sminibuffer_depth, 0, 0, 0,
diff --git a/src/process.c b/src/process.c
index 9e4122a85b3..c6a9b255243 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
5This file is part of GNU Emacs. 5This 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. */
377static int pty_max_bytes; 377static int pty_max_bytes;
378 378
379extern 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 93eabd9d0ad..403cec7db7e 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -255,6 +255,10 @@ static void frame_highlight P_ ((struct frame *));
255static void frame_unhighlight P_ ((struct frame *)); 255static void frame_unhighlight P_ ((struct frame *));
256static void x_new_focus_frame P_ ((struct w32_display_info *, 256static void x_new_focus_frame P_ ((struct w32_display_info *,
257 struct frame *)); 257 struct frame *));
258static void x_focus_changed P_ ((int, int, struct w32_display_info *,
259 struct frame *, struct input_event *));
260static void w32_detect_focus_change P_ ((struct w32_display_info *,
261 W32Msg *, struct input_event *));
258static void w32_frame_rehighlight P_ ((struct frame *)); 262static void w32_frame_rehighlight P_ ((struct frame *));
259static void x_frame_rehighlight P_ ((struct w32_display_info *)); 263static void x_frame_rehighlight P_ ((struct w32_display_info *));
260static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *)); 264static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
@@ -2816,6 +2820,81 @@ x_new_focus_frame (dpyinfo, frame)
2816 x_frame_rehighlight (dpyinfo); 2820 x_frame_rehighlight (dpyinfo);
2817} 2821}
2818 2822
2823
2824/* Handle FocusIn and FocusOut state changes for FRAME.
2825 If FRAME has focus and there exists more than one frame, puts
2826 a FOCUS_IN_EVENT into *BUFP. */
2827
2828static void
2829x_focus_changed (type, state, dpyinfo, frame, bufp)
2830 int type;
2831 int state;
2832 struct w32_display_info *dpyinfo;
2833 struct frame *frame;
2834 struct input_event *bufp;
2835{
2836 if (type == WM_SETFOCUS)
2837 {
2838 if (dpyinfo->w32_focus_event_frame != frame)
2839 {
2840 x_new_focus_frame (dpyinfo, frame);
2841 dpyinfo->w32_focus_event_frame = frame;
2842
2843 /* Don't stop displaying the initial startup message
2844 for a switch-frame event we don't need. */
2845 if (GC_NILP (Vterminal_frame)
2846 && GC_CONSP (Vframe_list)
2847 && !GC_NILP (XCDR (Vframe_list)))
2848 {
2849 bufp->kind = FOCUS_IN_EVENT;
2850 XSETFRAME (bufp->frame_or_window, frame);
2851 }
2852 }
2853
2854 frame->output_data.x->focus_state |= state;
2855
2856 /* TODO: IME focus? */
2857 }
2858 else if (type == WM_KILLFOCUS)
2859 {
2860 frame->output_data.x->focus_state &= ~state;
2861
2862 if (dpyinfo->w32_focus_event_frame == frame)
2863 {
2864 dpyinfo->w32_focus_event_frame = 0;
2865 x_new_focus_frame (dpyinfo, 0);
2866 }
2867
2868 /* TODO: IME focus? */
2869 }
2870}
2871
2872
2873/* The focus may have changed. Figure out if it is a real focus change,
2874 by checking both FocusIn/Out and Enter/LeaveNotify events.
2875
2876 Returns FOCUS_IN_EVENT event in *BUFP. */
2877
2878static void
2879w32_detect_focus_change (dpyinfo, event, bufp)
2880 struct w32_display_info *dpyinfo;
2881 W32Msg *event;
2882 struct input_event *bufp;
2883{
2884 struct frame *frame;
2885
2886 frame = x_any_window_to_frame (dpyinfo, event->msg.hwnd);
2887 if (! frame)
2888 return;
2889
2890 /* On w32, this is only called from focus events, so no switch needed. */
2891 x_focus_changed (event->msg.message,
2892 (event->msg.message == WM_KILLFOCUS ?
2893 FOCUS_IMPLICIT : FOCUS_EXPLICIT),
2894 dpyinfo, frame, bufp);
2895}
2896
2897
2819/* Handle an event saying the mouse has moved out of an Emacs frame. */ 2898/* Handle an event saying the mouse has moved out of an Emacs frame. */
2820 2899
2821void 2900void
@@ -4660,27 +4739,13 @@ w32_read_socket (sd, expected, hold_quit)
4660 break; 4739 break;
4661 4740
4662 case WM_SETFOCUS: 4741 case WM_SETFOCUS:
4663 /* TODO: Port this change: 4742 w32_detect_focus_change (dpyinfo, &msg, &inev);
4664 2002-06-28 Jan D. <jan.h.d@swipnet.se>
4665 * xterm.h (struct x_output): Add focus_state.
4666 * xterm.c (x_focus_changed): New function.
4667 (x_detect_focus_change): New function.
4668 (XTread_socket): Call x_detect_focus_change for FocusIn/FocusOut
4669 EnterNotify and LeaveNotify to track X focus changes.
4670 */
4671 f = x_any_window_to_frame (dpyinfo, msg.msg.hwnd);
4672
4673 dpyinfo->w32_focus_event_frame = f;
4674
4675 if (f)
4676 x_new_focus_frame (dpyinfo, f);
4677 4743
4678 dpyinfo->grabbed = 0; 4744 dpyinfo->grabbed = 0;
4679 check_visibility = 1; 4745 check_visibility = 1;
4680 break; 4746 break;
4681 4747
4682 case WM_KILLFOCUS: 4748 case WM_KILLFOCUS:
4683 /* TODO: some of this belongs in MOUSE_LEAVE */
4684 f = x_top_window_to_frame (dpyinfo, msg.msg.hwnd); 4749 f = x_top_window_to_frame (dpyinfo, msg.msg.hwnd);
4685 4750
4686 if (f) 4751 if (f)
diff --git a/src/w32term.h b/src/w32term.h
index ca843ddbfb2..db7e6760ee6 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -276,8 +276,25 @@ struct x_output
276{ 276{
277 PIX_TYPE background_pixel; 277 PIX_TYPE background_pixel;
278 PIX_TYPE foreground_pixel; 278 PIX_TYPE foreground_pixel;
279
280 /* Keep track of focus. May be EXPLICIT if we received a FocusIn for this
281 frame, or IMPLICIT if we received an EnterNotify.
282 FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
283 int focus_state;
284
279}; 285};
280 286
287enum
288{
289 /* Values for focus_state, used as bit mask.
290 EXPLICIT means we received a FocusIn for the frame and know it has
291 the focus. IMPLICIT means we recevied an EnterNotify and the frame
292 may have the focus if no window manager is running.
293 FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
294 FOCUS_NONE = 0,
295 FOCUS_IMPLICIT = 1,
296 FOCUS_EXPLICIT = 2
297};
281 298
282struct w32_output 299struct w32_output
283{ 300{
diff --git a/src/xdisp.c b/src/xdisp.c
index 68aeae2aea0..bfb6ba5bf4c 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5071,7 +5071,8 @@ get_next_display_element (it)
5071 && it->len == 1) 5071 && it->len == 1)
5072 || !CHAR_PRINTABLE_P (it->c) 5072 || !CHAR_PRINTABLE_P (it->c)
5073 || (!NILP (Vshow_nonbreak_escape) 5073 || (!NILP (Vshow_nonbreak_escape)
5074 && (it->c == 0x8ad || it->c == 0x8a0))) 5074 && (it->c == 0x8ad || it->c == 0x8a0
5075 || it->c == 0xf2d || it->c == 0xf20)))
5075 : (it->c >= 127 5076 : (it->c >= 127
5076 && (!unibyte_display_via_language_environment 5077 && (!unibyte_display_via_language_environment
5077 || it->c == unibyte_char_to_multibyte (it->c))))) 5078 || it->c == unibyte_char_to_multibyte (it->c)))))
@@ -5138,10 +5139,11 @@ get_next_display_element (it)
5138 it->face_id); 5139 it->face_id);
5139 } 5140 }
5140 5141
5141 if (it->c == 0x8a0 || it->c == 0x8ad) 5142 if (it->c == 0x8a0 || it->c == 0x8ad
5143 || it->c == 0xf20 || it->c == 0xf2d)
5142 { 5144 {
5143 XSETINT (it->ctl_chars[0], escape_glyph); 5145 XSETINT (it->ctl_chars[0], escape_glyph);
5144 g = it->c == 0x8ad ? '-' : ' '; 5146 g = it->c;
5145 XSETINT (it->ctl_chars[1], g); 5147 XSETINT (it->ctl_chars[1], g);
5146 ctl_len = 2; 5148 ctl_len = 2;
5147 goto display_control; 5149 goto display_control;
diff --git a/src/xmenu.c b/src/xmenu.c
index ad41387b4a6..b29b74b6e44 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