aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2006-10-15 02:54:13 +0000
committerMiles Bader2006-10-15 02:54:13 +0000
commitbb9c4b4f8b3dcd1b5fc96d2d0275cc532832fbd6 (patch)
tree8c4ae9640abcb8f33326e96e661f711417e5307c /src
parent5be4d5336db8be316100a5b80ee8c5e428438b9e (diff)
parent92edaeeda5c362acf2c7e7f72b3666ab7673699a (diff)
downloademacs-bb9c4b4f8b3dcd1b5fc96d2d0275cc532832fbd6.tar.gz
emacs-bb9c4b4f8b3dcd1b5fc96d2d0275cc532832fbd6.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 460-475) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 145-152) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-118
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog97
-rw-r--r--src/dispextern.h3
-rw-r--r--src/dispnew.c10
-rw-r--r--src/eval.c4
-rw-r--r--src/frame.c15
-rw-r--r--src/image.c2
-rw-r--r--src/keyboard.c10
-rw-r--r--src/keymap.c16
-rw-r--r--src/lisp.h1
-rw-r--r--src/macterm.c134
-rw-r--r--src/minibuf.c9
-rw-r--r--src/process.c7
-rw-r--r--src/regex.c9
-rw-r--r--src/regex.h12
-rw-r--r--src/search.c23
-rw-r--r--src/sysdep.c10
-rw-r--r--src/w32fns.c7
-rw-r--r--src/xdisp.c45
-rw-r--r--src/xmenu.c3
-rw-r--r--src/xterm.c2
20 files changed, 278 insertions, 141 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 79bfe7fe4eb..8590cb57230 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,91 @@
12006-10-14 Richard Stallman <rms@gnu.org>
2
3 * sysdep.c (init_sys_modes): Delete DEFVAR_LISP in the wrong place.
4
52006-10-13 Chong Yidong <cyd@stupidchicken.com>
6
7 * xdisp.c (decode_mode_spec): Ignore %c and %l constructs in frame
8 title.
9
102006-10-12 Chong Yidong <cyd@stupidchicken.com>
11
12 * keymap.c (Fkey_binding): Check Lisp_Object types before doing
13 XCAR and XINT.
14
152006-10-12 Romain Francoise <romain@orebokech.com>
16
17 * image.c (xbm_read_bitmap_data): Delete extra semicolon.
18
192006-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
20
21 * eval.c: Include xterm.h for x_fully_uncatch_errors and friends.
22
23 * dispextern.h: Declare x_create_bitmap_from_xpm_data.
24
25 * xterm.c (x_check_expected_move): Remove unused var `count'.
26
27 * xmenu.c (syms_of_xmenu): Use Ffset rather than Fdefalias, since
28 Fdefalias is not declared in any *.h file.
29
302006-10-09 Chong Yidong <cyd@stupidchicken.com>
31
32 * dispnew.c (sit_for): Sit forever if TIMEOUT is t.
33
34 * keyboard.c (command_loop_1): Handle non-number values of
35 `minibuffer-message-timeout'.
36 (Fexecute_extended_command): Fix typo.
37
38 * minibuf.c (temp_echo_area_glyphs): Sit for
39 `minibuffer-message-timeout' seconds.
40
412006-10-08 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
42
43 * macterm.c (mac_draw_image_string, mac_draw_image_string_16):
44 Add argument OVERSTRIKE_P.
45 (mac_draw_string_common, mac_draw_image_string_cg): Likewise.
46 Support overstrike.
47 (mac_draw_string, mac_draw_string_16): Remove functions.
48 (x_draw_glyph_string_foreground): Use overstrike when needed.
49 (x_draw_composite_glyph_string_foreground): Likewise.
50 Use mac_draw_image_string_16 instead of mac_draw_string_16.
51 (mac_load_query_font): Rename from XLoadQueryFont. Take argument F
52 instead of DPY. All uses changed. Don't save/restore font.
53
542006-10-07 Ralf Angeli <angeli@caeruleus.net>
55
56 * w32fns.c (w32_createwindow): Honour left and top positions if
57 supplied explicitly.
58
592006-10-06 Kim F. Storm <storm@cua.dk>
60
61 * xdisp.c (pos_visible_p): Fix value when EOB is visible.
62
632006-10-05 Chong Yidong <cyd@stupidchicken.com>
64
65 * frame.c (Qinhibit_face_set_after_frame_default): New var.
66 (syms_of_frame): Initialize it.
67 (x_set_frame_parameters): Avoid resetting :font attributes to the
68 new-frame defaults.
69
702006-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
71
72 * lisp.h (clear_regexp_cache): Declare.
73
74 * search.c (compile_pattern): Only check `cp->syntax_table' if needed.
75 (compile_pattern_1): Remember `used_syntax' in `cp->syntax_table'.
76 (clear_regexp_cache): Only flush those regexps which depend on
77 a syntax-table.
78
79 * regex.c (regex_compile): Set the new `used_syntax' bit.
80
81 * regex.h: Remove file local variables.
82 (struct re_pattern_buffer): New field `used_syntax'.
83
842006-10-03 Kim F. Storm <storm@cua.dk>
85
86 * process.c (list_processes_1): Run sentinels before removing dead
87 processes. Also remove `closed' network connections.
88
12006-10-01 Stefan Monnier <monnier@iro.umontreal.ca> 892006-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
2 90
3 * xdisp.c (handle_fontified_prop): Don't fontify at EOB. 91 * xdisp.c (handle_fontified_prop): Don't fontify at EOB.
@@ -52,8 +140,8 @@
52 140
532006-09-24 Eli Zaretskii <eliz@gnu.org> 1412006-09-24 Eli Zaretskii <eliz@gnu.org>
54 142
55 * makefile.w32-in ($(BLD)/fns.$(O), $(BLD)/w32proc.$(O)): Depend 143 * makefile.w32-in ($(BLD)/fns.$(O), $(BLD)/w32proc.$(O)):
56 on nt/inc/langinfo.h and nt/inc/nl_types.h. 144 Depend on nt/inc/langinfo.h and nt/inc/nl_types.h.
57 145
58 * w32proc.c (nl_langinfo): New function. 146 * w32proc.c (nl_langinfo): New function.
59 147
@@ -235,8 +323,7 @@
235 323
2362006-09-15 David Kastrup <dak@gnu.org> 3242006-09-15 David Kastrup <dak@gnu.org>
237 325
238 * Makefile.in (keymap.o): Add "keymap.h" and "window.h" 326 * Makefile.in (keymap.o): Add "keymap.h" and "window.h" dependencies.
239 dependencies.
240 327
241 * keymap.c: include "window.h". 328 * keymap.c: include "window.h".
242 (Fcommand_remapping): New optional POSITION argument. 329 (Fcommand_remapping): New optional POSITION argument.
@@ -1477,7 +1564,7 @@
1477 (x_set_offset, x_check_fullscreen): Extensive changes to make 1564 (x_set_offset, x_check_fullscreen): Extensive changes to make
1478 frame positioning deterministic under X. 1565 frame positioning deterministic under X.
1479 1566
1480 * xterm.h (x_output): Added members left_before_move and 1567 * xterm.h (x_output): Add members left_before_move and
1481 top_before_move. Removed members expected_left and expected_top. 1568 top_before_move. Removed members expected_left and expected_top.
1482 1569
14832006-06-16 Kim F. Storm <storm@cua.dk> 15702006-06-16 Kim F. Storm <storm@cua.dk>
diff --git a/src/dispextern.h b/src/dispextern.h
index 1f768dd323c..5eb7ee11dea 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2794,6 +2794,9 @@ extern void x_reference_bitmap P_ ((struct frame *, int));
2794extern int x_create_bitmap_from_data P_ ((struct frame *, char *, 2794extern int x_create_bitmap_from_data P_ ((struct frame *, char *,
2795 unsigned int, unsigned int)); 2795 unsigned int, unsigned int));
2796extern int x_create_bitmap_from_file P_ ((struct frame *, Lisp_Object)); 2796extern int x_create_bitmap_from_file P_ ((struct frame *, Lisp_Object));
2797#if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS)
2798extern int x_create_bitmap_from_xpm_data P_ ((struct frame *f, char **bits));
2799#endif
2797#ifndef x_destroy_bitmap 2800#ifndef x_destroy_bitmap
2798extern void x_destroy_bitmap P_ ((struct frame *, int)); 2801extern void x_destroy_bitmap P_ ((struct frame *, int));
2799#endif 2802#endif
diff --git a/src/dispnew.c b/src/dispnew.c
index de8f2c1ad38..516f0b54ce6 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6488,7 +6488,8 @@ Emacs was built without floating point support.
6488/* This is just like wait_reading_process_output, except that 6488/* This is just like wait_reading_process_output, except that
6489 it does redisplay. 6489 it does redisplay.
6490 6490
6491 TIMEOUT is number of seconds to wait (float or integer). 6491 TIMEOUT is number of seconds to wait (float or integer),
6492 or t to wait forever.
6492 READING is 1 if reading input. 6493 READING is 1 if reading input.
6493 If DO_DISPLAY is >0 display process output while waiting. 6494 If DO_DISPLAY is >0 display process output while waiting.
6494 If DO_DISPLAY is >1 perform an initial redisplay before waiting. 6495 If DO_DISPLAY is >1 perform an initial redisplay before waiting.
@@ -6521,10 +6522,15 @@ sit_for (timeout, reading, do_display)
6521 sec = (int) seconds; 6522 sec = (int) seconds;
6522 usec = (int) ((seconds - sec) * 1000000); 6523 usec = (int) ((seconds - sec) * 1000000);
6523 } 6524 }
6525 else if (EQ (timeout, Qt))
6526 {
6527 sec = 0;
6528 usec = 0;
6529 }
6524 else 6530 else
6525 wrong_type_argument (Qnumberp, timeout); 6531 wrong_type_argument (Qnumberp, timeout);
6526 6532
6527 if (sec == 0 && usec == 0) 6533 if (sec == 0 && usec == 0 && !EQ (timeout, Qt))
6528 return Qt; 6534 return Qt;
6529 6535
6530#ifdef SIGIO 6536#ifdef SIGIO
diff --git a/src/eval.c b/src/eval.c
index dbd30eac201..4e04422d2d6 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -28,6 +28,10 @@ Boston, MA 02110-1301, USA. */
28#include "dispextern.h" 28#include "dispextern.h"
29#include <setjmp.h> 29#include <setjmp.h>
30 30
31#if HAVE_X_WINDOWS
32#include "xterm.h"
33#endif
34
31/* This definition is duplicated in alloc.c and keyboard.c */ 35/* This definition is duplicated in alloc.c and keyboard.c */
32/* Putting it in lisp.h makes cc bomb out! */ 36/* Putting it in lisp.h makes cc bomb out! */
33 37
diff --git a/src/frame.c b/src/frame.c
index c57618696eb..f431dc4946d 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -116,6 +116,7 @@ Lisp_Object Qfullscreen, Qfullwidth, Qfullheight, Qfullboth;
116Lisp_Object Qfont_backend; 116Lisp_Object Qfont_backend;
117#endif /* USE_FONT_BACKEND */ 117#endif /* USE_FONT_BACKEND */
118 118
119Lisp_Object Qinhibit_face_set_after_frame_default;
119Lisp_Object Qface_set_after_frame_default; 120Lisp_Object Qface_set_after_frame_default;
120 121
121 122
@@ -2742,12 +2743,20 @@ x_set_frame_parameters (f, alist)
2742 || EQ (prop, Qfullscreen)) 2743 || EQ (prop, Qfullscreen))
2743 { 2744 {
2744 register Lisp_Object param_index, old_value; 2745 register Lisp_Object param_index, old_value;
2746 int count = SPECPDL_INDEX ();
2745 2747
2746 old_value = get_frame_param (f, prop); 2748 old_value = get_frame_param (f, prop);
2747 fullscreen_is_being_set |= EQ (prop, Qfullscreen); 2749 fullscreen_is_being_set |= EQ (prop, Qfullscreen);
2748 2750
2749 if (NILP (Fequal (val, old_value))) 2751 if (NILP (Fequal (val, old_value)))
2750 { 2752 {
2753 /* For :font attributes, the frame_parm_handler
2754 x_set_font calls `face-set-after-frame-default'.
2755 Unless we bind inhibit-face-set-after-frame-default
2756 here, this would reset the :font attribute that we
2757 just applied to the default value for new faces. */
2758 specbind (Qinhibit_face_set_after_frame_default, Qt);
2759
2751 store_frame_param (f, prop, val); 2760 store_frame_param (f, prop, val);
2752 2761
2753 param_index = Fget (prop, Qx_frame_parameter); 2762 param_index = Fget (prop, Qx_frame_parameter);
@@ -2756,6 +2765,8 @@ x_set_frame_parameters (f, alist)
2756 < sizeof (frame_parms)/sizeof (frame_parms[0])) 2765 < sizeof (frame_parms)/sizeof (frame_parms[0]))
2757 && rif->frame_parm_handlers[XINT (param_index)]) 2766 && rif->frame_parm_handlers[XINT (param_index)])
2758 (*(rif->frame_parm_handlers[XINT (param_index)])) (f, val, old_value); 2767 (*(rif->frame_parm_handlers[XINT (param_index)])) (f, val, old_value);
2768
2769 unbind_to (count, Qnil);
2759 } 2770 }
2760 } 2771 }
2761 } 2772 }
@@ -4112,6 +4123,10 @@ syms_of_frame ()
4112 Qface_set_after_frame_default = intern ("face-set-after-frame-default"); 4123 Qface_set_after_frame_default = intern ("face-set-after-frame-default");
4113 staticpro (&Qface_set_after_frame_default); 4124 staticpro (&Qface_set_after_frame_default);
4114 4125
4126 Qinhibit_face_set_after_frame_default
4127 = intern ("inhibit-face-set-after-frame-default");
4128 staticpro (&Qinhibit_face_set_after_frame_default);
4129
4115 Qfullwidth = intern ("fullwidth"); 4130 Qfullwidth = intern ("fullwidth");
4116 staticpro (&Qfullwidth); 4131 staticpro (&Qfullwidth);
4117 Qfullheight = intern ("fullheight"); 4132 Qfullheight = intern ("fullheight");
diff --git a/src/image.c b/src/image.c
index dac896137c3..30c01702d85 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3151,7 +3151,7 @@ xbm_read_bitmap_data (f, contents, end, width, height, data)
3151 expect_ident ("define"); 3151 expect_ident ("define");
3152 expect (XBM_TK_IDENT); 3152 expect (XBM_TK_IDENT);
3153 3153
3154 if (LA1 == XBM_TK_NUMBER); 3154 if (LA1 == XBM_TK_NUMBER)
3155 { 3155 {
3156 char *p = strrchr (buffer, '_'); 3156 char *p = strrchr (buffer, '_');
3157 p = p ? p + 1 : buffer; 3157 p = p ? p + 1 : buffer;
diff --git a/src/keyboard.c b/src/keyboard.c
index 786b3d9b556..61539a384fd 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1546,15 +1546,17 @@ command_loop_1 ()
1546 1546
1547 if (minibuf_level 1547 if (minibuf_level
1548 && !NILP (echo_area_buffer[0]) 1548 && !NILP (echo_area_buffer[0])
1549 && EQ (minibuf_window, echo_area_window) 1549 && EQ (minibuf_window, echo_area_window))
1550 && NUMBERP (Vminibuffer_message_timeout))
1551 { 1550 {
1552 /* Bind inhibit-quit to t so that C-g gets read in 1551 /* Bind inhibit-quit to t so that C-g gets read in
1553 rather than quitting back to the minibuffer. */ 1552 rather than quitting back to the minibuffer. */
1554 int count = SPECPDL_INDEX (); 1553 int count = SPECPDL_INDEX ();
1555 specbind (Qinhibit_quit, Qt); 1554 specbind (Qinhibit_quit, Qt);
1556 1555
1557 sit_for (Vminibuffer_message_timeout, 0, 2); 1556 if (NUMBERP (Vminibuffer_message_timeout))
1557 sit_for (Vminibuffer_message_timeout, 0, 2);
1558 else
1559 sit_for (Qt, 0, 2);
1558 1560
1559 /* Clear the echo area. */ 1561 /* Clear the echo area. */
1560 message2 (0, 0, 0); 1562 message2 (0, 0, 0);
@@ -9981,7 +9983,7 @@ give to the command you invoke, if it asks for an argument. */)
9981 if (NILP (echo_area_buffer[0])) 9983 if (NILP (echo_area_buffer[0]))
9982 waited = sit_for (make_number (0), 0, 2); 9984 waited = sit_for (make_number (0), 0, 2);
9983 else if (NUMBERP (Vsuggest_key_bindings)) 9985 else if (NUMBERP (Vsuggest_key_bindings))
9984 waited = sit_for (Vminibuffer_message_timeout, 0, 2); 9986 waited = sit_for (Vsuggest_key_bindings, 0, 2);
9985 else 9987 else
9986 waited = sit_for (make_number (2), 0, 2); 9988 waited = sit_for (make_number (2), 0, 2);
9987 9989
diff --git a/src/keymap.c b/src/keymap.c
index 237bc0db9df..f67cc109e87 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1643,13 +1643,12 @@ specified buffer position instead of point are used.
1643 1643
1644 /* We are not interested in locations without event data */ 1644 /* We are not interested in locations without event data */
1645 1645
1646 if (EVENT_HAS_PARAMETERS (event)) { 1646 if (EVENT_HAS_PARAMETERS (event))
1647 Lisp_Object kind; 1647 {
1648 1648 Lisp_Object kind = EVENT_HEAD_KIND (EVENT_HEAD (event));
1649 kind = EVENT_HEAD_KIND (EVENT_HEAD (event)); 1649 if (CONSP (XCDR (event)) && EQ (kind, Qmouse_click))
1650 if (EQ (kind, Qmouse_click)) 1650 position = EVENT_START (event);
1651 position = EVENT_START (event); 1651 }
1652 }
1653 } 1652 }
1654 1653
1655 /* Key sequences beginning with mouse clicks 1654 /* Key sequences beginning with mouse clicks
@@ -1742,7 +1741,8 @@ specified buffer position instead of point are used.
1742 1741
1743 pos = XCDR (string); 1742 pos = XCDR (string);
1744 string = XCAR (string); 1743 string = XCAR (string);
1745 if (XINT (pos) >= 0 1744 if (INTEGERP (pos)
1745 && XINT (pos) >= 0
1746 && XINT (pos) < SCHARS (string)) 1746 && XINT (pos) < SCHARS (string))
1747 { 1747 {
1748 map = Fget_text_property (pos, Qlocal_map, string); 1748 map = Fget_text_property (pos, Qlocal_map, string);
diff --git a/src/lisp.h b/src/lisp.h
index 4421dfedf95..787eface0ee 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2957,6 +2957,7 @@ extern int find_next_newline P_ ((int, int));
2957extern int find_next_newline_no_quit P_ ((int, int)); 2957extern int find_next_newline_no_quit P_ ((int, int));
2958extern int find_before_next_newline P_ ((int, int, int)); 2958extern int find_before_next_newline P_ ((int, int, int));
2959extern void syms_of_search P_ ((void)); 2959extern void syms_of_search P_ ((void));
2960extern void clear_regexp_cache P_ ((void));
2960 2961
2961/* defined in minibuf.c */ 2962/* defined in minibuf.c */
2962 2963
diff --git a/src/macterm.c b/src/macterm.c
index 719b703a77c..126fe513533 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -893,12 +893,13 @@ mac_invert_rectangle (f, x, y, width, height)
893 893
894 894
895static void 895static void
896mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char) 896mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width,
897 overstrike_p, bytes_per_char)
897 struct frame *f; 898 struct frame *f;
898 GC gc; 899 GC gc;
899 int x, y; 900 int x, y;
900 char *buf; 901 char *buf;
901 int nchars, bg_width, bytes_per_char; 902 int nchars, bg_width, overstrike_p, bytes_per_char;
902{ 903{
903 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 904 SetPortWindowPort (FRAME_MAC_WINDOW (f));
904 905
@@ -948,6 +949,13 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
948 ATSUDrawText (text_layout, 949 ATSUDrawText (text_layout,
949 kATSUFromTextBeginning, kATSUToTextEnd, 950 kATSUFromTextBeginning, kATSUToTextEnd,
950 kATSUUseGrafPortPenLoc, kATSUUseGrafPortPenLoc); 951 kATSUUseGrafPortPenLoc, kATSUUseGrafPortPenLoc);
952 if (overstrike_p)
953 {
954 MoveTo (x + 1, y);
955 ATSUDrawText (text_layout,
956 kATSUFromTextBeginning, kATSUToTextEnd,
957 kATSUUseGrafPortPenLoc, kATSUUseGrafPortPenLoc);
958 }
951 mac_end_clip (gc); 959 mac_end_clip (gc);
952#ifdef MAC_OSX 960#ifdef MAC_OSX
953 } 961 }
@@ -991,9 +999,15 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
991 sizeof (tags) / sizeof (tags[0]), 999 sizeof (tags) / sizeof (tags[0]),
992 tags, sizes, values); 1000 tags, sizes, values);
993 if (err == noErr) 1001 if (err == noErr)
994 ATSUDrawText (text_layout, 1002 {
995 kATSUFromTextBeginning, kATSUToTextEnd, 1003 ATSUDrawText (text_layout,
996 Long2Fix (x), Long2Fix (port_height - y)); 1004 kATSUFromTextBeginning, kATSUToTextEnd,
1005 Long2Fix (x), Long2Fix (port_height - y));
1006 if (overstrike_p)
1007 ATSUDrawText (text_layout,
1008 kATSUFromTextBeginning, kATSUToTextEnd,
1009 Long2Fix (x + 1), Long2Fix (port_height - y));
1010 }
997#if USE_CG_DRAWING 1011#if USE_CG_DRAWING
998 mac_end_cg_clip (f); 1012 mac_end_cg_clip (f);
999 context = NULL; 1013 context = NULL;
@@ -1059,6 +1073,12 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
1059 TextFace (GC_FONT (gc)->mac_fontface); 1073 TextFace (GC_FONT (gc)->mac_fontface);
1060 MoveTo (x, y); 1074 MoveTo (x, y);
1061 DrawText (buf, 0, nchars * bytes_per_char); 1075 DrawText (buf, 0, nchars * bytes_per_char);
1076 if (overstrike_p)
1077 {
1078 TextMode (srcOr);
1079 MoveTo (x + 1, y);
1080 DrawText (buf, 0, nchars * bytes_per_char);
1081 }
1062 if (bg_width) 1082 if (bg_width)
1063 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); 1083 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
1064 mac_end_clip (gc); 1084 mac_end_clip (gc);
@@ -1071,59 +1091,33 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
1071} 1091}
1072 1092
1073 1093
1074/* Mac replacement for XDrawString. */
1075
1076static void
1077mac_draw_string (f, gc, x, y, buf, nchars)
1078 struct frame *f;
1079 GC gc;
1080 int x, y;
1081 char *buf;
1082 int nchars;
1083{
1084 mac_draw_string_common (f, gc, x, y, buf, nchars, 0, 1);
1085}
1086
1087
1088/* Mac replacement for XDrawString16. */
1089
1090static void
1091mac_draw_string_16 (f, gc, x, y, buf, nchars)
1092 struct frame *f;
1093 GC gc;
1094 int x, y;
1095 XChar2b *buf;
1096 int nchars;
1097{
1098 mac_draw_string_common (f, gc, x, y, (char *) buf, nchars, 0, 2);
1099}
1100
1101
1102/* Mac replacement for XDrawImageString. */ 1094/* Mac replacement for XDrawImageString. */
1103 1095
1104static void 1096static void
1105mac_draw_image_string (f, gc, x, y, buf, nchars, bg_width) 1097mac_draw_image_string (f, gc, x, y, buf, nchars, bg_width, overstrike_p)
1106 struct frame *f; 1098 struct frame *f;
1107 GC gc; 1099 GC gc;
1108 int x, y; 1100 int x, y;
1109 char *buf; 1101 char *buf;
1110 int nchars, bg_width; 1102 int nchars, bg_width, overstrike_p;
1111{ 1103{
1112 mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, 1); 1104 mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width,
1105 overstrike_p, 1);
1113} 1106}
1114 1107
1115 1108
1116/* Mac replacement for XDrawString16. */ 1109/* Mac replacement for XDrawImageString16. */
1117 1110
1118static void 1111static void
1119mac_draw_image_string_16 (f, gc, x, y, buf, nchars, bg_width) 1112mac_draw_image_string_16 (f, gc, x, y, buf, nchars, bg_width, overstrike_p)
1120 struct frame *f; 1113 struct frame *f;
1121 GC gc; 1114 GC gc;
1122 int x, y; 1115 int x, y;
1123 XChar2b *buf; 1116 XChar2b *buf;
1124 int nchars, bg_width; 1117 int nchars, bg_width, overstrike_p;
1125{ 1118{
1126 mac_draw_string_common (f, gc, x, y, (char *) buf, nchars, bg_width, 2); 1119 mac_draw_string_common (f, gc, x, y, (char *) buf, nchars, bg_width,
1120 overstrike_p, 2);
1127} 1121}
1128 1122
1129 1123
@@ -1297,12 +1291,12 @@ init_cg_text_anti_aliasing_threshold ()
1297} 1291}
1298 1292
1299static int 1293static int
1300mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width) 1294mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width, overstrike_p)
1301 struct frame *f; 1295 struct frame *f;
1302 GC gc; 1296 GC gc;
1303 int x, y; 1297 int x, y;
1304 XChar2b *buf; 1298 XChar2b *buf;
1305 int nchars, bg_width; 1299 int nchars, bg_width, overstrike_p;
1306{ 1300{
1307 CGrafPtr port; 1301 CGrafPtr port;
1308 float port_height, gx, gy; 1302 float port_height, gx, gy;
@@ -1364,10 +1358,17 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width)
1364#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 1358#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
1365 CGContextSetTextPosition (context, gx, gy); 1359 CGContextSetTextPosition (context, gx, gy);
1366 CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars); 1360 CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
1361 if (overstrike_p)
1362 {
1363 CGContextSetTextPosition (context, gx + 1.0f, gy);
1364 CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
1365 }
1367#else 1366#else
1368 for (i = 0; i < nchars; i++) 1367 for (i = 0; i < nchars; i++)
1369 { 1368 {
1370 CGContextShowGlyphsAtPoint (context, gx, gy, glyphs + i, 1); 1369 CGContextShowGlyphsAtPoint (context, gx, gy, glyphs + i, 1);
1370 if (overstrike_p)
1371 CGContextShowGlyphsAtPoint (context, gx + 1.0f, gy, glyphs + i, 1);
1371 gx += advances[i].width; 1372 gx += advances[i].width;
1372 } 1373 }
1373#endif 1374#endif
@@ -2773,15 +2774,18 @@ x_draw_glyph_string_foreground (s)
2773#if USE_CG_TEXT_DRAWING 2774#if USE_CG_TEXT_DRAWING
2774 if (!s->two_byte_p 2775 if (!s->two_byte_p
2775 && mac_draw_image_string_cg (s->f, s->gc, x, s->ybase - boff, 2776 && mac_draw_image_string_cg (s->f, s->gc, x, s->ybase - boff,
2776 s->char2b, s->nchars, bg_width)) 2777 s->char2b, s->nchars, bg_width,
2778 s->face->overstrike))
2777 ; 2779 ;
2778 else 2780 else
2779#endif 2781#endif
2780 mac_draw_image_string_16 (s->f, s->gc, x, s->ybase - boff, 2782 mac_draw_image_string_16 (s->f, s->gc, x, s->ybase - boff,
2781 s->char2b, s->nchars, bg_width); 2783 s->char2b, s->nchars, bg_width,
2784 s->face->overstrike);
2782 else 2785 else
2783 mac_draw_image_string (s->f, s->gc, x, s->ybase - boff, 2786 mac_draw_image_string (s->f, s->gc, x, s->ybase - boff,
2784 char1b, s->nchars, bg_width); 2787 char1b, s->nchars, bg_width,
2788 s->face->overstrike);
2785 } 2789 }
2786} 2790}
2787 2791
@@ -2817,10 +2821,10 @@ x_draw_composite_glyph_string_foreground (s)
2817 else 2821 else
2818 { 2822 {
2819 for (i = 0; i < s->nchars; i++, ++s->gidx) 2823 for (i = 0; i < s->nchars; i++, ++s->gidx)
2820 mac_draw_string_16 (s->f, s->gc, 2824 mac_draw_image_string_16 (s->f, s->gc,
2821 x + s->cmp->offsets[s->gidx * 2], 2825 x + s->cmp->offsets[s->gidx * 2],
2822 s->ybase - s->cmp->offsets[s->gidx * 2 + 1], 2826 s->ybase - s->cmp->offsets[s->gidx * 2 + 1],
2823 s->char2b + i, 1); 2827 s->char2b + i, 1, 0, s->face->overstrike);
2824 } 2828 }
2825} 2829}
2826 2830
@@ -7801,14 +7805,16 @@ is_fully_specified_xlfd (char *p)
7801} 7805}
7802 7806
7803 7807
7804/* XLoadQueryFont creates and returns an internal representation for a 7808/* mac_load_query_font creates and returns an internal representation
7805 font in a MacFontStruct struct. There is really no concept 7809 for a font in a MacFontStruct struct. There is really no concept
7806 corresponding to "loading" a font on the Mac. But we check its 7810 corresponding to "loading" a font on the Mac. But we check its
7807 existence and find the font number and all other information for it 7811 existence and find the font number and all other information for it
7808 and store them in the returned MacFontStruct. */ 7812 and store them in the returned MacFontStruct. */
7809 7813
7810static MacFontStruct * 7814static MacFontStruct *
7811XLoadQueryFont (Display *dpy, char *fontname) 7815mac_load_query_font (f, fontname)
7816 struct frame *f;
7817 char *fontname;
7812{ 7818{
7813 int size; 7819 int size;
7814 char *name; 7820 char *name;
@@ -8019,26 +8025,13 @@ XLoadQueryFont (Display *dpy, char *fontname)
8019 else 8025 else
8020#endif 8026#endif
8021 { 8027 {
8022 GrafPtr port;
8023 SInt16 old_fontnum, old_fontsize;
8024 Style old_fontface;
8025 FontInfo the_fontinfo; 8028 FontInfo the_fontinfo;
8026 int is_two_byte_font; 8029 int is_two_byte_font;
8027 8030
8028#if USE_CG_DRAWING 8031#if USE_CG_DRAWING
8029 mac_prepare_for_quickdraw (NULL); 8032 mac_prepare_for_quickdraw (f);
8030#endif
8031 /* Save the current font number used. */
8032 GetPort (&port);
8033#if TARGET_API_MAC_CARBON
8034 old_fontnum = GetPortTextFont (port);
8035 old_fontsize = GetPortTextSize (port);
8036 old_fontface = GetPortTextFace (port);
8037#else
8038 old_fontnum = port->txFont;
8039 old_fontsize = port->txSize;
8040 old_fontface = port->txFace;
8041#endif 8033#endif
8034 SetPortWindowPort (FRAME_MAC_WINDOW (f));
8042 8035
8043 TextFont (fontnum); 8036 TextFont (fontnum);
8044 TextSize (size); 8037 TextSize (size);
@@ -8120,11 +8113,6 @@ XLoadQueryFont (Display *dpy, char *fontname)
8120 for (c = 0x21, pcm = space_bounds + 1; c <= 0xff; c++, pcm++) 8113 for (c = 0x21, pcm = space_bounds + 1; c <= 0xff; c++, pcm++)
8121 mac_query_char_extents (NULL, c, NULL, NULL, pcm, NULL); 8114 mac_query_char_extents (NULL, c, NULL, NULL, pcm, NULL);
8122 } 8115 }
8123
8124 /* Restore previous font number, size and face. */
8125 TextFont (old_fontnum);
8126 TextSize (old_fontsize);
8127 TextFace (old_fontface);
8128 } 8116 }
8129 8117
8130 if (space_bounds) 8118 if (space_bounds)
@@ -8264,7 +8252,7 @@ x_load_font (f, fontname, size)
8264 fontname = (char *) SDATA (XCAR (font_names)); 8252 fontname = (char *) SDATA (XCAR (font_names));
8265 8253
8266 BLOCK_INPUT; 8254 BLOCK_INPUT;
8267 font = (MacFontStruct *) XLoadQueryFont (FRAME_MAC_DISPLAY (f), fontname); 8255 font = mac_load_query_font (f, fontname);
8268 UNBLOCK_INPUT; 8256 UNBLOCK_INPUT;
8269 if (!font) 8257 if (!font)
8270 return NULL; 8258 return NULL;
diff --git a/src/minibuf.c b/src/minibuf.c
index 9505c22d39e..a61d61221a6 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -2683,6 +2683,8 @@ If no minibuffer is active, return nil. */)
2683 that has no possible completions, and other quick, unobtrusive 2683 that has no possible completions, and other quick, unobtrusive
2684 messages. */ 2684 messages. */
2685 2685
2686extern Lisp_Object Vminibuffer_message_timeout;
2687
2686void 2688void
2687temp_echo_area_glyphs (string) 2689temp_echo_area_glyphs (string)
2688 Lisp_Object string; 2690 Lisp_Object string;
@@ -2701,7 +2703,12 @@ temp_echo_area_glyphs (string)
2701 insert_from_string (string, 0, 0, SCHARS (string), SBYTES (string), 0); 2703 insert_from_string (string, 0, 0, SCHARS (string), SBYTES (string), 0);
2702 SET_PT_BOTH (opoint, opoint_byte); 2704 SET_PT_BOTH (opoint, opoint_byte);
2703 Vinhibit_quit = Qt; 2705 Vinhibit_quit = Qt;
2704 sit_for (make_number (2), 0, 2); 2706
2707 if (NUMBERP (Vminibuffer_message_timeout))
2708 sit_for (Vminibuffer_message_timeout, 0, 2);
2709 else
2710 sit_for (Qt, 0, 2);
2711
2705 del_range_both (osize, osize_byte, ZV, ZV_BYTE, 1); 2712 del_range_both (osize, osize_byte, ZV, ZV_BYTE, 1);
2706 SET_PT_BOTH (opoint, opoint_byte); 2713 SET_PT_BOTH (opoint, opoint_byte);
2707 if (!NILP (Vquit_flag)) 2714 if (!NILP (Vquit_flag))
diff --git a/src/process.c b/src/process.c
index c3bbb33509d..4497c1d38c0 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1313,6 +1313,7 @@ list_processes_1 (query_only)
1313 register struct Lisp_Process *p; 1313 register struct Lisp_Process *p;
1314 char tembuf[300]; 1314 char tembuf[300];
1315 int w_proc, w_buffer, w_tty; 1315 int w_proc, w_buffer, w_tty;
1316 int exited = 0;
1316 Lisp_Object i_status, i_buffer, i_tty, i_command; 1317 Lisp_Object i_status, i_buffer, i_tty, i_command;
1317 1318
1318 w_proc = 4; /* Proc */ 1319 w_proc = 4; /* Proc */
@@ -1439,8 +1440,8 @@ list_processes_1 (query_only)
1439 } 1440 }
1440 } 1441 }
1441 1442
1442 if (EQ (symbol, Qsignal) || EQ (symbol, Qexit)) 1443 if (EQ (symbol, Qsignal) || EQ (symbol, Qexit) || EQ (symbol, Qclosed))
1443 remove_process (proc); 1444 exited++;
1444 1445
1445 Findent_to (i_buffer, minspace); 1446 Findent_to (i_buffer, minspace);
1446 if (NILP (p->buffer)) 1447 if (NILP (p->buffer))
@@ -1504,6 +1505,8 @@ list_processes_1 (query_only)
1504 insert_string ("\n"); 1505 insert_string ("\n");
1505 } 1506 }
1506 } 1507 }
1508 if (exited)
1509 status_notify (NULL);
1507 return Qnil; 1510 return Qnil;
1508} 1511}
1509 1512
diff --git a/src/regex.c b/src/regex.c
index 09776848220..2eca58c23e8 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -2589,6 +2589,7 @@ regex_compile (pattern, size, syntax, bufp)
2589 bufp->syntax = syntax; 2589 bufp->syntax = syntax;
2590 bufp->fastmap_accurate = 0; 2590 bufp->fastmap_accurate = 0;
2591 bufp->not_bol = bufp->not_eol = 0; 2591 bufp->not_bol = bufp->not_eol = 0;
2592 bufp->used_syntax = 0;
2592 2593
2593 /* Set `used' to zero, so that if we return an error, the pattern 2594 /* Set `used' to zero, so that if we return an error, the pattern
2594 printer (for debugging) will think there's no pattern. We reset it 2595 printer (for debugging) will think there's no pattern. We reset it
@@ -3014,6 +3015,14 @@ regex_compile (pattern, size, syntax, bufp)
3014 } 3015 }
3015 } 3016 }
3016 3017
3018 /* In most cases the matching rule for char classes
3019 only uses the syntax table for multibyte chars,
3020 so that the content of the syntax-table it is not
3021 hardcoded in the range_table. SPACE and WORD are
3022 the two exceptions. */
3023 if ((1 << cc) & ((1 << RECC_SPACE) | (1 << RECC_WORD)))
3024 bufp->used_syntax = 1;
3025
3017 /* Repeat the loop. */ 3026 /* Repeat the loop. */
3018 continue; 3027 continue;
3019 } 3028 }
diff --git a/src/regex.h b/src/regex.h
index efae7749f31..e065c597d49 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -392,6 +392,10 @@ struct re_pattern_buffer
392 /* Similarly for an end-of-line anchor. */ 392 /* Similarly for an end-of-line anchor. */
393 unsigned not_eol : 1; 393 unsigned not_eol : 1;
394 394
395 /* If true, the compilation of the pattern had to look up the syntax table,
396 so the compiled pattern is only valid for the current syntax table. */
397 unsigned used_syntax : 1;
398
395#ifdef emacs 399#ifdef emacs
396 /* If true, multi-byte form in the regexp pattern should be 400 /* If true, multi-byte form in the regexp pattern should be
397 recognized as a multibyte character. When the pattern is 401 recognized as a multibyte character. When the pattern is
@@ -620,13 +624,5 @@ extern void re_set_whitespace_regexp (const char *regexp);
620 624
621#endif /* regex.h */ 625#endif /* regex.h */
622 626
623/*
624Local variables:
625make-backup-files: t
626version-control: t
627trim-versions-without-asking: nil
628End:
629*/
630
631/* arch-tag: bda6e3ec-3c02-4237-a55a-01ad2e120083 627/* arch-tag: bda6e3ec-3c02-4237-a55a-01ad2e120083
632 (do not change this comment) */ 628 (do not change this comment) */
diff --git a/src/search.c b/src/search.c
index 5f3f953595b..7c1090aa2bf 100644
--- a/src/search.c
+++ b/src/search.c
@@ -43,7 +43,8 @@ struct regexp_cache
43 struct regexp_cache *next; 43 struct regexp_cache *next;
44 Lisp_Object regexp, whitespace_regexp; 44 Lisp_Object regexp, whitespace_regexp;
45 /* Syntax table for which the regexp applies. We need this because 45 /* Syntax table for which the regexp applies. We need this because
46 of character classes. */ 46 of character classes. If this is t, then the compiled pattern is valid
47 for any syntax-table. */
47 Lisp_Object syntax_table; 48 Lisp_Object syntax_table;
48 struct re_pattern_buffer buf; 49 struct re_pattern_buffer buf;
49 char fastmap[0400]; 50 char fastmap[0400];
@@ -137,7 +138,6 @@ compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte)
137 cp->buf.multibyte = STRING_MULTIBYTE (pattern); 138 cp->buf.multibyte = STRING_MULTIBYTE (pattern);
138 cp->buf.target_multibyte = multibyte; 139 cp->buf.target_multibyte = multibyte;
139 cp->whitespace_regexp = Vsearch_spaces_regexp; 140 cp->whitespace_regexp = Vsearch_spaces_regexp;
140 cp->syntax_table = current_buffer->syntax_table;
141 /* rms: I think BLOCK_INPUT is not needed here any more, 141 /* rms: I think BLOCK_INPUT is not needed here any more,
142 because regex.c defines malloc to call xmalloc. 142 because regex.c defines malloc to call xmalloc.
143 Using BLOCK_INPUT here means the debugger won't run if an error occurs. 143 Using BLOCK_INPUT here means the debugger won't run if an error occurs.
@@ -151,6 +151,10 @@ compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte)
151 val = (char *) re_compile_pattern ((char *) SDATA (pattern), 151 val = (char *) re_compile_pattern ((char *) SDATA (pattern),
152 SBYTES (pattern), &cp->buf); 152 SBYTES (pattern), &cp->buf);
153 153
154 /* If the compiled pattern hard codes some of the contents of the
155 syntax-table, it can only be reused with *this* syntax table. */
156 cp->syntax_table = cp->buf.used_syntax ? current_buffer->syntax_table : Qt;
157
154 re_set_whitespace_regexp (NULL); 158 re_set_whitespace_regexp (NULL);
155 159
156 re_set_syntax (old); 160 re_set_syntax (old);
@@ -178,7 +182,8 @@ shrink_regexp_cache ()
178 } 182 }
179} 183}
180 184
181/* Clear the regexp cache. 185/* Clear the regexp cache w.r.t. a particular syntax table,
186 because it was changed.
182 There is no danger of memory leak here because re_compile_pattern 187 There is no danger of memory leak here because re_compile_pattern
183 automagically manages the memory in each re_pattern_buffer struct, 188 automagically manages the memory in each re_pattern_buffer struct,
184 based on its `allocated' and `buffer' values. */ 189 based on its `allocated' and `buffer' values. */
@@ -188,7 +193,11 @@ clear_regexp_cache ()
188 int i; 193 int i;
189 194
190 for (i = 0; i < REGEXP_CACHE_SIZE; ++i) 195 for (i = 0; i < REGEXP_CACHE_SIZE; ++i)
191 searchbufs[i].regexp = Qnil; 196 /* It's tempting to compare with the syntax-table we've actually changd,
197 but it's not sufficient because char-table inheritance mewans that
198 modifying one syntax-table can change others at the same time. */
199 if (!EQ (searchbufs[i].syntax_table, Qt))
200 searchbufs[i].regexp = Qnil;
192} 201}
193 202
194/* Compile a regexp if necessary, but first check to see if there's one in 203/* Compile a regexp if necessary, but first check to see if there's one in
@@ -227,10 +236,8 @@ compile_pattern (pattern, regp, translate, posix, multibyte)
227 && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0))) 236 && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0)))
228 && cp->posix == posix 237 && cp->posix == posix
229 && cp->buf.target_multibyte == multibyte 238 && cp->buf.target_multibyte == multibyte
230 /* TODO: Strictly speaking, we only need to match syntax 239 && (EQ (cp->syntax_table, Qt)
231 tables when a character class like [[:space:]] occurs in 240 || EQ (cp->syntax_table, current_buffer->syntax_table))
232 the pattern. -- cyd*/
233 && EQ (cp->syntax_table, current_buffer->syntax_table)
234 && !NILP (Fequal (cp->whitespace_regexp, Vsearch_spaces_regexp))) 241 && !NILP (Fequal (cp->whitespace_regexp, Vsearch_spaces_regexp)))
235 break; 242 break;
236 243
diff --git a/src/sysdep.c b/src/sysdep.c
index 307f69290d6..3fd134e476d 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1373,16 +1373,6 @@ init_sys_modes ()
1373{ 1373{
1374 struct emacs_tty tty; 1374 struct emacs_tty tty;
1375 1375
1376#ifdef MAC_OS8
1377/* cus-start.el complains if delete-exited-processes is not defined */
1378#ifndef subprocesses
1379 DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes,
1380 doc: /* *Non-nil means delete processes immediately when they exit.
1381nil means don't delete them until `list-processes' is run. */);
1382 delete_exited_processes = 0;
1383#endif
1384#endif /* MAC_OS8 */
1385
1386#ifdef VMS 1376#ifdef VMS
1387#if 0 1377#if 0
1388 static int oob_chars[2] = {0, 1 << 7}; /* catch C-g's */ 1378 static int oob_chars[2] = {0, 1 << 7}; /* catch C-g's */
diff --git a/src/w32fns.c b/src/w32fns.c
index f2e456b85bf..1381662c99c 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2109,7 +2109,12 @@ w32_createwindow (f)
2109 } 2109 }
2110 } 2110 }
2111 2111
2112 if (EQ (left, Qunbound) && EQ (top, Qunbound)) 2112 if (f->size_hint_flags & USPosition || f->size_hint_flags & PPosition)
2113 {
2114 XSETINT (left, f->left_pos);
2115 XSETINT (top, f->top_pos);
2116 }
2117 else if (EQ (left, Qunbound) && EQ (top, Qunbound))
2113 { 2118 {
2114 /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero 2119 /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero
2115 for anything that is not a number and is not Qunbound. */ 2120 for anything that is not a number and is not Qunbound. */
diff --git a/src/xdisp.c b/src/xdisp.c
index 7ca259e2b10..fb30722d8b8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1355,7 +1355,8 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos)
1355 it2 = it; 1355 it2 = it;
1356 if (IT_CHARPOS (it) < ZV && FETCH_BYTE (IT_BYTEPOS (it)) != '\n') 1356 if (IT_CHARPOS (it) < ZV && FETCH_BYTE (IT_BYTEPOS (it)) != '\n')
1357 move_it_by_lines (&it, 1, 0); 1357 move_it_by_lines (&it, 1, 0);
1358 if (charpos < IT_CHARPOS (it)) 1358 if (charpos < IT_CHARPOS (it)
1359 || (it.what == IT_EOB && charpos == IT_CHARPOS (it)))
1359 { 1360 {
1360 visible_p = 1; 1361 visible_p = 1;
1361 move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS); 1362 move_it_to (&it2, charpos, -1, -1, -1, MOVE_TO_POS);
@@ -17823,12 +17824,20 @@ decode_mode_spec (w, c, field_width, precision, multibyte)
17823 break; 17824 break;
17824 17825
17825 case 'c': 17826 case 'c':
17826 { 17827 /* %c and %l are ignored in `frame-title-format'.
17827 int col = (int) current_column (); /* iftc */ 17828 (In redisplay_internal, the frame title is drawn _before_ the
17828 w->column_number_displayed = make_number (col); 17829 windows are updated, so the stuff which depends on actual
17829 pint2str (decode_mode_spec_buf, field_width, col); 17830 window contents (such as %l) may fail to render properly, or
17830 return decode_mode_spec_buf; 17831 even crash emacs.) */
17831 } 17832 if (mode_line_target == MODE_LINE_TITLE)
17833 return "";
17834 else
17835 {
17836 int col = (int) current_column (); /* iftc */
17837 w->column_number_displayed = make_number (col);
17838 pint2str (decode_mode_spec_buf, field_width, col);
17839 return decode_mode_spec_buf;
17840 }
17832 17841
17833 case 'e': 17842 case 'e':
17834#ifndef SYSTEM_MALLOC 17843#ifndef SYSTEM_MALLOC
@@ -17870,11 +17879,16 @@ decode_mode_spec (w, c, field_width, precision, multibyte)
17870 17879
17871 case 'l': 17880 case 'l':
17872 { 17881 {
17873 int startpos = XMARKER (w->start)->charpos; 17882 int startpos, startpos_byte, line, linepos, linepos_byte;
17874 int startpos_byte = marker_byte_position (w->start); 17883 int topline, nlines, junk, height;
17875 int line, linepos, linepos_byte, topline; 17884
17876 int nlines, junk; 17885 /* %c and %l are ignored in `frame-title-format'. */
17877 int height = WINDOW_TOTAL_LINES (w); 17886 if (mode_line_target == MODE_LINE_TITLE)
17887 return "";
17888
17889 startpos = XMARKER (w->start)->charpos;
17890 startpos_byte = marker_byte_position (w->start);
17891 height = WINDOW_TOTAL_LINES (w);
17878 17892
17879 /* If we decided that this buffer isn't suitable for line numbers, 17893 /* If we decided that this buffer isn't suitable for line numbers,
17880 don't forget that too fast. */ 17894 don't forget that too fast. */
@@ -24319,9 +24333,10 @@ This variable is not guaranteed to be accurate except while processing
24319 DEFVAR_LISP ("frame-title-format", &Vframe_title_format, 24333 DEFVAR_LISP ("frame-title-format", &Vframe_title_format,
24320 doc: /* Template for displaying the title bar of visible frames. 24334 doc: /* Template for displaying the title bar of visible frames.
24321\(Assuming the window manager supports this feature.) 24335\(Assuming the window manager supports this feature.)
24322This variable has the same structure as `mode-line-format' (which see), 24336
24323and is used only on frames for which no explicit name has been set 24337This variable has the same structure as `mode-line-format', except that
24324\(see `modify-frame-parameters'). */); 24338the %c and %l constructs are ignored. It is used only on frames for
24339which no explicit name has been set \(see `modify-frame-parameters'). */);
24325 24340
24326 DEFVAR_LISP ("icon-title-format", &Vicon_title_format, 24341 DEFVAR_LISP ("icon-title-format", &Vicon_title_format,
24327 doc: /* Template for displaying the title bar of an iconified frame. 24342 doc: /* Template for displaying the title bar of an iconified frame.
diff --git a/src/xmenu.c b/src/xmenu.c
index 080f9e819a2..be77b9fdbd4 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -3776,8 +3776,7 @@ syms_of_xmenu ()
3776 3776
3777#if defined (USE_GTK) || defined (USE_X_TOOLKIT) 3777#if defined (USE_GTK) || defined (USE_X_TOOLKIT)
3778 defsubr (&Smenu_bar_open); 3778 defsubr (&Smenu_bar_open);
3779 Fdefalias (intern ("accelerate-menu"), intern (Smenu_bar_open.symbol_name), 3779 Ffset (intern ("accelerate-menu"), intern (Smenu_bar_open.symbol_name));
3780 Qnil);
3781#endif 3780#endif
3782 3781
3783#ifdef HAVE_MENUS 3782#ifdef HAVE_MENUS
diff --git a/src/xterm.c b/src/xterm.c
index a75140fb9e3..856fbef435b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8638,7 +8638,7 @@ x_check_expected_move (f, expected_left, expected_top)
8638 int expected_left; 8638 int expected_left;
8639 int expected_top; 8639 int expected_top;
8640{ 8640{
8641 int count = 0, current_left = 0, current_top = 0; 8641 int current_left = 0, current_top = 0;
8642 8642
8643 /* x_real_positions returns the left and top offsets of the outermost 8643 /* x_real_positions returns the left and top offsets of the outermost
8644 window manager window around the frame. */ 8644 window manager window around the frame. */