aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog61
-rw-r--r--src/callint.c87
-rw-r--r--src/keyboard.c18
-rw-r--r--src/macfns.c24
-rw-r--r--src/minibuf.c18
-rw-r--r--src/w32term.c3
-rw-r--r--src/xdisp.c8
-rw-r--r--src/xfaces.c4
-rw-r--r--src/xfns.c50
-rw-r--r--src/xselect.c8
10 files changed, 208 insertions, 73 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ce3c7d1435b..4118fc6f2d8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,58 @@
12006-10-27 Ben North <ben@redfrontdoor.org> (tiny change)
2
3 * w32term.c (x_draw_glyph_string_foreground): Set background mode
4 to TRANSPARENT before using overstrike to simulate bold faces.
5
6 * xfaces.c (best_matching_font): Fix logic to decide whether to
7 use overstriking to simulate bold-face (it was reversed).
8
92006-10-23 Kim F. Storm <storm@cua.dk>
10
11 * xdisp.c (remember_mouse_glyph): Do nothing if glyphs are not
12 initialized.
13
14 * keyboard.c (read_char): Make an element (t . EVENT) in
15 unread-command-events add EVENT to the current command's key sequence.
16 (syms_of_keyboard) <unread-command-events>: Update doc.
17
182006-10-21 Richard Stallman <rms@gnu.org>
19
20 * minibuf.c (Vread_expression_map): Define here.
21 (Qread_expression_history): New variable.
22 (syms_of_minibuf): Initialize them.
23 (Feval_minibuffer): Use Vread_expression_map and
24 Qread_expression_history.
25
262006-10-21 Kenichi Handa <handa@m17n.org>
27
28 * xfns.c (xic_create_fontsetname): If ADSTYLE field is not a wild
29 card, change it to "*".
30 (xic_create_xfontset): Call XCreateFontSet for each single
31 fontname in fontsetname.
32
332006-10-19 Chong Yidong <cyd@stupidchicken.com>
34
35 * callint.c (callint_message): Convert to a Lisp string.
36 (syms_of_callint): Initialize it.
37 (callint_message_size): Var deleted.
38 (Fcall_interactively): Use Fformat instead of doprnt to construct
39 prompt string.
40
412006-10-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
42
43 * xdisp.c (display_mode_line): Clear enabled_p flag on mode-line row.
44
452006-10-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
46
47 * macfns.c (Vmac_carbon_version_string) [TARGET_API_MAC_CARBON]:
48 New variable.
49 (syms_of_macfns) [TARGET_API_MAC_CARBON]: Defvar it.
50
512006-10-19 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
52
53 * xselect.c (x_handle_selection_request): If the converted_selection
54 is NIL or XCDR (converted_selection) is NIL, decline the request.
55
12006-10-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 562006-10-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 57
3 * gtkutil.c (get_utf8_string): Remove warnings with casts. 58 * gtkutil.c (get_utf8_string): Remove warnings with casts.
@@ -67,8 +122,8 @@
67 (x_draw_glyph_string_foreground): Use overstrike when needed. 122 (x_draw_glyph_string_foreground): Use overstrike when needed.
68 (x_draw_composite_glyph_string_foreground): Likewise. 123 (x_draw_composite_glyph_string_foreground): Likewise.
69 Use mac_draw_image_string_16 instead of mac_draw_string_16. 124 Use mac_draw_image_string_16 instead of mac_draw_string_16.
70 (mac_load_query_font): Rename from XLoadQueryFont. Take argument F 125 (mac_load_query_font): Rename from XLoadQueryFont. Take argument
71 instead of DPY. All uses changed. Don't save/restore font. 126 F instead of DPY. All uses changed. Don't save/restore font.
72 127
732006-10-07 Ralf Angeli <angeli@caeruleus.net> 1282006-10-07 Ralf Angeli <angeli@caeruleus.net>
74 129
@@ -111,7 +166,7 @@
111 166
1122006-09-30 Eli Zaretskii <eliz@gnu.org> 1672006-09-30 Eli Zaretskii <eliz@gnu.org>
113 168
114 * config.in Regenerated. 169 * config.in: Regenerated.
115 170
1162006-09-29 Juri Linkov <juri@jurta.org> 1712006-09-29 Juri Linkov <juri@jurta.org>
117 172
diff --git a/src/callint.c b/src/callint.c
index 5c54cdcaf48..0bd2ed66383 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -58,11 +58,8 @@ static Lisp_Object preserved_fns;
58/* Marker used within call-interactively to refer to point. */ 58/* Marker used within call-interactively to refer to point. */
59static Lisp_Object point_marker; 59static Lisp_Object point_marker;
60 60
61/* Buffer for the prompt text used in Fcall_interactively. */ 61/* String for the prompt text used in Fcall_interactively. */
62static char *callint_message; 62static Lisp_Object callint_message;
63
64/* Allocated length of that buffer. */
65static int callint_message_size;
66 63
67/* ARGSUSED */ 64/* ARGSUSED */
68DEFUN ("interactive", Finteractive, Sinteractive, 0, UNEVALLED, 0, 65DEFUN ("interactive", Finteractive, Sinteractive, 0, UNEVALLED, 0,
@@ -266,7 +263,6 @@ invoke it. If KEYS is omitted or nil, the return value of
266 Lisp_Object function, record_flag, keys; 263 Lisp_Object function, record_flag, keys;
267{ 264{
268 Lisp_Object *args, *visargs; 265 Lisp_Object *args, *visargs;
269 unsigned char **argstrings;
270 Lisp_Object fun; 266 Lisp_Object fun;
271 Lisp_Object specs; 267 Lisp_Object specs;
272 Lisp_Object filter_specs; 268 Lisp_Object filter_specs;
@@ -492,7 +488,6 @@ invoke it. If KEYS is omitted or nil, the return value of
492 488
493 args = (Lisp_Object *) alloca ((count + 1) * sizeof (Lisp_Object)); 489 args = (Lisp_Object *) alloca ((count + 1) * sizeof (Lisp_Object));
494 visargs = (Lisp_Object *) alloca ((count + 1) * sizeof (Lisp_Object)); 490 visargs = (Lisp_Object *) alloca ((count + 1) * sizeof (Lisp_Object));
495 argstrings = (unsigned char **) alloca ((count + 1) * sizeof (char *));
496 varies = (int *) alloca ((count + 1) * sizeof (int)); 491 varies = (int *) alloca ((count + 1) * sizeof (int));
497 492
498 for (i = 0; i < (count + 1); i++) 493 for (i = 0; i < (count + 1); i++)
@@ -516,34 +511,17 @@ invoke it. If KEYS is omitted or nil, the return value of
516 prompt1[sizeof prompt1 - 1] = 0; 511 prompt1[sizeof prompt1 - 1] = 0;
517 tem1 = (char *) index (prompt1, '\n'); 512 tem1 = (char *) index (prompt1, '\n');
518 if (tem1) *tem1 = 0; 513 if (tem1) *tem1 = 0;
519 /* Fill argstrings with a vector of C strings 514
520 corresponding to the Lisp strings in visargs. */ 515 visargs[0] = build_string (prompt1);
521 for (j = 1; j < i; j++) 516 if (index (prompt1, '%'))
522 argstrings[j] 517 callint_message = Fformat (i, visargs);
523 = (EQ (visargs[j], Qnil) 518 else
524 ? (unsigned char *) "" 519 callint_message = visargs[0];
525 : SDATA (visargs[j]));
526
527 /* Process the format-string in prompt1, putting the output
528 into callint_message. Make callint_message bigger if necessary.
529 We don't use a buffer on the stack, because the contents
530 need to stay stable for a while. */
531 while (1)
532 {
533 int nchars = doprnt (callint_message, callint_message_size,
534 prompt1, (char *)0,
535 j - 1, (char **) argstrings + 1);
536 if (nchars < callint_message_size - 1)
537 break;
538 callint_message_size *= 2;
539 callint_message
540 = (char *) xrealloc (callint_message, callint_message_size);
541 }
542 520
543 switch (*tem) 521 switch (*tem)
544 { 522 {
545 case 'a': /* Symbol defined as a function */ 523 case 'a': /* Symbol defined as a function */
546 visargs[i] = Fcompleting_read (build_string (callint_message), 524 visargs[i] = Fcompleting_read (callint_message,
547 Vobarray, Qfboundp, Qt, 525 Vobarray, Qfboundp, Qt,
548 Qnil, Qnil, Qnil, Qnil); 526 Qnil, Qnil, Qnil, Qnil);
549 /* Passing args[i] directly stimulates compiler bug */ 527 /* Passing args[i] directly stimulates compiler bug */
@@ -555,17 +533,17 @@ invoke it. If KEYS is omitted or nil, the return value of
555 args[i] = Fcurrent_buffer (); 533 args[i] = Fcurrent_buffer ();
556 if (EQ (selected_window, minibuf_window)) 534 if (EQ (selected_window, minibuf_window))
557 args[i] = Fother_buffer (args[i], Qnil, Qnil); 535 args[i] = Fother_buffer (args[i], Qnil, Qnil);
558 args[i] = Fread_buffer (build_string (callint_message), args[i], Qt); 536 args[i] = Fread_buffer (callint_message, args[i], Qt);
559 break; 537 break;
560 538
561 case 'B': /* Name of buffer, possibly nonexistent */ 539 case 'B': /* Name of buffer, possibly nonexistent */
562 args[i] = Fread_buffer (build_string (callint_message), 540 args[i] = Fread_buffer (callint_message,
563 Fother_buffer (Fcurrent_buffer (), Qnil, Qnil), 541 Fother_buffer (Fcurrent_buffer (), Qnil, Qnil),
564 Qnil); 542 Qnil);
565 break; 543 break;
566 544
567 case 'c': /* Character */ 545 case 'c': /* Character */
568 args[i] = Fread_char (build_string (callint_message), Qnil, Qnil); 546 args[i] = Fread_char (callint_message, Qnil, Qnil);
569 message1_nolog ((char *) 0); 547 message1_nolog ((char *) 0);
570 /* Passing args[i] directly stimulates compiler bug */ 548 /* Passing args[i] directly stimulates compiler bug */
571 teml = args[i]; 549 teml = args[i];
@@ -573,7 +551,7 @@ invoke it. If KEYS is omitted or nil, the return value of
573 break; 551 break;
574 552
575 case 'C': /* Command: symbol with interactive function */ 553 case 'C': /* Command: symbol with interactive function */
576 visargs[i] = Fcompleting_read (build_string (callint_message), 554 visargs[i] = Fcompleting_read (callint_message,
577 Vobarray, Qcommandp, 555 Vobarray, Qcommandp,
578 Qt, Qnil, Qnil, Qnil, Qnil); 556 Qt, Qnil, Qnil, Qnil, Qnil);
579 /* Passing args[i] directly stimulates compiler bug */ 557 /* Passing args[i] directly stimulates compiler bug */
@@ -589,24 +567,24 @@ invoke it. If KEYS is omitted or nil, the return value of
589 break; 567 break;
590 568
591 case 'D': /* Directory name. */ 569 case 'D': /* Directory name. */
592 args[i] = Fread_file_name (build_string (callint_message), Qnil, 570 args[i] = Fread_file_name (callint_message, Qnil,
593 current_buffer->directory, Qlambda, Qnil, 571 current_buffer->directory, Qlambda, Qnil,
594 Qfile_directory_p); 572 Qfile_directory_p);
595 break; 573 break;
596 574
597 case 'f': /* Existing file name. */ 575 case 'f': /* Existing file name. */
598 args[i] = Fread_file_name (build_string (callint_message), 576 args[i] = Fread_file_name (callint_message,
599 Qnil, Qnil, Qlambda, Qnil, Qnil); 577 Qnil, Qnil, Qlambda, Qnil, Qnil);
600 break; 578 break;
601 579
602 case 'F': /* Possibly nonexistent file name. */ 580 case 'F': /* Possibly nonexistent file name. */
603 args[i] = Fread_file_name (build_string (callint_message), 581 args[i] = Fread_file_name (callint_message,
604 Qnil, Qnil, Qnil, Qnil, Qnil); 582 Qnil, Qnil, Qnil, Qnil, Qnil);
605 break; 583 break;
606 584
607 case 'G': /* Possibly nonexistent file name, 585 case 'G': /* Possibly nonexistent file name,
608 default to directory alone. */ 586 default to directory alone. */
609 args[i] = Fread_file_name (build_string (callint_message), 587 args[i] = Fread_file_name (callint_message,
610 Qnil, Qnil, Qnil, build_string (""), Qnil); 588 Qnil, Qnil, Qnil, build_string (""), Qnil);
611 break; 589 break;
612 590
@@ -618,7 +596,7 @@ invoke it. If KEYS is omitted or nil, the return value of
618 { 596 {
619 int speccount1 = SPECPDL_INDEX (); 597 int speccount1 = SPECPDL_INDEX ();
620 specbind (Qcursor_in_echo_area, Qt); 598 specbind (Qcursor_in_echo_area, Qt);
621 args[i] = Fread_key_sequence (build_string (callint_message), 599 args[i] = Fread_key_sequence (callint_message,
622 Qnil, Qnil, Qnil, Qnil); 600 Qnil, Qnil, Qnil, Qnil);
623 unbind_to (speccount1, Qnil); 601 unbind_to (speccount1, Qnil);
624 teml = args[i]; 602 teml = args[i];
@@ -646,7 +624,7 @@ invoke it. If KEYS is omitted or nil, the return value of
646 { 624 {
647 int speccount1 = SPECPDL_INDEX (); 625 int speccount1 = SPECPDL_INDEX ();
648 specbind (Qcursor_in_echo_area, Qt); 626 specbind (Qcursor_in_echo_area, Qt);
649 args[i] = Fread_key_sequence (build_string (callint_message), 627 args[i] = Fread_key_sequence (callint_message,
650 Qnil, Qt, Qnil, Qnil); 628 Qnil, Qt, Qnil, Qnil);
651 teml = args[i]; 629 teml = args[i];
652 visargs[i] = Fkey_description (teml, Qnil); 630 visargs[i] = Fkey_description (teml, Qnil);
@@ -706,7 +684,7 @@ invoke it. If KEYS is omitted or nil, the return value of
706 684
707 case 'M': /* String read via minibuffer with 685 case 'M': /* String read via minibuffer with
708 inheriting the current input method. */ 686 inheriting the current input method. */
709 args[i] = Fread_string (build_string (callint_message), 687 args[i] = Fread_string (callint_message,
710 Qnil, Qnil, Qnil, Qt); 688 Qnil, Qnil, Qnil, Qt);
711 break; 689 break;
712 690
@@ -726,7 +704,7 @@ invoke it. If KEYS is omitted or nil, the return value of
726 } 704 }
727 first = 0; 705 first = 0;
728 706
729 tem = Fread_from_minibuffer (build_string (callint_message), 707 tem = Fread_from_minibuffer (callint_message,
730 Qnil, Qnil, Qnil, Qnil, Qnil, 708 Qnil, Qnil, Qnil, Qnil, Qnil,
731 Qnil); 709 Qnil);
732 if (! STRINGP (tem) || SCHARS (tem) == 0) 710 if (! STRINGP (tem) || SCHARS (tem) == 0)
@@ -736,7 +714,7 @@ invoke it. If KEYS is omitted or nil, the return value of
736 } 714 }
737 while (! NUMBERP (args[i])); 715 while (! NUMBERP (args[i]));
738 } 716 }
739 visargs[i] = last_minibuf_string; 717 visargs[i] = args[i];
740 break; 718 break;
741 719
742 case 'P': /* Prefix arg in raw form. Does no I/O. */ 720 case 'P': /* Prefix arg in raw form. Does no I/O. */
@@ -766,12 +744,12 @@ invoke it. If KEYS is omitted or nil, the return value of
766 744
767 case 's': /* String read via minibuffer without 745 case 's': /* String read via minibuffer without
768 inheriting the current input method. */ 746 inheriting the current input method. */
769 args[i] = Fread_string (build_string (callint_message), 747 args[i] = Fread_string (callint_message,
770 Qnil, Qnil, Qnil, Qnil); 748 Qnil, Qnil, Qnil, Qnil);
771 break; 749 break;
772 750
773 case 'S': /* Any symbol. */ 751 case 'S': /* Any symbol. */
774 visargs[i] = Fread_string (build_string (callint_message), 752 visargs[i] = Fread_string (callint_message,
775 Qnil, Qnil, Qnil, Qnil); 753 Qnil, Qnil, Qnil, Qnil);
776 /* Passing args[i] directly stimulates compiler bug */ 754 /* Passing args[i] directly stimulates compiler bug */
777 teml = visargs[i]; 755 teml = visargs[i];
@@ -780,17 +758,17 @@ invoke it. If KEYS is omitted or nil, the return value of
780 758
781 case 'v': /* Variable name: symbol that is 759 case 'v': /* Variable name: symbol that is
782 user-variable-p. */ 760 user-variable-p. */
783 args[i] = Fread_variable (build_string (callint_message), Qnil); 761 args[i] = Fread_variable (callint_message, Qnil);
784 visargs[i] = last_minibuf_string; 762 visargs[i] = last_minibuf_string;
785 break; 763 break;
786 764
787 case 'x': /* Lisp expression read but not evaluated */ 765 case 'x': /* Lisp expression read but not evaluated */
788 args[i] = Fread_minibuffer (build_string (callint_message), Qnil); 766 args[i] = Fread_minibuffer (callint_message, Qnil);
789 visargs[i] = last_minibuf_string; 767 visargs[i] = last_minibuf_string;
790 break; 768 break;
791 769
792 case 'X': /* Lisp expression read and evaluated */ 770 case 'X': /* Lisp expression read and evaluated */
793 args[i] = Feval_minibuffer (build_string (callint_message), Qnil); 771 args[i] = Feval_minibuffer (callint_message, Qnil);
794 visargs[i] = last_minibuf_string; 772 visargs[i] = last_minibuf_string;
795 break; 773 break;
796 774
@@ -804,13 +782,13 @@ invoke it. If KEYS is omitted or nil, the return value of
804 else 782 else
805 { 783 {
806 args[i] 784 args[i]
807 = Fread_non_nil_coding_system (build_string (callint_message)); 785 = Fread_non_nil_coding_system (callint_message);
808 visargs[i] = last_minibuf_string; 786 visargs[i] = last_minibuf_string;
809 } 787 }
810 break; 788 break;
811 789
812 case 'z': /* Coding-system symbol or nil */ 790 case 'z': /* Coding-system symbol or nil */
813 args[i] = Fread_coding_system (build_string (callint_message), Qnil); 791 args[i] = Fread_coding_system (callint_message, Qnil);
814 visargs[i] = last_minibuf_string; 792 visargs[i] = last_minibuf_string;
815 break; 793 break;
816 794
@@ -914,6 +892,9 @@ syms_of_callint ()
914 point_marker = Fmake_marker (); 892 point_marker = Fmake_marker ();
915 staticpro (&point_marker); 893 staticpro (&point_marker);
916 894
895 callint_message = Qnil;
896 staticpro (&callint_message);
897
917 preserved_fns = Fcons (intern ("region-beginning"), 898 preserved_fns = Fcons (intern ("region-beginning"),
918 Fcons (intern ("region-end"), 899 Fcons (intern ("region-end"),
919 Fcons (intern ("point"), 900 Fcons (intern ("point"),
@@ -953,10 +934,6 @@ syms_of_callint ()
953 Qmouse_leave_buffer_hook = intern ("mouse-leave-buffer-hook"); 934 Qmouse_leave_buffer_hook = intern ("mouse-leave-buffer-hook");
954 staticpro (&Qmouse_leave_buffer_hook); 935 staticpro (&Qmouse_leave_buffer_hook);
955 936
956 callint_message_size = 100;
957 callint_message = (char *) xmalloc (callint_message_size);
958
959
960 DEFVAR_KBOARD ("prefix-arg", Vprefix_arg, 937 DEFVAR_KBOARD ("prefix-arg", Vprefix_arg,
961 doc: /* The value of the prefix argument for the next editing command. 938 doc: /* The value of the prefix argument for the next editing command.
962It may be a number, or the symbol `-' for just a minus sign as arg, 939It may be a number, or the symbol `-' for just a minus sign as arg,
diff --git a/src/keyboard.c b/src/keyboard.c
index 5d0e05f887d..97554717e9a 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2620,6 +2620,18 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time)
2620 c = XCAR (Vunread_command_events); 2620 c = XCAR (Vunread_command_events);
2621 Vunread_command_events = XCDR (Vunread_command_events); 2621 Vunread_command_events = XCDR (Vunread_command_events);
2622 2622
2623 reread = 1;
2624
2625 /* Undo what sit-for did when it unread additional keys
2626 inside universal-argument. */
2627
2628 if (CONSP (c)
2629 && EQ (XCAR (c), Qt))
2630 {
2631 reread = 0;
2632 c = XCDR (c);
2633 }
2634
2623 /* Undo what read_char_x_menu_prompt did when it unread 2635 /* Undo what read_char_x_menu_prompt did when it unread
2624 additional keys returned by Fx_popup_menu. */ 2636 additional keys returned by Fx_popup_menu. */
2625 if (CONSP (c) 2637 if (CONSP (c)
@@ -2633,7 +2645,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time)
2633 && (EQ (c, Qtool_bar) || EQ (c, Qmenu_bar))) 2645 && (EQ (c, Qtool_bar) || EQ (c, Qmenu_bar)))
2634 *used_mouse_menu = 1; 2646 *used_mouse_menu = 1;
2635 2647
2636 reread = 1;
2637 goto reread_for_input_method; 2648 goto reread_for_input_method;
2638 } 2649 }
2639 2650
@@ -11626,7 +11637,10 @@ so that you can determine whether the command was run by mouse or not. */);
11626 11637
11627 DEFVAR_LISP ("unread-command-events", &Vunread_command_events, 11638 DEFVAR_LISP ("unread-command-events", &Vunread_command_events,
11628 doc: /* List of events to be read as the command input. 11639 doc: /* List of events to be read as the command input.
11629These events are processed first, before actual keyboard input. */); 11640These events are processed first, before actual keyboard input.
11641Events read from this list are not normally added to `this-command-keys',
11642as they will already have been added once as they were read for the first time.
11643An element of the form (t . EVENT) forces EVENT to be added to that list. */);
11630 Vunread_command_events = Qnil; 11644 Vunread_command_events = Qnil;
11631 11645
11632 DEFVAR_INT ("unread-command-char", &unread_command_char, 11646 DEFVAR_INT ("unread-command-char", &unread_command_char,
diff --git a/src/macfns.c b/src/macfns.c
index e18d6089df7..e0e58ff5c6f 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -51,6 +51,14 @@ Boston, MA 02110-1301, USA. */
51 51
52extern void free_frame_menubar (); 52extern void free_frame_menubar ();
53 53
54#if TARGET_API_MAC_CARBON
55
56/* Carbon version info */
57
58static Lisp_Object Vmac_carbon_version_string;
59
60#endif /* TARGET_API_MAC_CARBON */
61
54/* Non-zero means we're allowed to display an hourglass cursor. */ 62/* Non-zero means we're allowed to display an hourglass cursor. */
55 63
56int display_hourglass_p; 64int display_hourglass_p;
@@ -4718,6 +4726,22 @@ such a font. This is especially effective for such large fonts as
4718Chinese, Japanese, and Korean. */); 4726Chinese, Japanese, and Korean. */);
4719 Vx_pixel_size_width_font_regexp = Qnil; 4727 Vx_pixel_size_width_font_regexp = Qnil;
4720 4728
4729#if TARGET_API_MAC_CARBON
4730 DEFVAR_LISP ("mac-carbon-version-string", &Vmac_carbon_version_string,
4731 doc: /* Version info for Carbon API. */);
4732 {
4733 OSErr err;
4734 UInt32 response;
4735 char carbon_version[16] = "Unknown";
4736
4737 err = Gestalt (gestaltCarbonVersion, &response);
4738 if (err == noErr)
4739 sprintf (carbon_version, "%u.%u.%u",
4740 (response >> 8) & 0xf, (response >> 4) & 0xf, response & 0xf);
4741 Vmac_carbon_version_string = build_string (carbon_version);
4742 }
4743#endif /* TARGET_API_MAC_CARBON */
4744
4721 /* X window properties. */ 4745 /* X window properties. */
4722 defsubr (&Sx_change_window_property); 4746 defsubr (&Sx_change_window_property);
4723 defsubr (&Sx_delete_window_property); 4747 defsubr (&Sx_delete_window_property);
diff --git a/src/minibuf.c b/src/minibuf.c
index 8924668db52..f54feffbb21 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -133,7 +133,8 @@ int minibuffer_auto_raise;
133 133
134static Lisp_Object last_exact_completion; 134static Lisp_Object last_exact_completion;
135 135
136extern Lisp_Object Voverriding_local_map; 136/* Keymap for reading expressions. */
137Lisp_Object Vread_expression_map;
137 138
138Lisp_Object Quser_variable_p; 139Lisp_Object Quser_variable_p;
139 140
@@ -143,6 +144,10 @@ Lisp_Object Qcurrent_input_method, Qactivate_input_method;
143 144
144Lisp_Object Qcase_fold_search; 145Lisp_Object Qcase_fold_search;
145 146
147Lisp_Object Qread_expression_history;
148
149extern Lisp_Object Voverriding_local_map;
150
146extern Lisp_Object Qmouse_face; 151extern Lisp_Object Qmouse_face;
147 152
148extern Lisp_Object Qfield; 153extern Lisp_Object Qfield;
@@ -1046,7 +1051,9 @@ arguments are used as in `read-from-minibuffer'.) */)
1046 (prompt, initial_contents) 1051 (prompt, initial_contents)
1047 Lisp_Object prompt, initial_contents; 1052 Lisp_Object prompt, initial_contents;
1048{ 1053{
1049 return Feval (Fread_minibuffer (prompt, initial_contents)); 1054 return Feval (read_minibuf (Vread_expression_map, initial_contents,
1055 prompt, Qnil, 1, Qread_expression_history,
1056 make_number (0), Qnil, 0, 0));
1050} 1057}
1051 1058
1052/* Functions that use the minibuffer to read various things. */ 1059/* Functions that use the minibuffer to read various things. */
@@ -2814,6 +2821,9 @@ syms_of_minibuf ()
2814 Qcase_fold_search = intern ("case-fold-search"); 2821 Qcase_fold_search = intern ("case-fold-search");
2815 staticpro (&Qcase_fold_search); 2822 staticpro (&Qcase_fold_search);
2816 2823
2824 Qread_expression_history = intern ("read-expression-history");
2825 staticpro (&Qread_expression_history);
2826
2817 DEFVAR_LISP ("read-buffer-function", &Vread_buffer_function, 2827 DEFVAR_LISP ("read-buffer-function", &Vread_buffer_function,
2818 doc: /* If this is non-nil, `read-buffer' does its work by calling this function. */); 2828 doc: /* If this is non-nil, `read-buffer' does its work by calling this function. */);
2819 Vread_buffer_function = Qnil; 2829 Vread_buffer_function = Qnil;
@@ -2939,6 +2949,10 @@ properties. */);
2939 Vminibuffer_prompt_properties 2949 Vminibuffer_prompt_properties
2940 = Fcons (intern ("read-only"), Fcons (Qt, Qnil)); 2950 = Fcons (intern ("read-only"), Fcons (Qt, Qnil));
2941 2951
2952 DEFVAR_LISP ("read-expression-map", &Vread_expression_map,
2953 doc: /* Minibuffer keymap used for reading Lisp expressions. */);
2954 Vread_expression_map = Qnil;
2955
2942 defsubr (&Sset_minibuffer_window); 2956 defsubr (&Sset_minibuffer_window);
2943 defsubr (&Sread_from_minibuffer); 2957 defsubr (&Sread_from_minibuffer);
2944 defsubr (&Seval_minibuffer); 2958 defsubr (&Seval_minibuffer);
diff --git a/src/w32term.c b/src/w32term.c
index 9a6142925fd..948a5553e5d 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -1591,7 +1591,10 @@ x_draw_glyph_string_foreground (s)
1591 { 1591 {
1592 /* For overstriking (to simulate bold-face), draw the 1592 /* For overstriking (to simulate bold-face), draw the
1593 characters again shifted to the right by one pixel. */ 1593 characters again shifted to the right by one pixel. */
1594 int old_BkMode = SetBkMode (s->hdc, TRANSPARENT);
1594 w32_text_out (s, x + 1, s->ybase - boff, s->char2b, s->nchars); 1595 w32_text_out (s, x + 1, s->ybase - boff, s->char2b, s->nchars);
1596 if (old_BkMode && old_BkMode != TRANSPARENT)
1597 SetBkMode (s->hdc, old_BkMode);
1595 } 1598 }
1596 } 1599 }
1597 if (s->font && s->font->hfont) 1600 if (s->font && s->font->hfont)
diff --git a/src/xdisp.c b/src/xdisp.c
index fe22c55dc35..d99f7a9ad1d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2078,8 +2078,9 @@ remember_mouse_glyph (f, gx, gy, rect)
2078 /* Try to determine frame pixel position and size of the glyph under 2078 /* Try to determine frame pixel position and size of the glyph under
2079 frame pixel coordinates X/Y on frame F. */ 2079 frame pixel coordinates X/Y on frame F. */
2080 2080
2081 window = window_from_coordinates (f, gx, gy, &part, &x, &y, 0); 2081 if (!f->glyphs_initialized_p
2082 if (NILP (window)) 2082 || (window = window_from_coordinates (f, gx, gy, &part, &x, &y, 0),
2083 NILP (window)))
2083 { 2084 {
2084 width = FRAME_SMALLEST_CHAR_WIDTH (f); 2085 width = FRAME_SMALLEST_CHAR_WIDTH (f);
2085 height = FRAME_SMALLEST_FONT_HEIGHT (f); 2086 height = FRAME_SMALLEST_FONT_HEIGHT (f);
@@ -16603,6 +16604,9 @@ display_mode_line (w, face_id, format)
16603 int count = SPECPDL_INDEX (); 16604 int count = SPECPDL_INDEX ();
16604 16605
16605 init_iterator (&it, w, -1, -1, NULL, face_id); 16606 init_iterator (&it, w, -1, -1, NULL, face_id);
16607 /* Don't extend on a previously drawn mode-line.
16608 This may happen if called from pos_visible_p. */
16609 it.glyph_row->enabled_p = 0;
16606 prepare_desired_row (it.glyph_row); 16610 prepare_desired_row (it.glyph_row);
16607 16611
16608 it.glyph_row->mode_line_p = 1; 16612 it.glyph_row->mode_line_p = 1;
diff --git a/src/xfaces.c b/src/xfaces.c
index 6373100484a..b55118acdf0 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6705,10 +6705,10 @@ best_matching_font (f, attrs, fonts, nfonts, width_ratio, needs_overstrike)
6705 { 6705 {
6706 /* We want a bold font, but didn't get one; try to use 6706 /* We want a bold font, but didn't get one; try to use
6707 overstriking instead to simulate bold-face. However, 6707 overstriking instead to simulate bold-face. However,
6708 don't overstrike an already-bold fontn unless the 6708 don't overstrike an already-bold font unless the
6709 desired weight grossly exceeds the available weight. */ 6709 desired weight grossly exceeds the available weight. */
6710 if (got_weight > XLFD_WEIGHT_MEDIUM) 6710 if (got_weight > XLFD_WEIGHT_MEDIUM)
6711 *needs_overstrike = (got_weight - want_weight) > 2; 6711 *needs_overstrike = (want_weight - got_weight) > 2;
6712 else 6712 else
6713 *needs_overstrike = 1; 6713 *needs_overstrike = 1;
6714 } 6714 }
diff --git a/src/xfns.c b/src/xfns.c
index 066996628e2..1cd8265d20f 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2029,13 +2029,14 @@ xic_create_fontsetname (base_fontname, motif)
2029 else 2029 else
2030 { 2030 {
2031 int len; 2031 int len;
2032 char *p1 = NULL, *p2 = NULL; 2032 char *p1 = NULL, *p2 = NULL, *p3 = NULL;
2033 char *font_allcs = NULL; 2033 char *font_allcs = NULL;
2034 char *font_allfamilies = NULL; 2034 char *font_allfamilies = NULL;
2035 char *font_all = NULL; 2035 char *font_all = NULL;
2036 char *allcs = "*-*-*-*-*-*-*"; 2036 char *allcs = "*-*-*-*-*-*-*";
2037 char *allfamilies = "-*-*-"; 2037 char *allfamilies = "-*-*-";
2038 char *all = "*-*-*-*-"; 2038 char *all = "*-*-*-*-";
2039 char *base;
2039 2040
2040 for (i = 0, p = base_fontname; i < 8; p++) 2041 for (i = 0, p = base_fontname; i < 8; p++)
2041 { 2042 {
@@ -2046,8 +2047,27 @@ xic_create_fontsetname (base_fontname, motif)
2046 p1 = p + 1; 2047 p1 = p + 1;
2047 else if (i == 7) 2048 else if (i == 7)
2048 p2 = p + 1; 2049 p2 = p + 1;
2050 else if (i == 6)
2051 p3 = p + 1;
2049 } 2052 }
2050 } 2053 }
2054 /* If base_fontname specifies ADSTYLE, make it a
2055 wildcard. */
2056 if (*p3 != '*')
2057 {
2058 int diff = (p2 - p3) - 2;
2059
2060 base = alloca (strlen (base_fontname) + 1);
2061 bcopy (base_fontname, base, p3 - base_fontname);
2062 base[p3 - base_fontname] = '*';
2063 base[(p3 - base_fontname) + 1] = '-';
2064 strcpy (base + (p3 - base_fontname) + 2, p2);
2065 p = base + (p - base_fontname) - diff;
2066 p1 = base + (p1 - base_fontname);
2067 p2 = base + (p2 - base_fontname) - diff;
2068 base_fontname = base;
2069 }
2070
2051 /* Build the font spec that matches all charsets. */ 2071 /* Build the font spec that matches all charsets. */
2052 len = p - base_fontname + strlen (allcs) + 1; 2072 len = p - base_fontname + strlen (allcs) + 1;
2053 font_allcs = (char *) alloca (len); 2073 font_allcs = (char *) alloca (len);
@@ -2055,7 +2075,8 @@ xic_create_fontsetname (base_fontname, motif)
2055 bcopy (base_fontname, font_allcs, p - base_fontname); 2075 bcopy (base_fontname, font_allcs, p - base_fontname);
2056 strcat (font_allcs, allcs); 2076 strcat (font_allcs, allcs);
2057 2077
2058 /* Build the font spec that matches all families. */ 2078 /* Build the font spec that matches all families and
2079 add-styles. */
2059 len = p - p1 + strlen (allcs) + strlen (allfamilies) + 1; 2080 len = p - p1 + strlen (allcs) + strlen (allfamilies) + 1;
2060 font_allfamilies = (char *) alloca (len); 2081 font_allfamilies = (char *) alloca (len);
2061 bzero (font_allfamilies, len); 2082 bzero (font_allfamilies, len);
@@ -2122,13 +2143,28 @@ xic_create_xfontset (f, base_fontname)
2122 if (!xfs) 2143 if (!xfs)
2123 { 2144 {
2124 char *fontsetname = xic_create_fontsetname (base_fontname, False); 2145 char *fontsetname = xic_create_fontsetname (base_fontname, False);
2146 char *p0 = fontsetname, *p1;
2125 2147
2126 /* New fontset. */ 2148 /* New fontset. */
2127 xfs = XCreateFontSet (FRAME_X_DISPLAY (f), 2149 /* FONTSETNAME contains a list of font names (specific fonts
2128 fontsetname, &missing_list, 2150 first, general fonts last), but giving that to XCreateFontSet
2129 &missing_count, &def_string); 2151 at once occasionally fails (bug of X?). So, we try to call
2130 if (missing_list) 2152 XCreateFontSet for each fontname. */
2131 XFreeStringList (missing_list); 2153
2154 while (p0)
2155 {
2156 p1 = strchr (p0, ',');
2157 if (p1)
2158 *p1 = '\0';
2159 xfs = XCreateFontSet (FRAME_X_DISPLAY (f),
2160 p0, &missing_list,
2161 &missing_count, &def_string);
2162 if (missing_list)
2163 XFreeStringList (missing_list);
2164 if (xfs)
2165 break;
2166 p0 = p1 ? p1 + 1 : NULL;
2167 }
2132 xfree (fontsetname); 2168 xfree (fontsetname);
2133 } 2169 }
2134 2170
diff --git a/src/xselect.c b/src/xselect.c
index cd49e05171b..e6103043dce 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -964,6 +964,12 @@ x_handle_selection_request (event)
964 Atom type; 964 Atom type;
965 int nofree; 965 int nofree;
966 966
967 if (CONSP (converted_selection) && NILP (XCDR (converted_selection)))
968 {
969 x_decline_selection_request (event);
970 goto DONE2;
971 }
972
967 lisp_data_to_selection_data (SELECTION_EVENT_DISPLAY (event), 973 lisp_data_to_selection_data (SELECTION_EVENT_DISPLAY (event),
968 converted_selection, 974 converted_selection,
969 &data, &type, &size, &format, &nofree); 975 &data, &type, &size, &format, &nofree);
@@ -979,6 +985,8 @@ x_handle_selection_request (event)
979 if (!nofree) 985 if (!nofree)
980 xfree (data); 986 xfree (data);
981 } 987 }
988
989 DONE2:
982 unbind_to (count, Qnil); 990 unbind_to (count, Qnil);
983 991
984 DONE: 992 DONE: