diff options
| author | Paul Eggert | 2011-12-10 16:56:50 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-12-10 16:56:50 -0800 |
| commit | 8f50130c565eaf0ad7c49e4ad044c3291ecdfa71 (patch) | |
| tree | c8129448cbbf387fe82667ccac02983592c688f1 /src | |
| parent | 85a83e2e2585a1906dec5168ed96ad521b5849ed (diff) | |
| parent | 7b9d523a07395ecea505be88f45c33d73aea7038 (diff) | |
| download | emacs-8f50130c565eaf0ad7c49e4ad044c3291ecdfa71.tar.gz emacs-8f50130c565eaf0ad7c49e4ad044c3291ecdfa71.zip | |
Merge from trunk.
Diffstat (limited to 'src')
99 files changed, 1529 insertions, 778 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 80415abe40d..2051475bea0 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -311,9 +311,8 @@ define prowx | |||
| 311 | printf "y=%d x=%d pwid=%d", $row->y, $row->x, $row->pixel_width | 311 | printf "y=%d x=%d pwid=%d", $row->y, $row->x, $row->pixel_width |
| 312 | printf " a+d=%d+%d=%d", $row->ascent, $row->height-$row->ascent, $row->height | 312 | printf " a+d=%d+%d=%d", $row->ascent, $row->height-$row->ascent, $row->height |
| 313 | printf " phys=%d+%d=%d", $row->phys_ascent, $row->phys_height-$row->phys_ascent, $row->phys_height | 313 | printf " phys=%d+%d=%d", $row->phys_ascent, $row->phys_height-$row->phys_ascent, $row->phys_height |
| 314 | printf " vis=%d", $row->visible_height | 314 | printf " vis=%d\n", $row->visible_height |
| 315 | printf " L=%d T=%d R=%d", $row->used[0], $row->used[1], $row->used[2] | 315 | printf "used=(LMargin=%d,Text=%d,RMargin=%d) Hash=%d\n", $row->used[0], $row->used[1], $row->used[2], $row->hash |
| 316 | printf "\n" | ||
| 317 | printf "start=%d end=%d", $row->start.pos.charpos, $row->end.pos.charpos | 316 | printf "start=%d end=%d", $row->start.pos.charpos, $row->end.pos.charpos |
| 318 | if ($row->enabled_p) | 317 | if ($row->enabled_p) |
| 319 | printf " ENA" | 318 | printf " ENA" |
diff --git a/src/ChangeLog b/src/ChangeLog index 4cec277fb36..f525535e4d8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 2011-11-18 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-12-11 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Fix integer width and related bugs (Bug#9874). | 3 | Fix integer width and related bugs (Bug#9874). |
| 4 | * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp): | 4 | * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp): |
| @@ -150,6 +150,7 @@ | |||
| 150 | Fix a FIXME, by checking for integer overflow when calculating | 150 | Fix a FIXME, by checking for integer overflow when calculating |
| 151 | target_clm and actual_clm. | 151 | target_clm and actual_clm. |
| 152 | * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR) | 152 | * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR) |
| 153 | (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P) | ||
| 153 | (ASSURE_DESTINATION, coding_alloc_by_realloc) | 154 | (ASSURE_DESTINATION, coding_alloc_by_realloc) |
| 154 | (coding_alloc_by_making_gap, alloc_destination) | 155 | (coding_alloc_by_making_gap, alloc_destination) |
| 155 | (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16) | 156 | (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16) |
| @@ -169,7 +170,8 @@ | |||
| 169 | (decode_coding_object, encode_coding_object, detect_coding_system) | 170 | (decode_coding_object, encode_coding_object, detect_coding_system) |
| 170 | (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region) | 171 | (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region) |
| 171 | (code_convert_region, code_convert_string) | 172 | (code_convert_region, code_convert_string) |
| 172 | (Fdefine_coding_system_internal): | 173 | (Fdefine_coding_system_internal) |
| 174 | (coding_set_source, coding_set_destination): | ||
| 173 | Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough. | 175 | Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough. |
| 174 | (setup_iso_safe_charsets, consume_chars, Funencodable_char_position) | 176 | (setup_iso_safe_charsets, consume_chars, Funencodable_char_position) |
| 175 | (Fdefine_coding_system_internal): | 177 | (Fdefine_coding_system_internal): |
| @@ -786,11 +788,369 @@ | |||
| 786 | rather than rolling our own approximation. | 788 | rather than rolling our own approximation. |
| 787 | (SCROLL_BAR_VEC_SIZE): Remove; not used. | 789 | (SCROLL_BAR_VEC_SIZE): Remove; not used. |
| 788 | 790 | ||
| 789 | 2011-11-18 Paul Eggert <eggert@cs.ucla.edu> | 791 | 2011-12-10 Jan Djärv <jan.h.d@swipnet.se> |
| 790 | 792 | ||
| 791 | Fix minor problems found by static checking. | 793 | * xterm.c (x_term_init): Move call to gdk_window_add_filter before |
| 792 | * dispextern.h, xdisp.c (row_hash): Declare extern only if XASSERTS. | 794 | gtk_init (Bug#10100). |
| 793 | * dispnew.c (verify_row_hash): Now static. | 795 | |
| 796 | 2011-12-10 Eli Zaretskii <eliz@gnu.org> | ||
| 797 | |||
| 798 | * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if | ||
| 799 | IT->string is nil. (Bug#10263) | ||
| 800 | |||
| 801 | 2011-12-10 Jan Djärv <jan.h.d@swipnet.se> | ||
| 802 | |||
| 803 | * nsterm.h (x_free_frame_resources): Declare. | ||
| 804 | |||
| 805 | * nsfns.m (ns_get_defaults_value): New function (Bug#10103). | ||
| 806 | (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value. | ||
| 807 | |||
| 808 | * nsterm.h (ns_get_defaults_value): Declare. | ||
| 809 | |||
| 810 | * nsterm.m (ns_default): Call ns_get_defaults_value. | ||
| 811 | |||
| 812 | 2011-12-09 Eli Zaretskii <eliz@gnu.org> | ||
| 813 | |||
| 814 | * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero. | ||
| 815 | (Bug#10170) | ||
| 816 | |||
| 817 | 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 818 | |||
| 819 | * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case | ||
| 820 | that where the value of an _OBJC_* symbol points to is in the .bss | ||
| 821 | section (Bug#10240). | ||
| 822 | |||
| 823 | 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change) | ||
| 824 | |||
| 825 | * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end) | ||
| 826 | after the loop to call ccl_driver at least once (Bug#8619). | ||
| 827 | |||
| 828 | 2011-12-08 Kenichi Handa <handa@m17n.org> | ||
| 829 | |||
| 830 | * ftfont.c (get_adstyle_property): Fix previous change | ||
| 831 | (Bug#10233). | ||
| 832 | |||
| 833 | 2011-12-07 Juanma Barranquero <lekktu@gmail.com> | ||
| 834 | |||
| 835 | * w32.c (init_environment): If no_site_lisp, remove site-lisp | ||
| 836 | dirs from the default value of EMACSLOADPATH (bug#10208). | ||
| 837 | |||
| 838 | 2011-12-07 Glenn Morris <rgm@gnu.org> | ||
| 839 | |||
| 840 | * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in | ||
| 841 | installation and source directories as well. (Bug#10208) | ||
| 842 | |||
| 843 | 2011-12-06 Chong Yidong <cyd@gnu.org> | ||
| 844 | |||
| 845 | * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228). | ||
| 846 | |||
| 847 | 2011-12-06 Glenn Morris <rgm@gnu.org> | ||
| 848 | |||
| 849 | * process.c (start_process_unwind): Treat any pid <= 0, except -2, | ||
| 850 | as an error, not just -1. (Bug#10217) | ||
| 851 | |||
| 852 | 2011-12-05 Chong Yidong <cyd@gnu.org> | ||
| 853 | |||
| 854 | * keyboard.c (process_special_events): New function. | ||
| 855 | (swallow_events, Finput_pending_p): Use it (Bug#10195). | ||
| 856 | |||
| 857 | 2011-12-05 Paul Eggert <eggert@cs.ucla.edu> | ||
| 858 | |||
| 859 | * coding.c (encode_designation_at_bol): Don't use uninitialized | ||
| 860 | local variable (Bug#9318). | ||
| 861 | |||
| 862 | 2011-12-05 Kenichi Handa <handa@m17n.org> | ||
| 863 | |||
| 864 | * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF, | ||
| 865 | return Qnil (Bug#8046, Bug#10193). | ||
| 866 | |||
| 867 | 2011-12-05 Kenichi Handa <handa@m17n.org> | ||
| 868 | |||
| 869 | * coding.c (encode_designation_at_bol): New args charbuf_end and | ||
| 870 | dst. Return the number of produced bytes. Callers changed. | ||
| 871 | (coding_set_source): Return how many bytes coding->source was | ||
| 872 | relocated. | ||
| 873 | (coding_set_destination): Return how many bytes | ||
| 874 | coding->destination was relocated. | ||
| 875 | (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET) | ||
| 876 | (CODING_CHAR_CHARSET_P): Adjusted for the avove changes. | ||
| 877 | |||
| 878 | 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change) | ||
| 879 | |||
| 880 | * coding.c (CODING_CHAR_CHARSET_P): New macro. | ||
| 881 | (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above | ||
| 882 | macro (Bug#9318). | ||
| 883 | |||
| 884 | 2011-12-05 Andreas Schwab <schwab@linux-m68k.org> | ||
| 885 | |||
| 886 | The following changes are to fix Bug#9318. | ||
| 887 | |||
| 888 | * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros. | ||
| 889 | (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER) | ||
| 890 | (encode_coding_iso_2022, encode_coding_sjis) | ||
| 891 | (encode_coding_big5, encode_coding_charset): Use the above macros. | ||
| 892 | |||
| 893 | 2011-12-05 Juanma Barranquero <lekktu@gmail.com> | ||
| 894 | |||
| 895 | * lisp.h (process_quit_flag): Fix external declaration. | ||
| 896 | |||
| 897 | 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 898 | |||
| 899 | Don't macro-inline non-performance-critical code. | ||
| 900 | * eval.c (process_quit_flag): New function. | ||
| 901 | * lisp.h (QUIT): Use it. | ||
| 902 | |||
| 903 | 2011-12-04 Jan Djärv <jan.h.d@swipnet.se> | ||
| 904 | |||
| 905 | * nsfns.m (get_geometry_from_preferences): New function. | ||
| 906 | (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103). | ||
| 907 | |||
| 908 | 2011-12-04 Andreas Schwab <schwab@linux-m68k.org> | ||
| 909 | |||
| 910 | * emacs.c (Qkill_emacs): Define. | ||
| 911 | (syms_of_emacs): Initialize it. | ||
| 912 | * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set | ||
| 913 | Qquit_flag to `kill-emacs' instead. | ||
| 914 | (quit_throw_to_read_char): Add parameter `from_signal'. | ||
| 915 | All callers changed. Call Fkill_emacs if requested and safe. | ||
| 916 | * lisp.h (QUIT): Call Fkill_emacs if requested. | ||
| 917 | |||
| 918 | 2011-12-03 Jan Djärv <jan.h.d@swipnet.se> | ||
| 919 | |||
| 920 | * widget.c (update_wm_hints): Return if wmshell is null. | ||
| 921 | (widget_update_wm_size_hints): New function. | ||
| 922 | |||
| 923 | * widget.h (widget_update_wm_size_hints): Declare. | ||
| 924 | |||
| 925 | * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call | ||
| 926 | widget_update_wm_size_hints (Bug#10104). | ||
| 927 | |||
| 928 | 2011-12-03 Eli Zaretskii <eliz@gnu.org> | ||
| 929 | |||
| 930 | * xdisp.c (handle_invisible_prop): If the invisible text ends just | ||
| 931 | before a newline, prepare the bidi iterator for consuming the | ||
| 932 | newline, and keep the current paragraph direction. (Bug#10183) | ||
| 933 | (redisplay_window): Don't let `margin' become negative. (Bug#10192) | ||
| 934 | |||
| 935 | 2011-12-02 Juri Linkov <juri@jurta.org> | ||
| 936 | |||
| 937 | * search.c (Fword_search_regexp): New Lisp function created from | ||
| 938 | `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'. | ||
| 939 | (Fword_search_backward, Fword_search_forward) | ||
| 940 | (Fword_search_backward_lax, Fword_search_forward_lax): | ||
| 941 | Use `Fword_search_regexp' instead of `wordify'. Doc fix. | ||
| 942 | (syms_of_search): Define `Sword_search_regexp'. (Bug#10145) | ||
| 943 | |||
| 944 | 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 945 | |||
| 946 | * fileio.c (Finsert_file_contents): Move after-change-function call | ||
| 947 | to before the "handled:" label, since all "goto handled" appear in | ||
| 948 | cases where the *-change-functions have already been properly called | ||
| 949 | (bug#10117). | ||
| 950 | |||
| 951 | 2011-12-01 Andreas Schwab <schwab@linux-m68k.org> | ||
| 952 | |||
| 953 | * keyboard.c (interrupt_signal): Don't call kill-emacs when | ||
| 954 | waiting for input. (Bug#10169) | ||
| 955 | |||
| 956 | 2011-11-30 Eli Zaretskii <eliz@gnu.org> | ||
| 957 | |||
| 958 | * dispnew.c (adjust_glyph_matrix): Remove the assertion that | ||
| 959 | verifies glyph row's hash code--we have just reallocated the | ||
| 960 | glyphs, so their contents can be complete garbage. (Bug#10164) | ||
| 961 | |||
| 962 | 2011-11-30 Juanma Barranquero <lekktu@gmail.com> | ||
| 963 | |||
| 964 | * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check. | ||
| 965 | |||
| 966 | 2011-11-30 Eli Zaretskii <eliz@gnu.org> | ||
| 967 | |||
| 968 | * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's | ||
| 969 | attributes are tested _before_ calling verify_row_hash, to protect | ||
| 970 | against GCC re-ordering of the tests. (Bug#10164) | ||
| 971 | |||
| 972 | 2011-11-29 Jan Djärv <jan.h.d@swipnet.se> | ||
| 973 | |||
| 974 | * xterm.h (struct x_output): net_wm_state_hidden_seen is new. | ||
| 975 | |||
| 976 | * xterm.c (handle_one_xevent): Only set async_visible and friends | ||
| 977 | if net_wm_state_hidden_seen is non-zero (Bug#10002) | ||
| 978 | (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if | ||
| 979 | _NET_WM_STATE_HIDDEN is in NET_WM_STATE. | ||
| 980 | |||
| 981 | 2011-11-28 Paul Eggert <eggert@cs.ucla.edu> | ||
| 982 | |||
| 983 | Remove GCPRO-related macros that exist only to avoid shadowing locals. | ||
| 984 | * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR) | ||
| 985 | (GCPRO6_VAR, UNGCPRO_VAR): Remove. See | ||
| 986 | <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>. | ||
| 987 | All uses changed to use GCPRO1 etc. | ||
| 988 | (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO): | ||
| 989 | Revert to old implementation (i.e., before 2011-03-11). | ||
| 990 | |||
| 991 | 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 992 | |||
| 993 | * dispnew.c (scrolling_window): Truncate overlaps in copy destination | ||
| 994 | of scroll runs so as to avoid assigning disabled bogus rows and | ||
| 995 | unnecessary graphics copy operations. | ||
| 996 | |||
| 997 | 2011-11-27 Eli Zaretskii <eliz@gnu.org> | ||
| 998 | |||
| 999 | * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define. | ||
| 1000 | (snprintf) [_MSC_VER]: Redirect to _snprintf. | ||
| 1001 | (strtoll) [_MSC_VER]: Redirect to _strtoi64. | ||
| 1002 | (malloc, free, realloc, calloc): Redirect to e_* only when | ||
| 1003 | compiling Emacs. | ||
| 1004 | |||
| 1005 | * lisp.h (GCTYPEBITS): Move before first use. | ||
| 1006 | (ALIGN_GCTYPEBITS) [_MSC_VER]: Define. | ||
| 1007 | (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in | ||
| 1008 | this macro definition. | ||
| 1009 | |||
| 1010 | * s/ms-w32.h (tzname): Redirect to _tzname for all values of | ||
| 1011 | _MSC_VER. | ||
| 1012 | |||
| 1013 | 2011-11-27 Jan Djärv <jan.h.d@swipnet.se> | ||
| 1014 | |||
| 1015 | * gtkutil.c (xg_create_frame_widgets): | ||
| 1016 | Call gtk_window_set_has_resize_grip (FALSE) if that function is | ||
| 1017 | present with Gtk+ 2.0. | ||
| 1018 | |||
| 1019 | 2011-11-26 Paul Eggert <eggert@cs.ucla.edu> | ||
| 1020 | |||
| 1021 | * fileio.c (Finsert_file_contents): Undo previous change; see | ||
| 1022 | <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>. | ||
| 1023 | |||
| 1024 | 2011-11-26 Paul Eggert <eggert@cs.ucla.edu> | ||
| 1025 | |||
| 1026 | Rename locals to avoid shadowing. | ||
| 1027 | * fileio.c (Finsert_file_contents): | ||
| 1028 | Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing. | ||
| 1029 | * process.c (wait_reading_process_output): | ||
| 1030 | Rename inner 'proc' to 'p' to avoid shadowing. | ||
| 1031 | Indent for consistency with usual Emacs style. | ||
| 1032 | |||
| 1033 | 2011-11-25 Eli Zaretskii <eliz@gnu.org> | ||
| 1034 | |||
| 1035 | * xdisp.c (redisplay_window): If cursor row is not fully visible | ||
| 1036 | after recentering, and scroll-conservatively is set to a large | ||
| 1037 | number, scroll window by a few more lines to make the cursor fully | ||
| 1038 | visible and out of scroll-margin. (Bug#10105) | ||
| 1039 | (start_display): Don't move to the next line if the display should | ||
| 1040 | start at a newline that is part of a display vector or an overlay | ||
| 1041 | string. (Bug#10119) | ||
| 1042 | |||
| 1043 | 2011-11-24 Juri Linkov <juri@jurta.org> | ||
| 1044 | |||
| 1045 | * image.c (imagemagick_load_image): Move `MagickSetResolution' down | ||
| 1046 | after the `MagickPingImage' call. (Bug#10112) | ||
| 1047 | |||
| 1048 | 2011-11-23 Chong Yidong <cyd@gnu.org> | ||
| 1049 | |||
| 1050 | * window.c (Fcoordinates_in_window_p): Accept only live windows. | ||
| 1051 | |||
| 1052 | 2011-11-23 Martin Rudalics <rudalics@gmx.at> | ||
| 1053 | |||
| 1054 | * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before | ||
| 1055 | making another buffer current. (Bug#10114) | ||
| 1056 | |||
| 1057 | 2011-11-23 Glenn Morris <rgm@gnu.org> | ||
| 1058 | |||
| 1059 | * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526) | ||
| 1060 | |||
| 1061 | 2011-11-23 Chong Yidong <cyd@gnu.org> | ||
| 1062 | |||
| 1063 | * xdisp.c (compute_stop_pos): Check validity of end_charpos before | ||
| 1064 | using it (Bug#5984). | ||
| 1065 | |||
| 1066 | 2011-11-22 Eli Zaretskii <eliz@gnu.org> | ||
| 1067 | |||
| 1068 | * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode- | ||
| 1069 | and header-lines, as they don't have one computed for them. | ||
| 1070 | (Bug#10098) | ||
| 1071 | |||
| 1072 | * .gdbinit (prow): Make displayed values more self-explaining. | ||
| 1073 | Add row's hash code. | ||
| 1074 | |||
| 1075 | 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 1076 | |||
| 1077 | * process.c (wait_reading_process_output): Fix asynchrounous | ||
| 1078 | GnuTLS socket handling on some versions of the GnuTLS library. | ||
| 1079 | (wait_reading_process_output): Add comment and URL. | ||
| 1080 | |||
| 1081 | 2011-11-21 Jan Djärv <jan.h.d@swipnet.se> | ||
| 1082 | |||
| 1083 | * xterm.c (x_clear_frame): Reinstate the XClearWindow call. | ||
| 1084 | |||
| 1085 | 2011-11-21 Chong Yidong <cyd@gnu.org> | ||
| 1086 | |||
| 1087 | * window.c (Fnext_window, Fprevious_window): Doc fix. | ||
| 1088 | |||
| 1089 | 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1090 | |||
| 1091 | * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup. | ||
| 1092 | |||
| 1093 | 2011-11-20 Juanma Barranquero <lekktu@gmail.com> | ||
| 1094 | |||
| 1095 | * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo. | ||
| 1096 | |||
| 1097 | 2011-11-20 Martin Rudalics <rudalics@gmx.at> | ||
| 1098 | |||
| 1099 | * window.c (Fset_window_combination_limit): Rename argument | ||
| 1100 | STATUS to LIMIT. | ||
| 1101 | (Vwindow_combination_limit): Remove "status" from doc-string. | ||
| 1102 | |||
| 1103 | 2011-11-20 Andreas Schwab <schwab@linux-m68k.org> | ||
| 1104 | |||
| 1105 | * m/ibms390.h: Remove. | ||
| 1106 | * m/ibms390x.h: Don't include "ibms390.h". | ||
| 1107 | |||
| 1108 | 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1109 | |||
| 1110 | * fileio.c (Finsert_file_contents): Add missing gcpro1 variable. | ||
| 1111 | Suggested by Dmitry Antipov <dmantipov@yandex.ru>. | ||
| 1112 | |||
| 1113 | 2011-11-20 Juanma Barranquero <lekktu@gmail.com> | ||
| 1114 | |||
| 1115 | * casetab.c (Fset_case_table): | ||
| 1116 | * charset.c (Fcharset_after): Fix typos. | ||
| 1117 | |||
| 1118 | 2011-11-20 Paul Eggert <eggert@cs.ucla.edu> | ||
| 1119 | |||
| 1120 | Standardize on VIRT_ADDR_VARIES behavior (Bug#10042). | ||
| 1121 | Otherwise, valgrind does not work on some platforms. | ||
| 1122 | Problem reported by Andreas Schwab in | ||
| 1123 | <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>. | ||
| 1124 | * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES | ||
| 1125 | is set, removing the need for VIRT_ADDRESS_VARIES. | ||
| 1126 | (PURE_P): Use a more-efficient implementation that needs just one | ||
| 1127 | comparison, not two: on x86-64 with GCC 4.6.2, this cut down the | ||
| 1128 | number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge) | ||
| 1129 | to 4 (xorl, subq, cmpq, setbe). | ||
| 1130 | * alloc.c (pure): Always extern now, since that's the | ||
| 1131 | VIRT_ADDR_VARIES behavior. | ||
| 1132 | (PURE_POINTER_P): Use a single comparison, not two, for | ||
| 1133 | consistency with the new puresize.h. | ||
| 1134 | * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed. | ||
| 1135 | * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h: | ||
| 1136 | Remove VIRT_ADDR_VARIES no longer needed. | ||
| 1137 | |||
| 1138 | 2011-11-19 Eli Zaretskii <eliz@gnu.org> | ||
| 1139 | |||
| 1140 | * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph) | ||
| 1141 | (erase_phys_cursor, update_window_cursor, show_mouse_face) | ||
| 1142 | (cursor_in_mouse_face_p): If the cursor position is out of bounds, | ||
| 1143 | behave as if the cursor position were at the window margin. | ||
| 1144 | |||
| 1145 | * window.c (get_phys_cursor_glyph): If the window is hscrolled, | ||
| 1146 | and the cursor position is out of bounds, behave as if the cursor | ||
| 1147 | position were at the window margin. (Bug#10075) | ||
| 1148 | |||
| 1149 | 2011-11-18 Chong Yidong <cyd@gnu.org> | ||
| 1150 | |||
| 1151 | * window.c (Fwindow_combination_limit): Make first argument | ||
| 1152 | non-optional, since it is meaningless for live windows like the | ||
| 1153 | selected window. | ||
| 794 | 1154 | ||
| 795 | 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru> | 1155 | 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru> |
| 796 | 1156 | ||
| @@ -860,8 +1220,8 @@ | |||
| 860 | * xdisp.c (display_line): Move the call to | 1220 | * xdisp.c (display_line): Move the call to |
| 861 | highlight_trailing_whitespace before the call to | 1221 | highlight_trailing_whitespace before the call to |
| 862 | compute_line_metrics, since the latter needs to see the final | 1222 | compute_line_metrics, since the latter needs to see the final |
| 863 | faces of all the glyphs to compute ROW's hash value. Fixes | 1223 | faces of all the glyphs to compute ROW's hash value. |
| 864 | assertion violations in row_equal_p. (Bug#10035) | 1224 | Fixes assertion violations in row_equal_p. (Bug#10035) |
| 865 | 1225 | ||
| 866 | 2011-11-14 Juanma Barranquero <lekktu@gmail.com> | 1226 | 2011-11-14 Juanma Barranquero <lekktu@gmail.com> |
| 867 | 1227 | ||
| @@ -945,8 +1305,8 @@ | |||
| 945 | 2011-11-08 Chong Yidong <cyd@gnu.org> | 1305 | 2011-11-08 Chong Yidong <cyd@gnu.org> |
| 946 | 1306 | ||
| 947 | * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix. | 1307 | * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix. |
| 948 | (Fwindow_body_height, Fwindow_body_width): Move from Lisp. Signal | 1308 | (Fwindow_body_height, Fwindow_body_width): Move from Lisp. |
| 949 | an error if not a live window. | 1309 | Signal an error if not a live window. |
| 950 | (Fwindow_total_width, Fwindow_total_height): Move from Lisp. | 1310 | (Fwindow_total_width, Fwindow_total_height): Move from Lisp. |
| 951 | (Fwindow_total_size, Fwindow_body_size): Move to Lisp. | 1311 | (Fwindow_total_size, Fwindow_body_size): Move to Lisp. |
| 952 | 1312 | ||
| @@ -1078,8 +1438,8 @@ | |||
| 1078 | (x_destroy_window): Move code to x_free_frame_resources. | 1438 | (x_destroy_window): Move code to x_free_frame_resources. |
| 1079 | 1439 | ||
| 1080 | * xfns.c (unwind_create_frame): Fix comment. | 1440 | * xfns.c (unwind_create_frame): Fix comment. |
| 1081 | (Fx_create_frame, x_create_tip_frame): Move | 1441 | (Fx_create_frame, x_create_tip_frame): |
| 1082 | terminal->reference_count++ just before making the frame | 1442 | Move terminal->reference_count++ just before making the frame |
| 1083 | official. Move initialization of image_cache_refcount and | 1443 | official. Move initialization of image_cache_refcount and |
| 1084 | dpyinfo_refcount before calling init_frame_faces (Bug#9943). | 1444 | dpyinfo_refcount before calling init_frame_faces (Bug#9943). |
| 1085 | 1445 | ||
| @@ -1149,8 +1509,8 @@ | |||
| 1149 | * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. | 1509 | * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. |
| 1150 | Don't stop backward scan on the continuation glyph, even though | 1510 | Don't stop backward scan on the continuation glyph, even though |
| 1151 | its CHARPOS is positive. | 1511 | its CHARPOS is positive. |
| 1152 | (mouse_face_from_buffer_pos, note_mouse_highlight): Rename | 1512 | (mouse_face_from_buffer_pos, note_mouse_highlight): |
| 1153 | cover_string to disp_string. | 1513 | Rename cover_string to disp_string. |
| 1154 | 1514 | ||
| 1155 | 2011-11-01 Martin Rudalics <rudalics@gmx.at> | 1515 | 2011-11-01 Martin Rudalics <rudalics@gmx.at> |
| 1156 | 1516 | ||
| @@ -7789,7 +8149,7 @@ | |||
| 7789 | 8149 | ||
| 7790 | 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change) | 8150 | 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change) |
| 7791 | 8151 | ||
| 7792 | * xml.c (parse_region): Avoid creating spurious whiespace nodes. | 8152 | * xml.c (parse_region): Avoid creating spurious whitespace nodes. |
| 7793 | 8153 | ||
| 7794 | 2011-04-08 Chong Yidong <cyd@stupidchicken.com> | 8154 | 2011-04-08 Chong Yidong <cyd@stupidchicken.com> |
| 7795 | 8155 | ||
| @@ -8405,7 +8765,7 @@ | |||
| 8405 | * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1): | 8765 | * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1): |
| 8406 | Use Frun_hooks. | 8766 | Use Frun_hooks. |
| 8407 | (command_loop_1): Use Frun_hooks. Call safe_run_hooks | 8767 | (command_loop_1): Use Frun_hooks. Call safe_run_hooks |
| 8408 | unconditionnaly since it does the check itself. | 8768 | unconditionally since it does the check itself. |
| 8409 | 8769 | ||
| 8410 | 2011-03-23 Paul Eggert <eggert@cs.ucla.edu> | 8770 | 2011-03-23 Paul Eggert <eggert@cs.ucla.edu> |
| 8411 | 8771 | ||
| @@ -9289,7 +9649,7 @@ | |||
| 9289 | (xg_set_widget_bg): New function. | 9649 | (xg_set_widget_bg): New function. |
| 9290 | (delete_cb): New function. | 9650 | (delete_cb): New function. |
| 9291 | (xg_create_frame_widgets): Connect delete-event to delete_cb. | 9651 | (xg_create_frame_widgets): Connect delete-event to delete_cb. |
| 9292 | Call xg_set_widget_bg. Only set backgrund pixmap for ! HAVE_GTK3 | 9652 | Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3 |
| 9293 | (xg_set_background_color): Call xg_set_widget_bg. | 9653 | (xg_set_background_color): Call xg_set_widget_bg. |
| 9294 | (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask. | 9654 | (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask. |
| 9295 | (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3. | 9655 | (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3. |
diff --git a/src/ChangeLog.1 b/src/ChangeLog.1 index efe77648458..7fef45f36da 100644 --- a/src/ChangeLog.1 +++ b/src/ChangeLog.1 | |||
| @@ -2237,7 +2237,7 @@ | |||
| 2237 | 2237 | ||
| 2238 | * data.c (Fset): | 2238 | * data.c (Fset): |
| 2239 | If Vautoload_queue non-nil, record function and old definition | 2239 | If Vautoload_queue non-nil, record function and old definition |
| 2240 | by consing onto Vautoload_qeueue. | 2240 | by consing onto Vautoload_queue. |
| 2241 | 2241 | ||
| 2242 | * fns.c (Fprovide): | 2242 | * fns.c (Fprovide): |
| 2243 | If Vautoload_queue is non-nil, record old value of Vfeatures. | 2243 | If Vautoload_queue is non-nil, record old value of Vfeatures. |
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10 index 181b11b5a2b..e759183724e 100644 --- a/src/ChangeLog.10 +++ b/src/ChangeLog.10 | |||
| @@ -516,7 +516,7 @@ | |||
| 516 | * w32fns.c (current_popup_menu): Use from w32menu.c. | 516 | * w32fns.c (current_popup_menu): Use from w32menu.c. |
| 517 | (w32_wnd_proc) <WM_EXITMENULOOP, WM_TIMER>: Use menubar_active | 517 | (w32_wnd_proc) <WM_EXITMENULOOP, WM_TIMER>: Use menubar_active |
| 518 | and current_popup_menu to determine whether a menubar menu has | 518 | and current_popup_menu to determine whether a menubar menu has |
| 519 | been cancelled. | 519 | been canceled. |
| 520 | 520 | ||
| 521 | * w32term.h (w32_output): Remove menu_command_in_progress. | 521 | * w32term.h (w32_output): Remove menu_command_in_progress. |
| 522 | 522 | ||
| @@ -1003,7 +1003,7 @@ | |||
| 1003 | (syms_of_xdisp): DEFVAR_LISP and initialize it. Update doc string | 1003 | (syms_of_xdisp): DEFVAR_LISP and initialize it. Update doc string |
| 1004 | to describe new value `grow-only', and use of C-l. | 1004 | to describe new value `grow-only', and use of C-l. |
| 1005 | (display_tool_bar_line): Only use default face for border below | 1005 | (display_tool_bar_line): Only use default face for border below |
| 1006 | toolbar if not grow-only (to get acceptable visual appearence). | 1006 | toolbar if not grow-only (to get acceptable visual appearance). |
| 1007 | Explicitly set visible_height for empty toolbar lines. | 1007 | Explicitly set visible_height for empty toolbar lines. |
| 1008 | (redisplay_tool_bar): Handle `grow-only' setting. Check and clear | 1008 | (redisplay_tool_bar): Handle `grow-only' setting. Check and clear |
| 1009 | minimize_tool_bar_window_p flag. | 1009 | minimize_tool_bar_window_p flag. |
| @@ -4346,7 +4346,7 @@ | |||
| 4346 | 4346 | ||
| 4347 | * textprop.c (Fremove_list_of_text_properties): | 4347 | * textprop.c (Fremove_list_of_text_properties): |
| 4348 | Ensure modify_region is called only when buffer is modified and that | 4348 | Ensure modify_region is called only when buffer is modified and that |
| 4349 | signal_after_change is allways called in that case. | 4349 | signal_after_change is always called in that case. |
| 4350 | 4350 | ||
| 4351 | * print.c (PRINTFINISH): Call signal_after_change. | 4351 | * print.c (PRINTFINISH): Call signal_after_change. |
| 4352 | 4352 | ||
| @@ -5084,7 +5084,7 @@ | |||
| 5084 | 5084 | ||
| 5085 | 2006-02-26 Chong Yidong <cyd@stupidchicken.com> | 5085 | 2006-02-26 Chong Yidong <cyd@stupidchicken.com> |
| 5086 | 5086 | ||
| 5087 | * xterm.h, xterm.c (x_uncatch_errors): Delete unneccessary argument. | 5087 | * xterm.h, xterm.c (x_uncatch_errors): Delete unnecessary argument. |
| 5088 | 5088 | ||
| 5089 | * xterm.c (x_load_font, x_term_init, XTmouse_position) | 5089 | * xterm.c (x_load_font, x_term_init, XTmouse_position) |
| 5090 | (handle_one_xevent, x_connection_closed, x_list_fonts): | 5090 | (handle_one_xevent, x_connection_closed, x_list_fonts): |
| @@ -6387,7 +6387,7 @@ | |||
| 6387 | 2005-11-20 Nick Roberts <nickrob@snap.net.nz> | 6387 | 2005-11-20 Nick Roberts <nickrob@snap.net.nz> |
| 6388 | 6388 | ||
| 6389 | * lisp.h: Use typedef when Lisp_Object is EMACS_INT so that | 6389 | * lisp.h: Use typedef when Lisp_Object is EMACS_INT so that |
| 6390 | this type is recognised when debugging. | 6390 | this type is recognized when debugging. |
| 6391 | 6391 | ||
| 6392 | 2005-11-19 Andreas Schwab <schwab@suse.de> | 6392 | 2005-11-19 Andreas Schwab <schwab@suse.de> |
| 6393 | 6393 | ||
| @@ -12087,7 +12087,7 @@ | |||
| 12087 | (merge_face_heights): Eliminate GCPRO arg. All callers changed. | 12087 | (merge_face_heights): Eliminate GCPRO arg. All callers changed. |
| 12088 | 12088 | ||
| 12089 | * keyboard.c (command_loop_1): Change Vtransient_mark_mode | 12089 | * keyboard.c (command_loop_1): Change Vtransient_mark_mode |
| 12090 | before deciding whether to inactivate mark. | 12090 | before deciding whether to deactivate mark. |
| 12091 | 12091 | ||
| 12092 | 2004-11-06 Lars Brinkhoff <lars@nocrew.org> | 12092 | 2004-11-06 Lars Brinkhoff <lars@nocrew.org> |
| 12093 | 12093 | ||
| @@ -13398,7 +13398,7 @@ | |||
| 13398 | 2004-07-04 John Paul Wallington <jpw@gnu.org> | 13398 | 2004-07-04 John Paul Wallington <jpw@gnu.org> |
| 13399 | 13399 | ||
| 13400 | * fileio.c (read_file_name_completion_ignore_case): New variable. | 13400 | * fileio.c (read_file_name_completion_ignore_case): New variable. |
| 13401 | (syms_of_fileio): Declare and initialise it. | 13401 | (syms_of_fileio): Declare and initialize it. |
| 13402 | (Fread_file_name): Bind `completion-ignore-case' to respect it. | 13402 | (Fread_file_name): Bind `completion-ignore-case' to respect it. |
| 13403 | 13403 | ||
| 13404 | 2004-07-03 Eli Zaretskii <eliz@gnu.org> | 13404 | 2004-07-03 Eli Zaretskii <eliz@gnu.org> |
| @@ -18755,7 +18755,7 @@ | |||
| 18755 | 18755 | ||
| 18756 | 2003-05-21 Dave Love <fx@gnu.org> | 18756 | 2003-05-21 Dave Love <fx@gnu.org> |
| 18757 | 18757 | ||
| 18758 | [Merged from unicode branch.] | 18758 | [Merged from Unicode branch.] |
| 18759 | 18759 | ||
| 18760 | * xfns.c (x_window, x_window): Use use_xim. | 18760 | * xfns.c (x_window, x_window): Use use_xim. |
| 18761 | 18761 | ||
| @@ -23013,7 +23013,7 @@ | |||
| 23013 | (try_window_id): Likewise. | 23013 | (try_window_id): Likewise. |
| 23014 | (redisplay_window): New local var buffer_unchanged_p. | 23014 | (redisplay_window): New local var buffer_unchanged_p. |
| 23015 | 23015 | ||
| 23016 | * keyboard.c (cmd_error) [HAVE_X_WINDOWS]: Maybe call cancel_houglass. | 23016 | * keyboard.c (cmd_error) [HAVE_X_WINDOWS]: Maybe call cancel_hourglass. |
| 23017 | 23017 | ||
| 23018 | * process.c (create_process): Test USG_SUBTTY_WORKS. | 23018 | * process.c (create_process): Test USG_SUBTTY_WORKS. |
| 23019 | (process_send_signal): Clean up handling of GID. | 23019 | (process_send_signal): Clean up handling of GID. |
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11 index 73ac5fd4e00..f9fd442da3f 100644 --- a/src/ChangeLog.11 +++ b/src/ChangeLog.11 | |||
| @@ -966,7 +966,7 @@ | |||
| 966 | ($(BLD)/editfns.$(O)): Depend on ../lib/strftime.h. | 966 | ($(BLD)/editfns.$(O)): Depend on ../lib/strftime.h. |
| 967 | ($(BLD)/print.$(O)): Depend on ../lib/ftoastr.h and ../lib/intprops.h. | 967 | ($(BLD)/print.$(O)): Depend on ../lib/ftoastr.h and ../lib/intprops.h. |
| 968 | 968 | ||
| 969 | * deps.mk: Update for recent changes: gnutls support, gnulib | 969 | * deps.mk: Update for recent changes: GnuTLS support, gnulib |
| 970 | imports, addition of globals.h. | 970 | imports, addition of globals.h. |
| 971 | 971 | ||
| 972 | * makefile.w32-in ($(BLD)/sysdep.$(O)): Depend on | 972 | * makefile.w32-in ($(BLD)/sysdep.$(O)): Depend on |
| @@ -2191,7 +2191,7 @@ | |||
| 2191 | 2010-12-16 Jan Djärv <jan.h.d@swipnet.se> | 2191 | 2010-12-16 Jan Djärv <jan.h.d@swipnet.se> |
| 2192 | 2192 | ||
| 2193 | * nsterm.m (ns_draw_window_cursor): If the cursor color is the | 2193 | * nsterm.m (ns_draw_window_cursor): If the cursor color is the |
| 2194 | same as the background, use the face forground as cursor. | 2194 | same as the background, use the face foreground as cursor. |
| 2195 | 2195 | ||
| 2196 | 2010-12-13 Eli Zaretskii <eliz@gnu.org> | 2196 | 2010-12-13 Eli Zaretskii <eliz@gnu.org> |
| 2197 | 2197 | ||
| @@ -3268,7 +3268,7 @@ | |||
| 3268 | 2010-10-10 Lars Magne Ingebrigtsen <larsi@gnus.org> | 3268 | 2010-10-10 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 3269 | 3269 | ||
| 3270 | * gnutls.c (emacs_gnutls_write): If we're trying to write before | 3270 | * gnutls.c (emacs_gnutls_write): If we're trying to write before |
| 3271 | gnutls is ready, return EAGAIN as the errno. | 3271 | GnuTLS is ready, return EAGAIN as the errno. |
| 3272 | 3272 | ||
| 3273 | 2010-10-10 Dan Nicolaescu <dann@ics.uci.edu> | 3273 | 2010-10-10 Dan Nicolaescu <dann@ics.uci.edu> |
| 3274 | 3274 | ||
| @@ -3585,12 +3585,12 @@ | |||
| 3585 | * process.c (make_process): Set the gnutls_p field to zero by | 3585 | * process.c (make_process): Set the gnutls_p field to zero by |
| 3586 | default. | 3586 | default. |
| 3587 | (read_process_output): Always call the gnutls_read function if the | 3587 | (read_process_output): Always call the gnutls_read function if the |
| 3588 | stream is a gnutls stream. | 3588 | stream is a GnuTLS stream. |
| 3589 | (send_process): Ditto for writes. | 3589 | (send_process): Ditto for writes. |
| 3590 | 3590 | ||
| 3591 | * gnutls.c (emacs_gnutls_write, emacs_gnutls_read): Refuse to read | 3591 | * gnutls.c (emacs_gnutls_write, emacs_gnutls_read): Refuse to read |
| 3592 | or write anything until the state is GNUTLS_STAGE_READY. | 3592 | or write anything until the state is GNUTLS_STAGE_READY. |
| 3593 | (Fgnutls_boot): Mark the stream as being a gnutls stream. | 3593 | (Fgnutls_boot): Mark the stream as being a GnuTLS stream. |
| 3594 | 3594 | ||
| 3595 | 2010-09-29 Eli Zaretskii <eliz@gnu.org> | 3595 | 2010-09-29 Eli Zaretskii <eliz@gnu.org> |
| 3596 | 3596 | ||
| @@ -4839,7 +4839,7 @@ | |||
| 4839 | 4839 | ||
| 4840 | 2010-08-13 Jason Rumney <jasonr@gnu.org> | 4840 | 2010-08-13 Jason Rumney <jasonr@gnu.org> |
| 4841 | 4841 | ||
| 4842 | * w32menu.c (simple_dialog_show): Use unicode message box if available. | 4842 | * w32menu.c (simple_dialog_show): Use Unicode message box if available. |
| 4843 | (MessageBoxW_Proc): New function typedef. | 4843 | (MessageBoxW_Proc): New function typedef. |
| 4844 | (unicode-message-box): New function pointer. | 4844 | (unicode-message-box): New function pointer. |
| 4845 | (globals_of_w32menu): Import it from user32.dll. (Bug#5629) | 4845 | (globals_of_w32menu): Import it from user32.dll. (Bug#5629) |
| @@ -5896,7 +5896,7 @@ | |||
| 5896 | * eval.c (Feval, Ffuncall): Use the new names. | 5896 | * eval.c (Feval, Ffuncall): Use the new names. |
| 5897 | 5897 | ||
| 5898 | * lisp.h (struct Lisp_Subr): Rename `am' to aMANY and add aUNEVALLED. | 5898 | * lisp.h (struct Lisp_Subr): Rename `am' to aMANY and add aUNEVALLED. |
| 5899 | (DEFUN): Add braces around the union initialisation and use ## to | 5899 | (DEFUN): Add braces around the union initialization and use ## to |
| 5900 | specify the right union alternative and avoid a cast. | 5900 | specify the right union alternative and avoid a cast. |
| 5901 | 5901 | ||
| 5902 | 2010-07-18 Juanma Barranquero <lekktu@gmail.com> | 5902 | 2010-07-18 Juanma Barranquero <lekktu@gmail.com> |
| @@ -6604,9 +6604,9 @@ | |||
| 6604 | * keyboard.c (input_available_signal): Declare. | 6604 | * keyboard.c (input_available_signal): Declare. |
| 6605 | (kbd_buffer_nr_stored): New function. | 6605 | (kbd_buffer_nr_stored): New function. |
| 6606 | (kbd_buffer_store_event_hold): If kbd_buffer_nr_stored returns | 6606 | (kbd_buffer_store_event_hold): If kbd_buffer_nr_stored returns |
| 6607 | more than KBD_BUFFER_SIZE/2, stop reding input (Bug#6571). | 6607 | more than KBD_BUFFER_SIZE/2, stop reading input (Bug#6571). |
| 6608 | (kbd_buffer_get_event): If input is suspended and kbd_buffer_nr_stored | 6608 | (kbd_buffer_get_event): If input is suspended and kbd_buffer_nr_stored |
| 6609 | returns less than KBD_BUFFER_SIZE/4, resume reding input (Bug#6571). | 6609 | returns less than KBD_BUFFER_SIZE/4, resume reading input (Bug#6571). |
| 6610 | (tty_read_avail_input): If input is on hold, return. | 6610 | (tty_read_avail_input): If input is on hold, return. |
| 6611 | Don't read more that free slots in kbd_buffer (Bug#6571). | 6611 | Don't read more that free slots in kbd_buffer (Bug#6571). |
| 6612 | 6612 | ||
| @@ -7199,7 +7199,7 @@ | |||
| 7199 | 7199 | ||
| 7200 | 2010-06-27 Chong Yidong <cyd@stupidchicken.com> | 7200 | 2010-06-27 Chong Yidong <cyd@stupidchicken.com> |
| 7201 | 7201 | ||
| 7202 | * xfns.c (Fx_create_frame): Don't consult X resouces when setting | 7202 | * xfns.c (Fx_create_frame): Don't consult X resources when setting |
| 7203 | menu-bar-lines and tool-bar-lines. Use menu-bar-mode and | 7203 | menu-bar-lines and tool-bar-lines. Use menu-bar-mode and |
| 7204 | tool-bar-mode, which are now set using these X resources at | 7204 | tool-bar-mode, which are now set using these X resources at |
| 7205 | startup, to determine the defaults (Bug#2249). | 7205 | startup, to determine the defaults (Bug#2249). |
| @@ -7683,7 +7683,7 @@ | |||
| 7683 | 7683 | ||
| 7684 | 2010-05-20 Juri Linkov <juri@jurta.org> | 7684 | 2010-05-20 Juri Linkov <juri@jurta.org> |
| 7685 | 7685 | ||
| 7686 | * fileio.c (Fdelete_file): Change interative spec to use | 7686 | * fileio.c (Fdelete_file): Change interactive spec to use |
| 7687 | `read-file-name' like in `find-file-read-args' where the default | 7687 | `read-file-name' like in `find-file-read-args' where the default |
| 7688 | value is `default-directory' instead of `buffer-file-name'. | 7688 | value is `default-directory' instead of `buffer-file-name'. |
| 7689 | http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00533.html | 7689 | http://lists.gnu.org/archive/html/emacs-devel/2010-05/msg00533.html |
| @@ -8991,8 +8991,8 @@ | |||
| 8991 | 2010-04-13 Jan Djärv <jan.h.d@swipnet.se> | 8991 | 2010-04-13 Jan Djärv <jan.h.d@swipnet.se> |
| 8992 | 8992 | ||
| 8993 | * gtkutil.c (xg_set_geometry): Set geometry for PPosition also. | 8993 | * gtkutil.c (xg_set_geometry): Set geometry for PPosition also. |
| 8994 | (x_wm_set_size_hint): Dont set position flags, gtk_window_parse_geometry | 8994 | (x_wm_set_size_hint): Don't set position flags, |
| 8995 | does that. | 8995 | gtk_window_parse_geometry does that. |
| 8996 | 8996 | ||
| 8997 | * xfns.c (Fx_create_frame, x_create_tip_frame): Set default border width | 8997 | * xfns.c (Fx_create_frame, x_create_tip_frame): Set default border width |
| 8998 | to zero. | 8998 | to zero. |
| @@ -9266,7 +9266,7 @@ | |||
| 9266 | 9266 | ||
| 9267 | Get rid of the direct_output optimizations. | 9267 | Get rid of the direct_output optimizations. |
| 9268 | * keyboard.c (nonundocount): Remove extern declaration. | 9268 | * keyboard.c (nonundocount): Remove extern declaration. |
| 9269 | (command_loop_1): Remove brittle optimisation for cheap and | 9269 | (command_loop_1): Remove brittle optimization for cheap and |
| 9270 | common operations. | 9270 | common operations. |
| 9271 | * xdisp.c (redisplay_internal): Don't bother checking | 9271 | * xdisp.c (redisplay_internal): Don't bother checking |
| 9272 | redisplay_performed_directly_p any more. | 9272 | redisplay_performed_directly_p any more. |
| @@ -9864,8 +9864,8 @@ | |||
| 9864 | 9864 | ||
| 9865 | 2010-01-27 Jason Rumney <jasonr@gnu.org> | 9865 | 2010-01-27 Jason Rumney <jasonr@gnu.org> |
| 9866 | 9866 | ||
| 9867 | * w32inevt.c (w32_kbd_patch_key): Save the unicode character. | 9867 | * w32inevt.c (w32_kbd_patch_key): Save the Unicode character. |
| 9868 | (key_event): Use unicode for characters 128 and higher (Bug#4567). | 9868 | (key_event): Use Unicode for characters 128 and higher (Bug#4567). |
| 9869 | 9869 | ||
| 9870 | 2010-01-27 Kenichi Handa <handa@m17n.org> | 9870 | 2010-01-27 Kenichi Handa <handa@m17n.org> |
| 9871 | 9871 | ||
| @@ -11541,7 +11541,7 @@ | |||
| 11541 | (syms_of_nsfont): Declare it. | 11541 | (syms_of_nsfont): Declare it. |
| 11542 | (ns_registry_to_script): New function. | 11542 | (ns_registry_to_script): New function. |
| 11543 | (ns_get_req_script): Call it. | 11543 | (ns_get_req_script): Call it. |
| 11544 | (ns_findfonts): Don't give up on non-unicode registry. | 11544 | (ns_findfonts): Don't give up on non-Unicode registry. |
| 11545 | 11545 | ||
| 11546 | * font.c (DEFAULT_ENCODING) [HAVE_NS]: Remove special case. | 11546 | * font.c (DEFAULT_ENCODING) [HAVE_NS]: Remove special case. |
| 11547 | 11547 | ||
| @@ -11805,7 +11805,7 @@ | |||
| 11805 | * coding.c (encode_coding_utf_16): Fix checking of a Unicode | 11805 | * coding.c (encode_coding_utf_16): Fix checking of a Unicode |
| 11806 | character. | 11806 | character. |
| 11807 | 11807 | ||
| 11808 | * cmds.c (Fself_insert_command): Avoid unnecessay | 11808 | * cmds.c (Fself_insert_command): Avoid unnecessary |
| 11809 | unibyte->multibyte conversion. (Bug#4240) (Bug#4037) | 11809 | unibyte->multibyte conversion. (Bug#4240) (Bug#4037) |
| 11810 | 11810 | ||
| 11811 | 2009-08-26 Dan Nicolaescu <dann@ics.uci.edu> | 11811 | 2009-08-26 Dan Nicolaescu <dann@ics.uci.edu> |
| @@ -11923,7 +11923,7 @@ | |||
| 11923 | 11923 | ||
| 11924 | * process.c (status_notify): Don't perform redisplay. | 11924 | * process.c (status_notify): Don't perform redisplay. |
| 11925 | (Fdelete_process, list_processes_1, process_send_signal): | 11925 | (Fdelete_process, list_processes_1, process_send_signal): |
| 11926 | Expliticly perform redisplay. | 11926 | Explicitly perform redisplay. |
| 11927 | (wait_reading_process_output): Always check process status, but | 11927 | (wait_reading_process_output): Always check process status, but |
| 11928 | don't perform redisplay unless DO_DISPLAY is non-zero (Bug#2930). | 11928 | don't perform redisplay unless DO_DISPLAY is non-zero (Bug#2930). |
| 11929 | 11929 | ||
| @@ -12481,7 +12481,7 @@ | |||
| 12481 | 12481 | ||
| 12482 | * dbusbind.c (XD_SYMBOL_TO_DBUS_TYPE): Convert macro into function | 12482 | * dbusbind.c (XD_SYMBOL_TO_DBUS_TYPE): Convert macro into function |
| 12483 | xd_symbol_to_dbus_type. With Solaris 2.11, it was said to compile | 12483 | xd_symbol_to_dbus_type. With Solaris 2.11, it was said to compile |
| 12484 | for hours, when optimzation is enabled. | 12484 | for hours, when optimization is enabled. |
| 12485 | (xd_signature, xd_append_arg, xd_retrieve_arg, xd_initialize) | 12485 | (xd_signature, xd_append_arg, xd_retrieve_arg, xd_initialize) |
| 12486 | (xd_read_message): Make them static. | 12486 | (xd_read_message): Make them static. |
| 12487 | 12487 | ||
| @@ -13149,7 +13149,7 @@ | |||
| 13149 | (ftfont_has_char): Special handling of `ja' and `ko' adstyle. | 13149 | (ftfont_has_char): Special handling of `ja' and `ko' adstyle. |
| 13150 | 13150 | ||
| 13151 | * font.c (font_sort_entites): Change the meaning of the arg | 13151 | * font.c (font_sort_entites): Change the meaning of the arg |
| 13152 | BEST-ONLY. Don't optimize for VEC of lenght 1. | 13152 | BEST-ONLY. Don't optimize for VEC of length 1. |
| 13153 | (font_select_entity): Just return the value of font_sort_entites. | 13153 | (font_select_entity): Just return the value of font_sort_entites. |
| 13154 | 13154 | ||
| 13155 | * xfaces.c (merge_face_vectors): Reflect font properties in | 13155 | * xfaces.c (merge_face_vectors): Reflect font properties in |
| @@ -16072,7 +16072,7 @@ | |||
| 16072 | 2008-09-07 Andreas Schwab <schwab@suse.de> | 16072 | 2008-09-07 Andreas Schwab <schwab@suse.de> |
| 16073 | 16073 | ||
| 16074 | * callproc.c (Fcall_process): Don't hold references to string data | 16074 | * callproc.c (Fcall_process): Don't hold references to string data |
| 16075 | across garbage collection. Move initialisation of new_argv down | 16075 | across garbage collection. Move initialization of new_argv down |
| 16076 | to avoid compiler bug. | 16076 | to avoid compiler bug. |
| 16077 | 16077 | ||
| 16078 | 2008-09-07 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> | 16078 | 2008-09-07 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> |
| @@ -17147,10 +17147,10 @@ | |||
| 17147 | 17147 | ||
| 17148 | 2008-07-30 Jason Rumney <jasonr@gnu.org> | 17148 | 2008-07-30 Jason Rumney <jasonr@gnu.org> |
| 17149 | 17149 | ||
| 17150 | * w32font.h (struct w32font_info): Use unicode version of textmetrics. | 17150 | * w32font.h (struct w32font_info): Use Unicode version of textmetrics. |
| 17151 | 17151 | ||
| 17152 | * w32font.c (w32font_encode_char): Leave as unicode if in range. | 17152 | * w32font.c (w32font_encode_char): Leave as Unicode if in range. |
| 17153 | (w32font_open_internal): Get unicode version of textmetrics. | 17153 | (w32font_open_internal): Get Unicode version of textmetrics. |
| 17154 | Don't enable or disable glyph indices here. | 17154 | Don't enable or disable glyph indices here. |
| 17155 | (w32font_open): Disable use of glyph indices. | 17155 | (w32font_open): Disable use of glyph indices. |
| 17156 | 17156 | ||
| @@ -19178,7 +19178,7 @@ | |||
| 19178 | 2008-06-10 Jason Rumney <jasonr@gnu.org> | 19178 | 2008-06-10 Jason Rumney <jasonr@gnu.org> |
| 19179 | 19179 | ||
| 19180 | * w32uniscribe.c (add_opentype_font_name_to_list): | 19180 | * w32uniscribe.c (add_opentype_font_name_to_list): |
| 19181 | Skip non unicode fonts. | 19181 | Skip non Unicode fonts. |
| 19182 | 19182 | ||
| 19183 | 2008-06-10 Chong Yidong <cyd@stupidchicken.com> | 19183 | 2008-06-10 Chong Yidong <cyd@stupidchicken.com> |
| 19184 | 19184 | ||
| @@ -19248,7 +19248,7 @@ | |||
| 19248 | * w32menu.c (Fx_popup_menu): Unwind protect while building menu. | 19248 | * w32menu.c (Fx_popup_menu): Unwind protect while building menu. |
| 19249 | (parse_single_submenu): Remove. | 19249 | (parse_single_submenu): Remove. |
| 19250 | (digest_single_submenu): Remove. | 19250 | (digest_single_submenu): Remove. |
| 19251 | (syms_of_w32menu): Don't initialise variables that have moved | 19251 | (syms_of_w32menu): Don't initialize variables that have moved |
| 19252 | to menu.c. | 19252 | to menu.c. |
| 19253 | (set_frame_menubar): Sync with version in xmenu.c. | 19253 | (set_frame_menubar): Sync with version in xmenu.c. |
| 19254 | (w32_menu_show): Sync with xmenu_show in xmenu.c. | 19254 | (w32_menu_show): Sync with xmenu_show in xmenu.c. |
| @@ -19647,7 +19647,7 @@ | |||
| 19647 | `raster' specified. | 19647 | `raster' specified. |
| 19648 | (add_font_entity_to_list): Allow non-opentype truetype fonts back | 19648 | (add_font_entity_to_list): Allow non-opentype truetype fonts back |
| 19649 | in the uniscribe backend, but disallow any font that has no | 19649 | in the uniscribe backend, but disallow any font that has no |
| 19650 | unicode subrange support. | 19650 | Unicode subrange support. |
| 19651 | 19651 | ||
| 19652 | 2008-05-29 Juanma Barranquero <lekktu@gmail.com> | 19652 | 2008-05-29 Juanma Barranquero <lekktu@gmail.com> |
| 19653 | 19653 | ||
| @@ -21290,7 +21290,7 @@ | |||
| 21290 | (CACHE_BLOCKSIZE): New constants. | 21290 | (CACHE_BLOCKSIZE): New constants. |
| 21291 | 21291 | ||
| 21292 | * w32font.c (Qja, Qko, Qzh): New symbols. | 21292 | * w32font.c (Qja, Qko, Qzh): New symbols. |
| 21293 | (syms_of_w32font): Initialise them. | 21293 | (syms_of_w32font): Initialize them. |
| 21294 | (font_matches_spec): Use them to filter by language. | 21294 | (font_matches_spec): Use them to filter by language. |
| 21295 | (recompute_cached_metrics): Remove function. | 21295 | (recompute_cached_metrics): Remove function. |
| 21296 | (compute_metrics, clear_cached_metrics): New functions. | 21296 | (compute_metrics, clear_cached_metrics): New functions. |
| @@ -21813,8 +21813,8 @@ | |||
| 21813 | 2008-03-06 Jason Rumney <jasonr@gnu.org> | 21813 | 2008-03-06 Jason Rumney <jasonr@gnu.org> |
| 21814 | 21814 | ||
| 21815 | * w32font.c (w32_registry): Take font_type argument. Use ANSI | 21815 | * w32font.c (w32_registry): Take font_type argument. Use ANSI |
| 21816 | when charset not specified. Only translate ANSI to unicode when | 21816 | when charset not specified. Only translate ANSI to Unicode when |
| 21817 | font_type is truetype. | 21817 | font_type is TrueType. |
| 21818 | (w32font_coverage_ok): New function. | 21818 | (w32font_coverage_ok): New function. |
| 21819 | (add_font_entity_to_list): Use it to filter unsuitable fonts. | 21819 | (add_font_entity_to_list): Use it to filter unsuitable fonts. |
| 21820 | 21820 | ||
| @@ -22234,7 +22234,7 @@ | |||
| 22234 | * lisp.h (Fdelete_terminal): Declare. | 22234 | * lisp.h (Fdelete_terminal): Declare. |
| 22235 | 22235 | ||
| 22236 | * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID) | 22236 | * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID) |
| 22237 | (CHECK_CHARSET_GET_ATTR): Don't use the inexistent return value of | 22237 | (CHECK_CHARSET_GET_ATTR): Don't use the nonexistent return value of |
| 22238 | wrong_type_argument. | 22238 | wrong_type_argument. |
| 22239 | 22239 | ||
| 22240 | 2008-02-22 Kenichi Handa <handa@ni.aist.go.jp> | 22240 | 2008-02-22 Kenichi Handa <handa@ni.aist.go.jp> |
| @@ -23182,7 +23182,7 @@ | |||
| 23182 | * font.c (font_prop_validate_symbol, font_prop_validate_style) | 23182 | * font.c (font_prop_validate_symbol, font_prop_validate_style) |
| 23183 | (font_prop_validate_non_neg, font_prop_validate_spacing): | 23183 | (font_prop_validate_non_neg, font_prop_validate_spacing): |
| 23184 | Delete argument prop_index. | 23184 | Delete argument prop_index. |
| 23185 | (font_property_table): Change arguments to validater. Change Callers. | 23185 | (font_property_table): Change arguments to validator. Change Callers. |
| 23186 | (font_lispy_object): Delete. | 23186 | (font_lispy_object): Delete. |
| 23187 | (font_at): Use font_find_object instead fo font_lispy_object. | 23187 | (font_at): Use font_find_object instead fo font_lispy_object. |
| 23188 | 23188 | ||
| @@ -23463,10 +23463,10 @@ | |||
| 23463 | (w32font_list, w32font_match): Use it. | 23463 | (w32font_list, w32font_match): Use it. |
| 23464 | (w32font_open): Don't populate subranges. | 23464 | (w32font_open): Don't populate subranges. |
| 23465 | (w32font_has_char): Use script Lisp symbols, not subrange bitmask. | 23465 | (w32font_has_char): Use script Lisp symbols, not subrange bitmask. |
| 23466 | (w32font_encode_char): Always return unicode code-point as-is. | 23466 | (w32font_encode_char): Always return Unicode code-point as-is. |
| 23467 | (w32font_text_extents): Supply a transformation matrix to | 23467 | (w32font_text_extents): Supply a transformation matrix to |
| 23468 | GetGlyphOutline. Never look up by glyph index. Avoid looping | 23468 | GetGlyphOutline. Never look up by glyph index. Avoid looping |
| 23469 | twice. Use unicode version of GetTexExtentPoint32 instead of | 23469 | twice. Use Unicode version of GetTexExtentPoint32 instead of |
| 23470 | glyph index version. | 23470 | glyph index version. |
| 23471 | (set_fonts_frame): Remove. | 23471 | (set_fonts_frame): Remove. |
| 23472 | (w32_enumfont_pattern_entity): Add frame parameter, use it to | 23472 | (w32_enumfont_pattern_entity): Add frame parameter, use it to |
| @@ -25081,7 +25081,7 @@ | |||
| 25081 | * keymap.c (describe_vector): Handle default value of a char table. | 25081 | * keymap.c (describe_vector): Handle default value of a char table. |
| 25082 | 25082 | ||
| 25083 | * fontset.c (fontset_face): Handle fallback fonts correctly. | 25083 | * fontset.c (fontset_face): Handle fallback fonts correctly. |
| 25084 | (Ffontset_info): Return infomation about fallback fonts. | 25084 | (Ffontset_info): Return information about fallback fonts. |
| 25085 | 25085 | ||
| 25086 | 2008-02-01 Kenichi Handa <handa@m17n.org> | 25086 | 2008-02-01 Kenichi Handa <handa@m17n.org> |
| 25087 | 25087 | ||
| @@ -25425,16 +25425,16 @@ | |||
| 25425 | (pfnGetFontUnicodeRanges): New dynamically loaded function. | 25425 | (pfnGetFontUnicodeRanges): New dynamically loaded function. |
| 25426 | (w32_initialize): Try to load it. | 25426 | (w32_initialize): Try to load it. |
| 25427 | (x_get_font_repertory): Use it if available. | 25427 | (x_get_font_repertory): Use it if available. |
| 25428 | (w32_encode_char): Add shortcut for unicode output. | 25428 | (w32_encode_char): Add shortcut for Unicode output. |
| 25429 | 25429 | ||
| 25430 | * w32fns.c (w32_load_system_font): Default charset to -1. | 25430 | * w32fns.c (w32_load_system_font): Default charset to -1. |
| 25431 | (x_to_w32_charset): Match all fonts for unicode. | 25431 | (x_to_w32_charset): Match all fonts for Unicode. |
| 25432 | (w32_to_x_charset): New parameter matching. Don't return partial | 25432 | (w32_to_x_charset): New parameter matching. Don't return partial |
| 25433 | or wildcard charsets. | 25433 | or wildcard charsets. |
| 25434 | (w32_to_all_x_charsets): Don't return partial or wildcard charsets. | 25434 | (w32_to_all_x_charsets): Don't return partial or wildcard charsets. |
| 25435 | (w32_codepage_for_font): Return CP_UNICODE for unicode. | 25435 | (w32_codepage_for_font): Return CP_UNICODE for Unicode. |
| 25436 | (w32_to_x_font): Match charset to real charset. | 25436 | (w32_to_x_font): Match charset to real charset. |
| 25437 | (enum_font_cb2): Always list unicode versions. | 25437 | (enum_font_cb2): Always list Unicode versions. |
| 25438 | 25438 | ||
| 25439 | * makefile.w32-in (temacs): Increase EMHEAP. | 25439 | * makefile.w32-in (temacs): Increase EMHEAP. |
| 25440 | 25440 | ||
| @@ -25458,7 +25458,7 @@ | |||
| 25458 | 25458 | ||
| 25459 | * w32fns.c (Fx_create_frame, x_create_tip_frame): Use new version | 25459 | * w32fns.c (Fx_create_frame, x_create_tip_frame): Use new version |
| 25460 | of x_new_fontset. | 25460 | of x_new_fontset. |
| 25461 | (w32_load_system_font): Initialize charset as unicode. | 25461 | (w32_load_system_font): Initialize charset as Unicode. |
| 25462 | font_info.encoding becomes encoding_type. | 25462 | font_info.encoding becomes encoding_type. |
| 25463 | (w32_to_x_font): Use decode_coding_c_string in place of decode_coding. | 25463 | (w32_to_x_font): Use decode_coding_c_string in place of decode_coding. |
| 25464 | (x_to_w32_font): Use encode_coding_object in place of encode_coding. | 25464 | (x_to_w32_font): Use encode_coding_object in place of encode_coding. |
| @@ -27366,7 +27366,7 @@ | |||
| 27366 | 27366 | ||
| 27367 | * ccl.c: Include "character.h". | 27367 | * ccl.c: Include "character.h". |
| 27368 | (Qccl, Qcclp): New variables. | 27368 | (Qccl, Qcclp): New variables. |
| 27369 | (CCL_WRITE_CHAR): Alway treat the arg CH as a character even if | 27369 | (CCL_WRITE_CHAR): Always treat the arg CH as a character even if |
| 27370 | it's less than 256. | 27370 | it's less than 256. |
| 27371 | (CCL_WRITE_MULTIBYTE_CHAR): Delete. | 27371 | (CCL_WRITE_MULTIBYTE_CHAR): Delete. |
| 27372 | (CCL_WRITE_STRING, CCL_READ_CHAR): Adjust for the change of SRC | 27372 | (CCL_WRITE_STRING, CCL_READ_CHAR): Adjust for the change of SRC |
| @@ -27685,7 +27685,7 @@ | |||
| 27685 | * xterm.c (handle_one_xevent): Revert to counting chars not bytes. | 27685 | * xterm.c (handle_one_xevent): Revert to counting chars not bytes. |
| 27686 | 27686 | ||
| 27687 | * w32term.c (w32_read_socket) <WM_CHAR>: Decode characters outside | 27687 | * w32term.c (w32_read_socket) <WM_CHAR>: Decode characters outside |
| 27688 | the unicode range available in MULE by locale-coding-system. | 27688 | the Unicode range available in MULE by locale-coding-system. |
| 27689 | Improve dbcs lead byte detection. Set event timestamp and modifiers | 27689 | Improve dbcs lead byte detection. Set event timestamp and modifiers |
| 27690 | earlier. | 27690 | earlier. |
| 27691 | 27691 | ||
| @@ -29136,7 +29136,7 @@ | |||
| 29136 | 29136 | ||
| 29137 | * lisp.h (defvar_per_buffer, DEFVAR_PER_BUFFER): | 29137 | * lisp.h (defvar_per_buffer, DEFVAR_PER_BUFFER): |
| 29138 | * lread.c (defvar_per_buffer): | 29138 | * lread.c (defvar_per_buffer): |
| 29139 | * abbrev.c (syms_of_abbrev) <local-abbrev-tabl>: Move to buffer.c. | 29139 | * abbrev.c (syms_of_abbrev) <local-abbrev-table>: Move to buffer.c. |
| 29140 | 29140 | ||
| 29141 | * window.c (candidate_window_p): Only consider as visible frames that | 29141 | * window.c (candidate_window_p): Only consider as visible frames that |
| 29142 | are on the same terminal. | 29142 | are on the same terminal. |
| @@ -29651,7 +29651,7 @@ | |||
| 29651 | 29651 | ||
| 29652 | * callproc.c (child_setup, getenv_internal): Use the | 29652 | * callproc.c (child_setup, getenv_internal): Use the |
| 29653 | display-environment-variable and term-environment-variable frame params. | 29653 | display-environment-variable and term-environment-variable frame params. |
| 29654 | (set_initial_environment): Initialise Vprocess_environment. | 29654 | (set_initial_environment): Initialize Vprocess_environment. |
| 29655 | 29655 | ||
| 29656 | * config.in: Disable multi-keyboard support on a mac. | 29656 | * config.in: Disable multi-keyboard support on a mac. |
| 29657 | 29657 | ||
| @@ -30873,7 +30873,7 @@ | |||
| 30873 | 2007-06-17 Jason Rumney <jasonr@gnu.org> | 30873 | 2007-06-17 Jason Rumney <jasonr@gnu.org> |
| 30874 | 30874 | ||
| 30875 | * w32menu.c (add_menu_item): Don't use multibyte string functions on | 30875 | * w32menu.c (add_menu_item): Don't use multibyte string functions on |
| 30876 | unicode strings. | 30876 | Unicode strings. |
| 30877 | 30877 | ||
| 30878 | 2007-06-16 Juanma Barranquero <lekktu@gmail.com> | 30878 | 2007-06-16 Juanma Barranquero <lekktu@gmail.com> |
| 30879 | 30879 | ||
| @@ -30892,7 +30892,7 @@ | |||
| 30892 | 2007-06-14 Jason Rumney <jasonr@gnu.org> | 30892 | 2007-06-14 Jason Rumney <jasonr@gnu.org> |
| 30893 | 30893 | ||
| 30894 | * w32.c (get_process_times_fn): New function pointer. | 30894 | * w32.c (get_process_times_fn): New function pointer. |
| 30895 | (globals_of_w32): Intialize it if present in kernel32.dll. | 30895 | (globals_of_w32): Initialize it if present in kernel32.dll. |
| 30896 | (w32_get_internal_run_time): New function. | 30896 | (w32_get_internal_run_time): New function. |
| 30897 | 30897 | ||
| 30898 | * editfns.c (Fget_internal_run_time) [WINDOWSNT]: Use it. | 30898 | * editfns.c (Fget_internal_run_time) [WINDOWSNT]: Use it. |
| @@ -31298,7 +31298,7 @@ | |||
| 31298 | (term_mouse_highlight, term_mouse_movement, term_mouse_position) | 31298 | (term_mouse_highlight, term_mouse_movement, term_mouse_position) |
| 31299 | (term_mouse_click, handle_one_term_event, Fterm_open_connection) | 31299 | (term_mouse_click, handle_one_term_event, Fterm_open_connection) |
| 31300 | (Fterm_close_connection): New functions. | 31300 | (Fterm_close_connection): New functions. |
| 31301 | (term_init): Initialise mouse_face_window. | 31301 | (term_init): Initialize mouse_face_window. |
| 31302 | 31302 | ||
| 31303 | 2007-05-19 Chong Yidong <cyd@stupidchicken.com> | 31303 | 2007-05-19 Chong Yidong <cyd@stupidchicken.com> |
| 31304 | 31304 | ||
| @@ -31330,7 +31330,7 @@ | |||
| 31330 | 31330 | ||
| 31331 | 2007-05-12 Chong Yidong <cyd@stupidchicken.com> | 31331 | 2007-05-12 Chong Yidong <cyd@stupidchicken.com> |
| 31332 | 31332 | ||
| 31333 | * image.c (pbm_load): Correctly check image size for greyscale pbm. | 31333 | * image.c (pbm_load): Correctly check image size for grayscale pbm. |
| 31334 | 31334 | ||
| 31335 | * xterm.c (XTread_socket): Yet Another Uncaught X Error Crash (YAUXEC). | 31335 | * xterm.c (XTread_socket): Yet Another Uncaught X Error Crash (YAUXEC). |
| 31336 | 31336 | ||
diff --git a/src/ChangeLog.2 b/src/ChangeLog.2 index 05e448c043c..ba61c337efc 100644 --- a/src/ChangeLog.2 +++ b/src/ChangeLog.2 | |||
| @@ -1152,7 +1152,7 @@ | |||
| 1152 | 1152 | ||
| 1153 | 1987-07-29 Richard Mlynarik (mly@prep) | 1153 | 1987-07-29 Richard Mlynarik (mly@prep) |
| 1154 | 1154 | ||
| 1155 | * lread.c (init_read): Initialise load_in_progress. | 1155 | * lread.c (init_read): Initialize load_in_progress. |
| 1156 | 1156 | ||
| 1157 | 1987-07-28 Richard M. Stallman (rms@prep) | 1157 | 1987-07-28 Richard M. Stallman (rms@prep) |
| 1158 | 1158 | ||
| @@ -1811,7 +1811,7 @@ | |||
| 1811 | 1987-03-13 Richard M. Stallman (rms@prep) | 1811 | 1987-03-13 Richard M. Stallman (rms@prep) |
| 1812 | 1812 | ||
| 1813 | * sysdep.c: Don't redefine TCSETAW if already defined. | 1813 | * sysdep.c: Don't redefine TCSETAW if already defined. |
| 1814 | (Cancelled by change on March 17). | 1814 | (Canceled by change on March 17). |
| 1815 | 1815 | ||
| 1816 | * sunfns.c: New file containing interface to Sun windows. | 1816 | * sunfns.c: New file containing interface to Sun windows. |
| 1817 | This is enabled by the switch HAVE_SUN_WINDOWS. | 1817 | This is enabled by the switch HAVE_SUN_WINDOWS. |
| @@ -2251,7 +2251,7 @@ | |||
| 2251 | 1987-01-16 Richard Mlynarik (mly@prep) | 2251 | 1987-01-16 Richard Mlynarik (mly@prep) |
| 2252 | 2252 | ||
| 2253 | * xfns.c (Fx_set_{background,cursor,mouse}_color): | 2253 | * xfns.c (Fx_set_{background,cursor,mouse}_color): |
| 2254 | Initialise save_color. | 2254 | Initialize save_color. |
| 2255 | 2255 | ||
| 2256 | * fileio.c, search.c, sysdep.c, filelock.c, editfns.c, process.c: | 2256 | * fileio.c, search.c, sysdep.c, filelock.c, editfns.c, process.c: |
| 2257 | Delete/replace unused/conditionalised variables | 2257 | Delete/replace unused/conditionalised variables |
| @@ -3002,7 +3002,7 @@ | |||
| 3002 | 1986-11-18 Richard Mlynarik (mly@prep) | 3002 | 1986-11-18 Richard Mlynarik (mly@prep) |
| 3003 | 3003 | ||
| 3004 | * emacs.c (main): | 3004 | * emacs.c (main): |
| 3005 | Giving `inhibit_x_windows' an initialisation loses; | 3005 | Giving `inhibit_x_windows' an initialization loses; |
| 3006 | do it explicitly. | 3006 | do it explicitly. |
| 3007 | 3007 | ||
| 3008 | * xfns.c (Fx_rubber_band): | 3008 | * xfns.c (Fx_rubber_band): |
| @@ -3291,7 +3291,7 @@ | |||
| 3291 | 1986-11-03 Richard Mlynarik (mly@prep) | 3291 | 1986-11-03 Richard Mlynarik (mly@prep) |
| 3292 | 3292 | ||
| 3293 | * xterm.c (stufflines): | 3293 | * xterm.c (stufflines): |
| 3294 | Initialise signal mask. | 3294 | Initialize signal mask. |
| 3295 | 3295 | ||
| 3296 | * xterm.h: | 3296 | * xterm.h: |
| 3297 | Add definition of sigmask | 3297 | Add definition of sigmask |
| @@ -3346,7 +3346,7 @@ | |||
| 3346 | New function. | 3346 | New function. |
| 3347 | 3347 | ||
| 3348 | * window.c (Fset_window_hscroll): | 3348 | * window.c (Fset_window_hscroll): |
| 3349 | Don't inhibit redisplay optimisations if hscroll is same. | 3349 | Don't inhibit redisplay optimizations if hscroll is same. |
| 3350 | 3350 | ||
| 3351 | * ymakefile: | 3351 | * ymakefile: |
| 3352 | rm ../etc/DOC to avoid make-docfile overwriting any files which | 3352 | rm ../etc/DOC to avoid make-docfile overwriting any files which |
| @@ -3358,7 +3358,7 @@ | |||
| 3358 | VMS changes from Sasaki | 3358 | VMS changes from Sasaki |
| 3359 | 3359 | ||
| 3360 | * termcap.c (tgetent): | 3360 | * termcap.c (tgetent): |
| 3361 | Make sure `indirect' initialised. | 3361 | Make sure `indirect' initialized. |
| 3362 | 3362 | ||
| 3363 | * xfns.c (grey_p and callers): | 3363 | * xfns.c (grey_p and callers): |
| 3364 | New function to compensate for ugly chauvinistic American | 3364 | New function to compensate for ugly chauvinistic American |
| @@ -3496,7 +3496,7 @@ | |||
| 3496 | core-dump) | 3496 | core-dump) |
| 3497 | 3497 | ||
| 3498 | Dike out global-minor-modes. This wasn't actually being used by | 3498 | Dike out global-minor-modes. This wasn't actually being used by |
| 3499 | anything (due to a bug) and wasn't even being initialised! | 3499 | anything (due to a bug) and wasn't even being initialized! |
| 3500 | minor-mode-alist does what this thought it was doing. | 3500 | minor-mode-alist does what this thought it was doing. |
| 3501 | 3501 | ||
| 3502 | 1986-10-11 Richard Mlynarik (mly@prep) | 3502 | 1986-10-11 Richard Mlynarik (mly@prep) |
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3 index cdfe63fc59c..34906e505da 100644 --- a/src/ChangeLog.3 +++ b/src/ChangeLog.3 | |||
| @@ -3271,7 +3271,7 @@ | |||
| 3271 | [not HAVE_X11] (x_set_border_pixel): Use gray_width and | 3271 | [not HAVE_X11] (x_set_border_pixel): Use gray_width and |
| 3272 | gray_height, instead of assuming that the bitmap is 16x16. | 3272 | gray_height, instead of assuming that the bitmap is 16x16. |
| 3273 | (x_make_gc): Instead of creating a pixmap and then calling | 3273 | (x_make_gc): Instead of creating a pixmap and then calling |
| 3274 | XPutImage to make it into a grey stipple, just call | 3274 | XPutImage to make it into a gray stipple, just call |
| 3275 | XCreatePixmapFromBitmapData to do it all at once. | 3275 | XCreatePixmapFromBitmapData to do it all at once. |
| 3276 | 3276 | ||
| 3277 | * xterm.c (x_text_icon): Move the request for font information | 3277 | * xterm.c (x_text_icon): Move the request for font information |
| @@ -6089,7 +6089,7 @@ | |||
| 6089 | shrink below the minimum, this code would only try to delete it if | 6089 | shrink below the minimum, this code would only try to delete it if |
| 6090 | it had a parent. Well, even if the window doesn't have a parent, | 6090 | it had a parent. Well, even if the window doesn't have a parent, |
| 6091 | you want Fdelete_window to signal an error, since you're trying to | 6091 | you want Fdelete_window to signal an error, since you're trying to |
| 6092 | resize one of the undeleteable windows into nothingness. So call | 6092 | resize one of the undeletable windows into nothingness. So call |
| 6093 | Fdelete_window even if the window doesn't have a parent. | 6093 | Fdelete_window even if the window doesn't have a parent. |
| 6094 | 6094 | ||
| 6095 | * window.c (MINSIZE): Add kludge so that the minibuffer is always | 6095 | * window.c (MINSIZE): Add kludge so that the minibuffer is always |
| @@ -9010,7 +9010,7 @@ | |||
| 9010 | * keyboard.c (cmd_error): If an error occurs before somebody has | 9010 | * keyboard.c (cmd_error): If an error occurs before somebody has |
| 9011 | provided a screen to print it on, print it to stderr and exit | 9011 | provided a screen to print it on, print it to stderr and exit |
| 9012 | Emacs. Handle batch-mode errors with the same code. | 9012 | Emacs. Handle batch-mode errors with the same code. |
| 9013 | * lisp.h (Qexternal_debugging_ouput): New extern declaration, for | 9013 | * lisp.h (Qexternal_debugging_output): New extern declaration, for |
| 9014 | use in cmd_error. | 9014 | use in cmd_error. |
| 9015 | 9015 | ||
| 9016 | * screen.c (Fscreen_pixel_size, Fset_screen_position): Doc fix. | 9016 | * screen.c (Fscreen_pixel_size, Fset_screen_position): Doc fix. |
| @@ -13137,7 +13137,7 @@ | |||
| 13137 | * print.c: Include dispextern.h. | 13137 | * print.c: Include dispextern.h. |
| 13138 | (printchar, strout): Use message_buf. | 13138 | (printchar, strout): Use message_buf. |
| 13139 | 13139 | ||
| 13140 | * sysdep.c (get_screen_size): Don't use MscreenWidth, MscreenLenght. | 13140 | * sysdep.c (get_screen_size): Don't use MscreenWidth, MscreenLength. |
| 13141 | * term.c: Likewise. | 13141 | * term.c: Likewise. |
| 13142 | 13142 | ||
| 13143 | * scroll.c (CalcIDCosts, CalcIDCosts1, CalcLID): These now take a | 13143 | * scroll.c (CalcIDCosts, CalcIDCosts1, CalcLID): These now take a |
| @@ -13147,7 +13147,7 @@ | |||
| 13147 | (do_scrolling): Use alloca for queue. | 13147 | (do_scrolling): Use alloca for queue. |
| 13148 | 13148 | ||
| 13149 | * dispnew.c (remake_screen_structures): Allocate message_buf. | 13149 | * dispnew.c (remake_screen_structures): Allocate message_buf. |
| 13150 | Don't use MscreenWidth, MscreenLenght. | 13150 | Don't use MscreenWidth, MscreenLength. |
| 13151 | 13151 | ||
| 13152 | * xdisp.c: bf_cur replaced with current_buffer. | 13152 | * xdisp.c: bf_cur replaced with current_buffer. |
| 13153 | Calls to SetBfx deleted. | 13153 | Calls to SetBfx deleted. |
| @@ -14880,7 +14880,7 @@ | |||
| 14880 | 14880 | ||
| 14881 | 1989-08-09 Joseph Arceneaux (jla@spiff) | 14881 | 1989-08-09 Joseph Arceneaux (jla@spiff) |
| 14882 | 14882 | ||
| 14883 | * ../oldXMenu/Makefile: Removed all the unneccessary X stuff. | 14883 | * ../oldXMenu/Makefile: Removed all the unnecessary X stuff. |
| 14884 | 14884 | ||
| 14885 | 1989-08-07 Richard Stallman (rms@sugar-bombs.ai.mit.edu) | 14885 | 1989-08-07 Richard Stallman (rms@sugar-bombs.ai.mit.edu) |
| 14886 | 14886 | ||
diff --git a/src/ChangeLog.4 b/src/ChangeLog.4 index 208d9c2cdb0..88c9e3dbf71 100644 --- a/src/ChangeLog.4 +++ b/src/ChangeLog.4 | |||
| @@ -3656,7 +3656,7 @@ | |||
| 3656 | 3656 | ||
| 3657 | * m/delta.h (BROKEN_CLOSEDIR): Added because closedir is interruptible. | 3657 | * m/delta.h (BROKEN_CLOSEDIR): Added because closedir is interruptible. |
| 3658 | (HAVE_UNISTD_H): Deleted because configure takes care of it. | 3658 | (HAVE_UNISTD_H): Deleted because configure takes care of it. |
| 3659 | (C_SWITCH_MACHINE): Added optimisation options for gnu cc. | 3659 | (C_SWITCH_MACHINE): Added optimization options for gnu cc. |
| 3660 | 3660 | ||
| 3661 | 1993-12-17 Mike Long (mike.long@analog.com) | 3661 | 1993-12-17 Mike Long (mike.long@analog.com) |
| 3662 | 3662 | ||
| @@ -5007,7 +5007,7 @@ | |||
| 5007 | Change display code to handle the `invisible' text property. | 5007 | Change display code to handle the `invisible' text property. |
| 5008 | * dispnew.c (direct_output_for_insert): Fail if character | 5008 | * dispnew.c (direct_output_for_insert): Fail if character |
| 5009 | just inserted has text properties. | 5009 | just inserted has text properties. |
| 5010 | (direct_ouput_forward_char): Fail if moving near invisible chars. | 5010 | (direct_output_forward_char): Fail if moving near invisible chars. |
| 5011 | * indent.c (compute_motion): Compute correctly for invisible text. | 5011 | * indent.c (compute_motion): Compute correctly for invisible text. |
| 5012 | (vmotion): Take care of invisible newlines. | 5012 | (vmotion): Take care of invisible newlines. |
| 5013 | * intervals.c (set_point): Ignore `invisible' property | 5013 | * intervals.c (set_point): Ignore `invisible' property |
diff --git a/src/ChangeLog.5 b/src/ChangeLog.5 index 1f21e9fb99c..ee79917a34d 100644 --- a/src/ChangeLog.5 +++ b/src/ChangeLog.5 | |||
| @@ -3463,7 +3463,7 @@ | |||
| 3463 | 3463 | ||
| 3464 | * lisp.h (running_asynch_code): New global flag. | 3464 | * lisp.h (running_asynch_code): New global flag. |
| 3465 | * emacs.c (running_asynch_code): New global flag. | 3465 | * emacs.c (running_asynch_code): New global flag. |
| 3466 | (main): Initialise it. | 3466 | (main): Initialize it. |
| 3467 | * process.c (read_process_output, exec_sentinel): Set and | 3467 | * process.c (read_process_output, exec_sentinel): Set and |
| 3468 | reset the running_asynch_code global flag and restore match data. | 3468 | reset the running_asynch_code global flag and restore match data. |
| 3469 | 3469 | ||
diff --git a/src/ChangeLog.6 b/src/ChangeLog.6 index 141a570040c..74141f6813a 100644 --- a/src/ChangeLog.6 +++ b/src/ChangeLog.6 | |||
| @@ -718,7 +718,7 @@ | |||
| 718 | (init_ntproc) [HAVE_SOCKETS]: Only load winsock library on startup | 718 | (init_ntproc) [HAVE_SOCKETS]: Only load winsock library on startup |
| 719 | if PRELOAD_WINSOCK is set in environment (or registry). | 719 | if PRELOAD_WINSOCK is set in environment (or registry). |
| 720 | 720 | ||
| 721 | * ntproc.c (Fwin32_has_winsock, Fwin32_unload_winsock) | 721 | * ntproc.c (Fwin32_has_winsock, Fwin32_unload_winsock) |
| 722 | [HAVE_SOCKETS]: New functions. | 722 | [HAVE_SOCKETS]: New functions. |
| 723 | (syms_of_ntproc) [HAVE_SOCKETS]: defsubr them. | 723 | (syms_of_ntproc) [HAVE_SOCKETS]: defsubr them. |
| 724 | 724 | ||
| @@ -845,7 +845,7 @@ | |||
| 845 | (timer_id): Renamed to mouse_button_timer. | 845 | (timer_id): Renamed to mouse_button_timer. |
| 846 | (saved_mouse_move_msg, mouse_move_timer): New variables. | 846 | (saved_mouse_move_msg, mouse_move_timer): New variables. |
| 847 | (win_msg_worker): Delete WM_TIMER code. | 847 | (win_msg_worker): Delete WM_TIMER code. |
| 848 | (win32_wnd_proc): Handle WM_TIMER events here. Use separate timers | 848 | (win32_wnd_proc): Handle WM_TIMER events here. Use separate timers |
| 849 | for mouse down and mouse move (including scroll bar drag) events. | 849 | for mouse down and mouse move (including scroll bar drag) events. |
| 850 | Add new handling code for WM_VSCROLL and WM_MOUSEMOVE events. | 850 | Add new handling code for WM_VSCROLL and WM_MOUSEMOVE events. |
| 851 | Only filter WM_MOUSEMOVE events when a button is held down. | 851 | Only filter WM_MOUSEMOVE events when a button is held down. |
| @@ -1100,17 +1100,17 @@ | |||
| 1100 | 1100 | ||
| 1101 | (nt_sleep): Renamed to sys_sleep. | 1101 | (nt_sleep): Renamed to sys_sleep. |
| 1102 | 1102 | ||
| 1103 | (rename): Renamed to sys_rename. Always rename to a temporary name | 1103 | (rename): Renamed to sys_rename. Always rename to a temporary name |
| 1104 | first on Windows 95. Unlink new name first if necessary. | 1104 | first on Windows 95. Unlink new name first if necessary. |
| 1105 | 1105 | ||
| 1106 | (dir_finding): Variable deleted. | 1106 | (dir_finding): Variable deleted. |
| 1107 | (dir_is_fat, dir_pathname): New variables. | 1107 | (dir_is_fat, dir_pathname): New variables. |
| 1108 | 1108 | ||
| 1109 | (openddir): Fail if dir_find_handle is in use. Save directory name | 1109 | (openddir): Fail if dir_find_handle is in use. Save directory name |
| 1110 | in dir_pathname, and set dir_is_fat appropriately. | 1110 | in dir_pathname, and set dir_is_fat appropriately. |
| 1111 | (closedir, readdir): Use dir_find_handle in place of dir_finding. | 1111 | (closedir, readdir): Use dir_find_handle in place of dir_finding. |
| 1112 | (readdir): Copy directory name from dir_pathname on first | 1112 | (readdir): Copy directory name from dir_pathname on first |
| 1113 | call. Use IS_DIRECTORY_SEP instead of IS_ANY_SEP. Force filename | 1113 | call. Use IS_DIRECTORY_SEP instead of IS_ANY_SEP. Force filename |
| 1114 | to be lower case on FAT volumes. | 1114 | to be lower case on FAT volumes. |
| 1115 | 1115 | ||
| 1116 | (getpwuid): Move struct passwd initialization to init_user_info, | 1116 | (getpwuid): Move struct passwd initialization to init_user_info, |
| @@ -1141,7 +1141,7 @@ | |||
| 1141 | (get_emacs_configuration): Detect Windows flavor (Windows 95 or | 1141 | (get_emacs_configuration): Detect Windows flavor (Windows 95 or |
| 1142 | NT) at run-time. Change OS name for Windows 95 to be "win95". | 1142 | NT) at run-time. Change OS name for Windows 95 to be "win95". |
| 1143 | 1143 | ||
| 1144 | (fd_info): New variable. Array of extra info for file descriptors | 1144 | (fd_info): New variable. Array of extra info for file descriptors |
| 1145 | needed for pipe/socket support. | 1145 | needed for pipe/socket support. |
| 1146 | 1146 | ||
| 1147 | (utc_base_ft, utc_base, init): New internal variables used for | 1147 | (utc_base_ft, utc_base, init): New internal variables used for |
| @@ -1182,7 +1182,7 @@ | |||
| 1182 | support in sys_select. | 1182 | support in sys_select. |
| 1183 | 1183 | ||
| 1184 | (term_ntproc): New function. | 1184 | (term_ntproc): New function. |
| 1185 | (init_ntproc): New function to initialise socket support and make | 1185 | (init_ntproc): New function to initialize socket support and make |
| 1186 | initial std handles non-inheritable. Also ensure stdin, stdout | 1186 | initial std handles non-inheritable. Also ensure stdin, stdout |
| 1187 | and stderr have valid handles so that pipes and sockets can't | 1187 | and stderr have valid handles so that pipes and sockets can't |
| 1188 | inadvertently use fd 0, 1, or 2. | 1188 | inadvertently use fd 0, 1, or 2. |
| @@ -1206,7 +1206,7 @@ | |||
| 1206 | * ntinevt.c (win32_kdb_patch_key): Initialize isdead. | 1206 | * ntinevt.c (win32_kdb_patch_key): Initialize isdead. |
| 1207 | (key_event) [HAVE_NTGUI]: Use Windows key code. | 1207 | (key_event) [HAVE_NTGUI]: Use Windows key code. |
| 1208 | 1208 | ||
| 1209 | * ntproc.c: Include config.h after CRT headers. Include fcntl.h. | 1209 | * ntproc.c: Include config.h after CRT headers. Include fcntl.h. |
| 1210 | (child_process, MAX_CHILDREN, CHILD_ACTIVE): Moved to nt.h. | 1210 | (child_process, MAX_CHILDREN, CHILD_ACTIVE): Moved to nt.h. |
| 1211 | (DebugPrint): New macro. | 1211 | (DebugPrint): New macro. |
| 1212 | (new_child): Create input event structures for child processes. | 1212 | (new_child): Create input event structures for child processes. |
| @@ -1440,7 +1440,7 @@ | |||
| 1440 | Correctly detect when default_directory is absolute. | 1440 | Correctly detect when default_directory is absolute. |
| 1441 | Be strict when looking for MSDOS drive specifier; defer calling | 1441 | Be strict when looking for MSDOS drive specifier; defer calling |
| 1442 | getdefdir. Ignore drive specifier if name now has UNC prefix. | 1442 | getdefdir. Ignore drive specifier if name now has UNC prefix. |
| 1443 | Correctly recognise if name is not absolute when trying simple | 1443 | Correctly recognize if name is not absolute when trying simple |
| 1444 | method to expand; return original string if possible. | 1444 | method to expand; return original string if possible. |
| 1445 | Skip dir sep after ~ or ~user. | 1445 | Skip dir sep after ~ or ~user. |
| 1446 | Use getpwnam instead of HOME for ~user on NT. | 1446 | Use getpwnam instead of HOME for ~user on NT. |
| @@ -2580,7 +2580,7 @@ | |||
| 2580 | (win32_fill_rect, dumpglyphs, do_line_dance, x_draw_box): | 2580 | (win32_fill_rect, dumpglyphs, do_line_dance, x_draw_box): |
| 2581 | Use Get/ReleaseFrameDC. | 2581 | Use Get/ReleaseFrameDC. |
| 2582 | (win32_update_begin): Regenerate palette if required. | 2582 | (win32_update_begin): Regenerate palette if required. |
| 2583 | (w32_read_socket): Use FALSE. Handle WM_PALETTECHANGED. | 2583 | (w32_read_socket): Use FALSE. Handle WM_PALETTECHANGED. |
| 2584 | (win32_term_init): Use GetDC directly. | 2584 | (win32_term_init): Use GetDC directly. |
| 2585 | Enable palette in display structure. | 2585 | Enable palette in display structure. |
| 2586 | Predefine white and black. | 2586 | Predefine white and black. |
| @@ -4501,7 +4501,7 @@ | |||
| 4501 | * msdos.c (putchar): Call internal_flush instead of _flsbuf. | 4501 | * msdos.c (putchar): Call internal_flush instead of _flsbuf. |
| 4502 | (DO_TERMSCRIPT): New macro to support open-termscript. | 4502 | (DO_TERMSCRIPT): New macro to support open-termscript. |
| 4503 | (internal_flush): Corrected handling of flush in middle of | 4503 | (internal_flush): Corrected handling of flush in middle of |
| 4504 | escape sequences. Handle screen width > 127. | 4504 | escape sequences. Handle screen width > 127. |
| 4505 | (flush_escape): New function for use by internal_flush. | 4505 | (flush_escape): New function for use by internal_flush. |
| 4506 | (sys_select): New MS-DOS specific version with us timing. | 4506 | (sys_select): New MS-DOS specific version with us timing. |
| 4507 | (EMACSCOLORS): New environment variable. | 4507 | (EMACSCOLORS): New environment variable. |
diff --git a/src/ChangeLog.7 b/src/ChangeLog.7 index 73d0d45e9c1..fc97acdeb1e 100644 --- a/src/ChangeLog.7 +++ b/src/ChangeLog.7 | |||
| @@ -5774,7 +5774,7 @@ | |||
| 5774 | 5774 | ||
| 5775 | (w32_initialize): Set input mode. Use w32_msg_worker instead | 5775 | (w32_initialize): Set input mode. Use w32_msg_worker instead |
| 5776 | of windows_msg_worker. Dynamically link proportional scroll bar | 5776 | of windows_msg_worker. Dynamically link proportional scroll bar |
| 5777 | functions and intialize proportional scroll bar variables. | 5777 | functions and initialize proportional scroll bar variables. |
| 5778 | (syms_of_w32term): DEFVAR new variables. | 5778 | (syms_of_w32term): DEFVAR new variables. |
| 5779 | 5779 | ||
| 5780 | * w32term.h (w32_output): New fields menubar_widget, menubar_active, | 5780 | * w32term.h (w32_output): New fields menubar_widget, menubar_active, |
| @@ -10963,7 +10963,7 @@ | |||
| 10963 | 1996-08-28 Morten Welinder <terra@diku.dk> | 10963 | 1996-08-28 Morten Welinder <terra@diku.dk> |
| 10964 | 10964 | ||
| 10965 | * minibuf.c (Vhistory_length, Qhistory_length): New variables. | 10965 | * minibuf.c (Vhistory_length, Qhistory_length): New variables. |
| 10966 | (syms_of_minibuf): Register and initialise these. | 10966 | (syms_of_minibuf): Register and initialize these. |
| 10967 | (read_minibuf): Truncate history list if needed. | 10967 | (read_minibuf): Truncate history list if needed. |
| 10968 | 10968 | ||
| 10969 | 1996-08-28 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> | 10969 | 1996-08-28 Richard Stallman <rms@psilocin.gnu.ai.mit.edu> |
diff --git a/src/ChangeLog.8 b/src/ChangeLog.8 index 00e4a1f62c8..6a48b09e64b 100644 --- a/src/ChangeLog.8 +++ b/src/ChangeLog.8 | |||
| @@ -2723,7 +2723,7 @@ | |||
| 2723 | (CURSOR_FACE_ID, MOUSE_FACE_ID): New. | 2723 | (CURSOR_FACE_ID, MOUSE_FACE_ID): New. |
| 2724 | 2724 | ||
| 2725 | * xfaces.c (Qscroll_bar, Qcursor, Qborder, Qmouse): New. | 2725 | * xfaces.c (Qscroll_bar, Qcursor, Qborder, Qmouse): New. |
| 2726 | (syms_of_xfaces): Intialize new symbols. | 2726 | (syms_of_xfaces): Initialize new symbols. |
| 2727 | 2727 | ||
| 2728 | * fns.c (Fmakehash): Take one argument, test, make all the | 2728 | * fns.c (Fmakehash): Take one argument, test, make all the |
| 2729 | rest keyword arguments. | 2729 | rest keyword arguments. |
| @@ -5409,7 +5409,7 @@ | |||
| 5409 | 5409 | ||
| 5410 | 1998-11-10 Gerd Moellmann <gerd@gnu.org> | 5410 | 1998-11-10 Gerd Moellmann <gerd@gnu.org> |
| 5411 | 5411 | ||
| 5412 | * xrdb.c (x_load_resources): Add grey background colors as | 5412 | * xrdb.c (x_load_resources): Add gray background colors as |
| 5413 | defaults for menus, scroll bars, and dialogs. | 5413 | defaults for menus, scroll bars, and dialogs. |
| 5414 | 5414 | ||
| 5415 | * insdel.c (prepare_to_modify_buffer): Move setting | 5415 | * insdel.c (prepare_to_modify_buffer): Move setting |
| @@ -8018,7 +8018,7 @@ | |||
| 8018 | 8018 | ||
| 8019 | * xterm.c (x_scroll_run): Renamed from do_line_dance. | 8019 | * xterm.c (x_scroll_run): Renamed from do_line_dance. |
| 8020 | 8020 | ||
| 8021 | * xdisp.c (redisplay_window): For window-based redisplay, alway | 8021 | * xdisp.c (redisplay_window): For window-based redisplay, always |
| 8022 | try try_window_id. | 8022 | try try_window_id. |
| 8023 | 8023 | ||
| 8024 | * xterm.c (struct glyph_string): New member two_byte_p that is | 8024 | * xterm.c (struct glyph_string): New member two_byte_p that is |
| @@ -9227,7 +9227,7 @@ | |||
| 9227 | * xdisp.c (store_frame_title_char): New function to store a | 9227 | * xdisp.c (store_frame_title_char): New function to store a |
| 9228 | single character for the frame title with re-allocation of | 9228 | single character for the frame title with re-allocation of |
| 9229 | frame_title_buf. | 9229 | frame_title_buf. |
| 9230 | (init_xdisp): Intialize frame_title_.* variables to null. | 9230 | (init_xdisp): Initialize frame_title_.* variables to null. |
| 9231 | 9231 | ||
| 9232 | * dispnew.c (quit_error_check): Removed. | 9232 | * dispnew.c (quit_error_check): Removed. |
| 9233 | 9233 | ||
| @@ -12321,7 +12321,7 @@ | |||
| 12321 | (enumfont_t): Remove unused head pointer. | 12321 | (enumfont_t): Remove unused head pointer. |
| 12322 | (enum_font_cb2): Dereference elfLogFont. | 12322 | (enum_font_cb2): Dereference elfLogFont. |
| 12323 | (w32_list_bdf_fonts): New function. | 12323 | (w32_list_bdf_fonts): New function. |
| 12324 | (w32_list_fonts): Use one_w32_dispay_info instead of insisting on | 12324 | (w32_list_fonts): Use one_w32_display_info instead of insisting on |
| 12325 | valid frame. Remove MessageBox. Support BDF fonts. | 12325 | valid frame. Remove MessageBox. Support BDF fonts. |
| 12326 | (Fw32_find_bdf_fonts): New function. | 12326 | (Fw32_find_bdf_fonts): New function. |
| 12327 | (syms_of_w32fns): Add Vw32_bdf_filename_alist and | 12327 | (syms_of_w32fns): Add Vw32_bdf_filename_alist and |
| @@ -12583,7 +12583,7 @@ | |||
| 12583 | quit_char is typed, in order to break out of potential deadlocks. | 12583 | quit_char is typed, in order to break out of potential deadlocks. |
| 12584 | (cancel_all_deferred_msgs): New function. | 12584 | (cancel_all_deferred_msgs): New function. |
| 12585 | (complete_deferred_msg): Don't abort if msg not found; may have | 12585 | (complete_deferred_msg): Don't abort if msg not found; may have |
| 12586 | been cancelled. | 12586 | been canceled. |
| 12587 | (Fw32_reconstruct_hot_key): Use pre-interned symbols. | 12587 | (Fw32_reconstruct_hot_key): Use pre-interned symbols. |
| 12588 | (Fw32_send_sys_command): Wait for system command to | 12588 | (Fw32_send_sys_command): Wait for system command to |
| 12589 | complete before returning. | 12589 | complete before returning. |
| @@ -12766,7 +12766,7 @@ | |||
| 12766 | 12766 | ||
| 12767 | 1998-12-08 Geoff Voelker <voelker@cs.washington.edu> | 12767 | 1998-12-08 Geoff Voelker <voelker@cs.washington.edu> |
| 12768 | 12768 | ||
| 12769 | * makefile.nt: Do string comparision of _NMAKE_VER. | 12769 | * makefile.nt: Do string comparison of _NMAKE_VER. |
| 12770 | 12770 | ||
| 12771 | 1998-12-06 Eli Zaretskii <eliz@mescaline.gnu.org> | 12771 | 1998-12-06 Eli Zaretskii <eliz@mescaline.gnu.org> |
| 12772 | 12772 | ||
| @@ -13266,7 +13266,7 @@ | |||
| 13266 | 13266 | ||
| 13267 | * charset.c (Fchar_bytes): Doc fix. | 13267 | * charset.c (Fchar_bytes): Doc fix. |
| 13268 | (char_bytes): Fix returned value to match returned type. | 13268 | (char_bytes): Fix returned value to match returned type. |
| 13269 | (syms_of_charset): Fix type clash in initialisation of | 13269 | (syms_of_charset): Fix type clash in initialization of |
| 13270 | Vauto_fill_chars. | 13270 | Vauto_fill_chars. |
| 13271 | 13271 | ||
| 13272 | 1998-10-29 Geoff Voelker <voelker@cs.washington.edu> | 13272 | 1998-10-29 Geoff Voelker <voelker@cs.washington.edu> |
| @@ -13429,7 +13429,7 @@ | |||
| 13429 | `x-list-fonts.c'. | 13429 | `x-list-fonts.c'. |
| 13430 | (w32_get_font_info, w32_query_font, w32_find_ccl_program): New | 13430 | (w32_get_font_info, w32_query_font, w32_find_ccl_program): New |
| 13431 | functions for fontset support - adapted from x_ equivalents. | 13431 | functions for fontset support - adapted from x_ equivalents. |
| 13432 | (syms_of_w32fns): New lisp variables initialised. Function | 13432 | (syms_of_w32fns): New lisp variables initialized. Function |
| 13433 | pointers for fontset.c set up. | 13433 | pointers for fontset.c set up. |
| 13434 | 13434 | ||
| 13435 | * w32term.c: Include fontset.h. Define codepage macros. | 13435 | * w32term.c: Include fontset.h. Define codepage macros. |
| @@ -13701,7 +13701,7 @@ | |||
| 13701 | * ccl.c (CCL_WRITE_CHAR): Don't use bcopy. | 13701 | * ccl.c (CCL_WRITE_CHAR): Don't use bcopy. |
| 13702 | (ccl_driver): If BUFFER-MAGNIFICATION of the CCL program is 0, | 13702 | (ccl_driver): If BUFFER-MAGNIFICATION of the CCL program is 0, |
| 13703 | cause error if the program is going to output some bytes. When | 13703 | cause error if the program is going to output some bytes. When |
| 13704 | outputing a string to notify an error, check the case that | 13704 | outputting a string to notify an error, check the case that |
| 13705 | DST_BYTES is zero. | 13705 | DST_BYTES is zero. |
| 13706 | 13706 | ||
| 13707 | * coding.h (CODING_FINISH_INTERRUPT): New macro. | 13707 | * coding.h (CODING_FINISH_INTERRUPT): New macro. |
diff --git a/src/ChangeLog.9 b/src/ChangeLog.9 index 9e7bd24f792..6e3a8d8ab3b 100644 --- a/src/ChangeLog.9 +++ b/src/ChangeLog.9 | |||
| @@ -3479,7 +3479,7 @@ | |||
| 3479 | a workaround for SunOS 4's cc. | 3479 | a workaround for SunOS 4's cc. |
| 3480 | (CCL_CALL_FOR_MAP_INSTRUCTION): Use "if (1)..." not "do {...". | 3480 | (CCL_CALL_FOR_MAP_INSTRUCTION): Use "if (1)..." not "do {...". |
| 3481 | (CCL_SUCCESS, CCL_SUSPEND, CCL_INVALID_CMD): Likewise. | 3481 | (CCL_SUCCESS, CCL_SUSPEND, CCL_INVALID_CMD): Likewise. |
| 3482 | (ccl_driver) <CCL_ReadMultibyteChar2>: Remove unnecessay "do" | 3482 | (ccl_driver) <CCL_ReadMultibyteChar2>: Remove unnecessary "do" |
| 3483 | statement. | 3483 | statement. |
| 3484 | 3484 | ||
| 3485 | 2001-01-23 Gerd Moellmann <gerd@gnu.org> | 3485 | 2001-01-23 Gerd Moellmann <gerd@gnu.org> |
| @@ -5150,7 +5150,7 @@ | |||
| 5150 | 2000-11-27 Jason Rumney <jasonr@gnu.org> | 5150 | 2000-11-27 Jason Rumney <jasonr@gnu.org> |
| 5151 | 5151 | ||
| 5152 | * w32fns.c (w32_load_system_font): Always mark font as double byte | 5152 | * w32fns.c (w32_load_system_font): Always mark font as double byte |
| 5153 | if codepage is unicode. | 5153 | if codepage is Unicode. |
| 5154 | 5154 | ||
| 5155 | 2000-11-27 Gerd Moellmann <gerd@gnu.org> | 5155 | 2000-11-27 Gerd Moellmann <gerd@gnu.org> |
| 5156 | 5156 | ||
diff --git a/src/alloc.c b/src/alloc.c index f21f0b4fa3a..84a84df3597 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -203,9 +203,6 @@ static int malloc_hysteresis; | |||
| 203 | remapping on more recent systems because this is less important | 203 | remapping on more recent systems because this is less important |
| 204 | nowadays than in the days of small memories and timesharing. */ | 204 | nowadays than in the days of small memories and timesharing. */ |
| 205 | 205 | ||
| 206 | #ifndef VIRT_ADDR_VARIES | ||
| 207 | static | ||
| 208 | #endif | ||
| 209 | EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1) / sizeof (EMACS_INT)] = {1,}; | 206 | EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1) / sizeof (EMACS_INT)] = {1,}; |
| 210 | #define PUREBEG (char *) pure | 207 | #define PUREBEG (char *) pure |
| 211 | 208 | ||
| @@ -222,10 +219,7 @@ static ptrdiff_t pure_bytes_used_before_overflow; | |||
| 222 | /* Value is non-zero if P points into pure space. */ | 219 | /* Value is non-zero if P points into pure space. */ |
| 223 | 220 | ||
| 224 | #define PURE_POINTER_P(P) \ | 221 | #define PURE_POINTER_P(P) \ |
| 225 | (((PNTR_COMPARISON_TYPE) (P) \ | 222 | ((uintptr_t) (P) - (uintptr_t) purebeg <= pure_size) |
| 226 | < (PNTR_COMPARISON_TYPE) ((char *) purebeg + pure_size)) \ | ||
| 227 | && ((PNTR_COMPARISON_TYPE) (P) \ | ||
| 228 | >= (PNTR_COMPARISON_TYPE) purebeg)) | ||
| 229 | 223 | ||
| 230 | /* Index in pure at which next pure Lisp object will be allocated.. */ | 224 | /* Index in pure at which next pure Lisp object will be allocated.. */ |
| 231 | 225 | ||
diff --git a/src/bidi.c b/src/bidi.c index e8f2df89a9e..bd78a5eff29 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -51,7 +51,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 51 | 51 | ||
| 52 | A note about references to UAX#9 rules: if the reference says | 52 | A note about references to UAX#9 rules: if the reference says |
| 53 | something like "X9/Retaining", it means that you need to refer to | 53 | something like "X9/Retaining", it means that you need to refer to |
| 54 | rule X9 and to its modifications decribed in the "Implementation | 54 | rule X9 and to its modifications described in the "Implementation |
| 55 | Notes" section of UAX#9, under "Retaining Format Codes". */ | 55 | Notes" section of UAX#9, under "Retaining Format Codes". */ |
| 56 | 56 | ||
| 57 | #include <config.h> | 57 | #include <config.h> |
diff --git a/src/buffer.c b/src/buffer.c index f1ce9f4ec47..afa7e915429 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1526,7 +1526,13 @@ with SIGHUP. */) | |||
| 1526 | UNGCPRO; | 1526 | UNGCPRO; |
| 1527 | } | 1527 | } |
| 1528 | 1528 | ||
| 1529 | /* Make this buffer not be current. | 1529 | /* Run replace_buffer_in_windows before making another buffer current |
| 1530 | since set-window-buffer-start-and-point will refuse to make another | ||
| 1531 | buffer current if the selected window does not show the current | ||
| 1532 | buffer. (Bug#10114) */ | ||
| 1533 | replace_buffer_in_windows (buffer); | ||
| 1534 | |||
| 1535 | /* Make this buffer not be current. | ||
| 1530 | In the process, notice if this is the sole visible buffer | 1536 | In the process, notice if this is the sole visible buffer |
| 1531 | and give up if so. */ | 1537 | and give up if so. */ |
| 1532 | if (b == current_buffer) | 1538 | if (b == current_buffer) |
| @@ -1566,7 +1572,6 @@ with SIGHUP. */) | |||
| 1566 | 1572 | ||
| 1567 | /* These may run Lisp code and into infinite loops (if someone | 1573 | /* These may run Lisp code and into infinite loops (if someone |
| 1568 | insisted on circular lists) so allow quitting here. */ | 1574 | insisted on circular lists) so allow quitting here. */ |
| 1569 | replace_buffer_in_windows (buffer); | ||
| 1570 | frames_discard_buffer (buffer); | 1575 | frames_discard_buffer (buffer); |
| 1571 | 1576 | ||
| 1572 | clear_charpos_cache (b); | 1577 | clear_charpos_cache (b); |
| @@ -1626,7 +1631,7 @@ with SIGHUP. */) | |||
| 1626 | 1631 | ||
| 1627 | /* Reset the local variables, so that this buffer's local values | 1632 | /* Reset the local variables, so that this buffer's local values |
| 1628 | won't be protected from GC. They would be protected | 1633 | won't be protected from GC. They would be protected |
| 1629 | if they happened to remain encached in their symbols. | 1634 | if they happened to remain cached in their symbols. |
| 1630 | This gets rid of them for certain. */ | 1635 | This gets rid of them for certain. */ |
| 1631 | swap_out_buffer_local_variables (b); | 1636 | swap_out_buffer_local_variables (b); |
| 1632 | reset_buffer_local_variables (b, 1); | 1637 | reset_buffer_local_variables (b, 1); |
| @@ -2480,7 +2485,7 @@ swap_out_buffer_local_variables (struct buffer *b) | |||
| 2480 | Lisp_Object sym = XCAR (XCAR (alist)); | 2485 | Lisp_Object sym = XCAR (XCAR (alist)); |
| 2481 | eassert (XSYMBOL (sym)->redirect == SYMBOL_LOCALIZED); | 2486 | eassert (XSYMBOL (sym)->redirect == SYMBOL_LOCALIZED); |
| 2482 | /* Need not do anything if some other buffer's binding is | 2487 | /* Need not do anything if some other buffer's binding is |
| 2483 | now encached. */ | 2488 | now cached. */ |
| 2484 | if (EQ (SYMBOL_BLV (XSYMBOL (sym))->where, buffer)) | 2489 | if (EQ (SYMBOL_BLV (XSYMBOL (sym))->where, buffer)) |
| 2485 | { | 2490 | { |
| 2486 | /* Symbol is set up for this buffer's old local value: | 2491 | /* Symbol is set up for this buffer's old local value: |
| @@ -4399,7 +4404,7 @@ static int mmap_fd_1; | |||
| 4399 | 4404 | ||
| 4400 | static int mmap_page_size; | 4405 | static int mmap_page_size; |
| 4401 | 4406 | ||
| 4402 | /* 1 means mmap has been intialized. */ | 4407 | /* 1 means mmap has been initialized. */ |
| 4403 | 4408 | ||
| 4404 | static int mmap_initialized_p; | 4409 | static int mmap_initialized_p; |
| 4405 | 4410 | ||
| @@ -4438,7 +4443,7 @@ static int mmap_initialized_p; | |||
| 4438 | #define MMAP_ALLOCATED_P(start, end) 1 | 4443 | #define MMAP_ALLOCATED_P(start, end) 1 |
| 4439 | #endif | 4444 | #endif |
| 4440 | 4445 | ||
| 4441 | /* Perform necessary intializations for the use of mmap. */ | 4446 | /* Perform necessary initializations for the use of mmap. */ |
| 4442 | 4447 | ||
| 4443 | static void | 4448 | static void |
| 4444 | mmap_init (void) | 4449 | mmap_init (void) |
diff --git a/src/buffer.h b/src/buffer.h index 323c85a0c77..e2d4b555e11 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -978,7 +978,7 @@ extern int last_per_buffer_idx; | |||
| 978 | variable has an index > 0 associated with it, except when it always | 978 | variable has an index > 0 associated with it, except when it always |
| 979 | has buffer-local values, in which case the index is -1. If this is | 979 | has buffer-local values, in which case the index is -1. If this is |
| 980 | 0, this is a bug and means that the slot of VAR in | 980 | 0, this is a bug and means that the slot of VAR in |
| 981 | buffer_local_flags wasn't intiialized. */ | 981 | buffer_local_flags wasn't initialized. */ |
| 982 | 982 | ||
| 983 | #define PER_BUFFER_VAR_IDX(VAR) \ | 983 | #define PER_BUFFER_VAR_IDX(VAR) \ |
| 984 | PER_BUFFER_IDX (PER_BUFFER_VAR_OFFSET (VAR)) | 984 | PER_BUFFER_IDX (PER_BUFFER_VAR_OFFSET (VAR)) |
diff --git a/src/callint.c b/src/callint.c index 5eb824b8c74..444892ef9cb 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -78,7 +78,7 @@ c -- Character (no input method is used). | |||
| 78 | C -- Command name: symbol with interactive function definition. | 78 | C -- Command name: symbol with interactive function definition. |
| 79 | d -- Value of point as number. Does not do I/O. | 79 | d -- Value of point as number. Does not do I/O. |
| 80 | D -- Directory name. | 80 | D -- Directory name. |
| 81 | e -- Parametrized event (i.e., one that's a list) that invoked this command. | 81 | e -- Parameterized event (i.e., one that's a list) that invoked this command. |
| 82 | If used more than once, the Nth `e' returns the Nth parameterized event. | 82 | If used more than once, the Nth `e' returns the Nth parameterized event. |
| 83 | This skips events that are integers or symbols. | 83 | This skips events that are integers or symbols. |
| 84 | f -- Existing file name. | 84 | f -- Existing file name. |
diff --git a/src/casetab.c b/src/casetab.c index 64e47859d9b..8778048072c 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -95,7 +95,7 @@ CANONICALIZE maps each character to a canonical equivalent; | |||
| 95 | any two characters that are related by case-conversion have the same | 95 | any two characters that are related by case-conversion have the same |
| 96 | canonical equivalent character; it may be nil, in which case it is | 96 | canonical equivalent character; it may be nil, in which case it is |
| 97 | deduced from DOWNCASE and UPCASE. | 97 | deduced from DOWNCASE and UPCASE. |
| 98 | EQUIVALENCES is a map that cyclicly permutes each equivalence class | 98 | EQUIVALENCES is a map that cyclically permutes each equivalence class |
| 99 | (of characters with the same canonical equivalent); it may be nil, | 99 | (of characters with the same canonical equivalent); it may be nil, |
| 100 | in which case it is deduced from CANONICALIZE. */) | 100 | in which case it is deduced from CANONICALIZE. */) |
| 101 | (Lisp_Object table) | 101 | (Lisp_Object table) |
| @@ -47,7 +47,7 @@ static Lisp_Object Qcode_conversion_map; | |||
| 47 | static Lisp_Object Qcode_conversion_map_id; | 47 | static Lisp_Object Qcode_conversion_map_id; |
| 48 | 48 | ||
| 49 | /* Symbols of ccl program have this property, a value of the property | 49 | /* Symbols of ccl program have this property, a value of the property |
| 50 | is an index for Vccl_protram_table. */ | 50 | is an index for Vccl_program_table. */ |
| 51 | static Lisp_Object Qccl_program_idx; | 51 | static Lisp_Object Qccl_program_idx; |
| 52 | 52 | ||
| 53 | /* Table of registered CCL programs. Each element is a vector of | 53 | /* Table of registered CCL programs. Each element is a vector of |
| @@ -552,7 +552,7 @@ static Lisp_Object Vccl_program_table; | |||
| 552 | But, when VALm is mapped to VALn and VALn is not a number, the | 552 | But, when VALm is mapped to VALn and VALn is not a number, the |
| 553 | mapping proceed as below: | 553 | mapping proceed as below: |
| 554 | 554 | ||
| 555 | If VALn is nil, the lastest map is ignored and the mapping of VALm | 555 | If VALn is nil, the last map is ignored and the mapping of VALm |
| 556 | proceed to the next map. | 556 | proceed to the next map. |
| 557 | 557 | ||
| 558 | In VALn is t, VALm is reverted to reg[rrr] and the mapping of VALm | 558 | In VALn is t, VALm is reverted to reg[rrr] and the mapping of VALm |
| @@ -561,7 +561,7 @@ static Lisp_Object Vccl_program_table; | |||
| 561 | If VALn is lambda, move to the next map set like reaching to the | 561 | If VALn is lambda, move to the next map set like reaching to the |
| 562 | end of the current map set. | 562 | end of the current map set. |
| 563 | 563 | ||
| 564 | If VALn is a symbol, call the CCL program refered by it. | 564 | If VALn is a symbol, call the CCL program referred by it. |
| 565 | Then, use reg[rrr] as a mapped value except for -1, -2 and -3. | 565 | Then, use reg[rrr] as a mapped value except for -1, -2 and -3. |
| 566 | Such special values are regarded as nil, t, and lambda respectively. | 566 | Such special values are regarded as nil, t, and lambda respectively. |
| 567 | 567 | ||
| @@ -823,7 +823,7 @@ while (0) | |||
| 823 | : (charset = CHARSET_FROM_ID ((id)), DECODE_CHAR (charset, (code)))) | 823 | : (charset = CHARSET_FROM_ID ((id)), DECODE_CHAR (charset, (code)))) |
| 824 | 824 | ||
| 825 | /* Encode character C by some of charsets in CHARSET_LIST. Set ID to | 825 | /* Encode character C by some of charsets in CHARSET_LIST. Set ID to |
| 826 | the id of the used charset, ENCODED to the resulf of encoding. | 826 | the id of the used charset, ENCODED to the result of encoding. |
| 827 | Assume that we can use the variable `charset'. */ | 827 | Assume that we can use the variable `charset'. */ |
| 828 | 828 | ||
| 829 | #define CCL_ENCODE_CHAR(c, charset_list, id, encoded) \ | 829 | #define CCL_ENCODE_CHAR(c, charset_list, id, encoded) \ |
diff --git a/src/character.c b/src/character.c index d5d89381aaf..5e2a7b9461c 100644 --- a/src/character.c +++ b/src/character.c | |||
| @@ -670,7 +670,7 @@ str_as_multibyte (unsigned char *str, ptrdiff_t len, ptrdiff_t nbytes, | |||
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | /* Parse unibyte string at STR of LEN bytes, and return the number of | 672 | /* Parse unibyte string at STR of LEN bytes, and return the number of |
| 673 | bytes it may ocupy when converted to multibyte string by | 673 | bytes it may occupy when converted to multibyte string by |
| 674 | `str_to_multibyte'. */ | 674 | `str_to_multibyte'. */ |
| 675 | 675 | ||
| 676 | ptrdiff_t | 676 | ptrdiff_t |
diff --git a/src/character.h b/src/character.h index 2e1372eaf94..cc76ab213fc 100644 --- a/src/character.h +++ b/src/character.h | |||
| @@ -596,7 +596,7 @@ sanitize_char_width (EMACS_INT width) | |||
| 596 | ? ASCII_CHAR_WIDTH (c) \ | 596 | ? ASCII_CHAR_WIDTH (c) \ |
| 597 | : sanitize_char_width (XINT (CHAR_TABLE_REF (Vchar_width_table, c)))) | 597 | : sanitize_char_width (XINT (CHAR_TABLE_REF (Vchar_width_table, c)))) |
| 598 | 598 | ||
| 599 | /* If C is a variation selector, return the index numnber of the | 599 | /* If C is a variation selector, return the index of the |
| 600 | variation selector (1..256). Otherwise, return 0. */ | 600 | variation selector (1..256). Otherwise, return 0. */ |
| 601 | 601 | ||
| 602 | #define CHAR_VARIATION_SELECTOR_P(c) \ | 602 | #define CHAR_VARIATION_SELECTOR_P(c) \ |
diff --git a/src/charset.c b/src/charset.c index 8f16771b855..ec90a64341e 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -167,9 +167,9 @@ static struct | |||
| 167 | maximum character of the current charset. */ | 167 | maximum character of the current charset. */ |
| 168 | int min_char, max_char; | 168 | int min_char, max_char; |
| 169 | 169 | ||
| 170 | /* A Unicode character correspoinding to the code indice 0 (i.e. the | 170 | /* A Unicode character corresponding to the code index 0 (i.e. the |
| 171 | minimum code-point) of the current charset, or -1 if the code | 171 | minimum code-point) of the current charset, or -1 if the code |
| 172 | indice 0 is not a Unicode character. This is checked when | 172 | index 0 is not a Unicode character. This is checked when |
| 173 | table.encoder[CHAR] is zero. */ | 173 | table.encoder[CHAR] is zero. */ |
| 174 | int zero_index_char; | 174 | int zero_index_char; |
| 175 | 175 | ||
| @@ -2074,7 +2074,7 @@ that case, find the charset from what supported by that coding system. */) | |||
| 2074 | DEFUN ("charset-after", Fcharset_after, Scharset_after, 0, 1, 0, | 2074 | DEFUN ("charset-after", Fcharset_after, Scharset_after, 0, 1, 0, |
| 2075 | doc: /* | 2075 | doc: /* |
| 2076 | Return charset of a character in the current buffer at position POS. | 2076 | Return charset of a character in the current buffer at position POS. |
| 2077 | If POS is nil, it defauls to the current point. | 2077 | If POS is nil, it defaults to the current point. |
| 2078 | If POS is out of range, the value is nil. */) | 2078 | If POS is out of range, the value is nil. */) |
| 2079 | (Lisp_Object pos) | 2079 | (Lisp_Object pos) |
| 2080 | { | 2080 | { |
diff --git a/src/chartab.c b/src/chartab.c index c3dd1fe5b15..e1252962612 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -747,7 +747,7 @@ equivalent and can be merged. It defaults to `equal'. */) | |||
| 747 | ARG is passed to C_FUNCTION when that is called. | 747 | ARG is passed to C_FUNCTION when that is called. |
| 748 | 748 | ||
| 749 | It returns the value of last character covered by TABLE (not the | 749 | It returns the value of last character covered by TABLE (not the |
| 750 | value inheritted from the parent), and by side-effect, the car part | 750 | value inherited from the parent), and by side-effect, the car part |
| 751 | of RANGE is updated to the minimum character C where C and all the | 751 | of RANGE is updated to the minimum character C where C and all the |
| 752 | following characters in TABLE have the same value. */ | 752 | following characters in TABLE have the same value. */ |
| 753 | 753 | ||
| @@ -16,7 +16,7 @@ GNU General Public License for more details. | |||
| 16 | You should have received a copy of the GNU General Public License | 16 | You should have received a copy of the GNU General Public License |
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | /* Holds the minimum and maximum costs for the parametrized capabilities. */ | 19 | /* Holds the minimum and maximum costs for the parameterized capabilities. */ |
| 20 | struct parmcap | 20 | struct parmcap |
| 21 | { | 21 | { |
| 22 | int mincost, maxcost; | 22 | int mincost, maxcost; |
| @@ -66,7 +66,7 @@ struct cm | |||
| 66 | location */ | 66 | location */ |
| 67 | unsigned int cm_autolf:1; /* \r performs a \r\n (rn) */ | 67 | unsigned int cm_autolf:1; /* \r performs a \r\n (rn) */ |
| 68 | 68 | ||
| 69 | /* Parametrized capabilities. This needs to be a struct since | 69 | /* Parameterized capabilities. This needs to be a struct since |
| 70 | the costs are accessed through pointers. */ | 70 | the costs are accessed through pointers. */ |
| 71 | 71 | ||
| 72 | #if 0 | 72 | #if 0 |
| @@ -79,7 +79,7 @@ struct cm | |||
| 79 | struct parmcap cc_multiright; /* multiple right (RI) */ | 79 | struct parmcap cc_multiright; /* multiple right (RI) */ |
| 80 | #endif | 80 | #endif |
| 81 | 81 | ||
| 82 | /* Costs for the non-parametrized capabilities */ | 82 | /* Costs for the non-parameterized capabilities */ |
| 83 | int cc_up; /* cost for up */ | 83 | int cc_up; /* cost for up */ |
| 84 | int cc_down; /* etc. */ | 84 | int cc_down; /* etc. */ |
| 85 | int cc_left; | 85 | int cc_left; |
diff --git a/src/coding.c b/src/coding.c index b0dfc498add..74cf232cfb2 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -847,16 +847,16 @@ static int encode_coding_ccl (struct coding_system *); | |||
| 847 | static void decode_coding_raw_text (struct coding_system *); | 847 | static void decode_coding_raw_text (struct coding_system *); |
| 848 | static int encode_coding_raw_text (struct coding_system *); | 848 | static int encode_coding_raw_text (struct coding_system *); |
| 849 | 849 | ||
| 850 | static void coding_set_source (struct coding_system *); | 850 | static ptrdiff_t coding_set_source (struct coding_system *); |
| 851 | static void coding_set_destination (struct coding_system *); | 851 | static ptrdiff_t coding_set_destination (struct coding_system *); |
| 852 | static void coding_alloc_by_realloc (struct coding_system *, ptrdiff_t); | 852 | static void coding_alloc_by_realloc (struct coding_system *, ptrdiff_t); |
| 853 | static void coding_alloc_by_making_gap (struct coding_system *, | 853 | static void coding_alloc_by_making_gap (struct coding_system *, |
| 854 | ptrdiff_t, ptrdiff_t); | 854 | ptrdiff_t, ptrdiff_t); |
| 855 | static unsigned char *alloc_destination (struct coding_system *, | 855 | static unsigned char *alloc_destination (struct coding_system *, |
| 856 | ptrdiff_t, unsigned char *); | 856 | ptrdiff_t, unsigned char *); |
| 857 | static void setup_iso_safe_charsets (Lisp_Object); | 857 | static void setup_iso_safe_charsets (Lisp_Object); |
| 858 | static unsigned char *encode_designation_at_bol (struct coding_system *, | 858 | static int encode_designation_at_bol (struct coding_system *, |
| 859 | int *, unsigned char *); | 859 | int *, int *, unsigned char *); |
| 860 | static int detect_eol (const unsigned char *, | 860 | static int detect_eol (const unsigned char *, |
| 861 | ptrdiff_t, enum coding_category); | 861 | ptrdiff_t, enum coding_category); |
| 862 | static Lisp_Object adjust_coding_eol_type (struct coding_system *, int); | 862 | static Lisp_Object adjust_coding_eol_type (struct coding_system *, int); |
| @@ -915,27 +915,68 @@ record_conversion_result (struct coding_system *coding, | |||
| 915 | } | 915 | } |
| 916 | } | 916 | } |
| 917 | 917 | ||
| 918 | /* This wrapper macro is used to preserve validity of pointers into | 918 | /* These wrapper macros are used to preserve validity of pointers into |
| 919 | buffer text across calls to decode_char, which could cause | 919 | buffer text across calls to decode_char, encode_char, etc, which |
| 920 | relocation of buffers if it loads a charset map, because loading a | 920 | could cause relocation of buffers if it loads a charset map, |
| 921 | charset map allocates large structures. */ | 921 | because loading a charset map allocates large structures. */ |
| 922 | |||
| 922 | #define CODING_DECODE_CHAR(coding, src, src_base, src_end, charset, code, c) \ | 923 | #define CODING_DECODE_CHAR(coding, src, src_base, src_end, charset, code, c) \ |
| 923 | do { \ | 924 | do { \ |
| 925 | ptrdiff_t offset; \ | ||
| 926 | \ | ||
| 924 | charset_map_loaded = 0; \ | 927 | charset_map_loaded = 0; \ |
| 925 | c = DECODE_CHAR (charset, code); \ | 928 | c = DECODE_CHAR (charset, code); \ |
| 926 | if (charset_map_loaded) \ | 929 | if (charset_map_loaded \ |
| 930 | && (offset = coding_set_source (coding))) \ | ||
| 927 | { \ | 931 | { \ |
| 928 | const unsigned char *orig = coding->source; \ | ||
| 929 | ptrdiff_t offset; \ | ||
| 930 | \ | ||
| 931 | coding_set_source (coding); \ | ||
| 932 | offset = coding->source - orig; \ | ||
| 933 | src += offset; \ | 932 | src += offset; \ |
| 934 | src_base += offset; \ | 933 | src_base += offset; \ |
| 935 | src_end += offset; \ | 934 | src_end += offset; \ |
| 936 | } \ | 935 | } \ |
| 937 | } while (0) | 936 | } while (0) |
| 938 | 937 | ||
| 938 | #define CODING_ENCODE_CHAR(coding, dst, dst_end, charset, c, code) \ | ||
| 939 | do { \ | ||
| 940 | ptrdiff_t offset; \ | ||
| 941 | \ | ||
| 942 | charset_map_loaded = 0; \ | ||
| 943 | code = ENCODE_CHAR (charset, c); \ | ||
| 944 | if (charset_map_loaded \ | ||
| 945 | && (offset = coding_set_destination (coding))) \ | ||
| 946 | { \ | ||
| 947 | dst += offset; \ | ||
| 948 | dst_end += offset; \ | ||
| 949 | } \ | ||
| 950 | } while (0) | ||
| 951 | |||
| 952 | #define CODING_CHAR_CHARSET(coding, dst, dst_end, c, charset_list, code_return, charset) \ | ||
| 953 | do { \ | ||
| 954 | ptrdiff_t offset; \ | ||
| 955 | \ | ||
| 956 | charset_map_loaded = 0; \ | ||
| 957 | charset = char_charset (c, charset_list, code_return); \ | ||
| 958 | if (charset_map_loaded \ | ||
| 959 | && (offset = coding_set_destination (coding))) \ | ||
| 960 | { \ | ||
| 961 | dst += offset; \ | ||
| 962 | dst_end += offset; \ | ||
| 963 | } \ | ||
| 964 | } while (0) | ||
| 965 | |||
| 966 | #define CODING_CHAR_CHARSET_P(coding, dst, dst_end, c, charset, result) \ | ||
| 967 | do { \ | ||
| 968 | ptrdiff_t offset; \ | ||
| 969 | \ | ||
| 970 | charset_map_loaded = 0; \ | ||
| 971 | result = CHAR_CHARSET_P (c, charset); \ | ||
| 972 | if (charset_map_loaded \ | ||
| 973 | && (offset = coding_set_destination (coding))) \ | ||
| 974 | { \ | ||
| 975 | dst += offset; \ | ||
| 976 | dst_end += offset; \ | ||
| 977 | } \ | ||
| 978 | } while (0) | ||
| 979 | |||
| 939 | 980 | ||
| 940 | /* If there are at least BYTES length of room at dst, allocate memory | 981 | /* If there are at least BYTES length of room at dst, allocate memory |
| 941 | for coding->destination and update dst and dst_end. We don't have | 982 | for coding->destination and update dst and dst_end. We don't have |
| @@ -1015,9 +1056,14 @@ record_conversion_result (struct coding_system *coding, | |||
| 1015 | | ((p)[-1] & 0x3F)))) | 1056 | | ((p)[-1] & 0x3F)))) |
| 1016 | 1057 | ||
| 1017 | 1058 | ||
| 1018 | static void | 1059 | /* Update coding->source from coding->src_object, and return how many |
| 1060 | bytes coding->source was changed. */ | ||
| 1061 | |||
| 1062 | static ptrdiff_t | ||
| 1019 | coding_set_source (struct coding_system *coding) | 1063 | coding_set_source (struct coding_system *coding) |
| 1020 | { | 1064 | { |
| 1065 | const unsigned char *orig = coding->source; | ||
| 1066 | |||
| 1021 | if (BUFFERP (coding->src_object)) | 1067 | if (BUFFERP (coding->src_object)) |
| 1022 | { | 1068 | { |
| 1023 | struct buffer *buf = XBUFFER (coding->src_object); | 1069 | struct buffer *buf = XBUFFER (coding->src_object); |
| @@ -1036,11 +1082,18 @@ coding_set_source (struct coding_system *coding) | |||
| 1036 | /* Otherwise, the source is C string and is never relocated | 1082 | /* Otherwise, the source is C string and is never relocated |
| 1037 | automatically. Thus we don't have to update anything. */ | 1083 | automatically. Thus we don't have to update anything. */ |
| 1038 | } | 1084 | } |
| 1085 | return coding->source - orig; | ||
| 1039 | } | 1086 | } |
| 1040 | 1087 | ||
| 1041 | static void | 1088 | |
| 1089 | /* Update coding->destination from coding->dst_object, and return how | ||
| 1090 | many bytes coding->destination was changed. */ | ||
| 1091 | |||
| 1092 | static ptrdiff_t | ||
| 1042 | coding_set_destination (struct coding_system *coding) | 1093 | coding_set_destination (struct coding_system *coding) |
| 1043 | { | 1094 | { |
| 1095 | const unsigned char *orig = coding->destination; | ||
| 1096 | |||
| 1044 | if (BUFFERP (coding->dst_object)) | 1097 | if (BUFFERP (coding->dst_object)) |
| 1045 | { | 1098 | { |
| 1046 | if (BUFFERP (coding->src_object) && coding->src_pos < 0) | 1099 | if (BUFFERP (coding->src_object) && coding->src_pos < 0) |
| @@ -1065,6 +1118,7 @@ coding_set_destination (struct coding_system *coding) | |||
| 1065 | /* Otherwise, the destination is C string and is never relocated | 1118 | /* Otherwise, the destination is C string and is never relocated |
| 1066 | automatically. Thus we don't have to update anything. */ | 1119 | automatically. Thus we don't have to update anything. */ |
| 1067 | } | 1120 | } |
| 1121 | return coding->destination - orig; | ||
| 1068 | } | 1122 | } |
| 1069 | 1123 | ||
| 1070 | 1124 | ||
| @@ -2650,14 +2704,19 @@ encode_coding_emacs_mule (struct coding_system *coding) | |||
| 2650 | 2704 | ||
| 2651 | if (preferred_charset_id >= 0) | 2705 | if (preferred_charset_id >= 0) |
| 2652 | { | 2706 | { |
| 2707 | int result; | ||
| 2708 | |||
| 2653 | charset = CHARSET_FROM_ID (preferred_charset_id); | 2709 | charset = CHARSET_FROM_ID (preferred_charset_id); |
| 2654 | if (CHAR_CHARSET_P (c, charset)) | 2710 | CODING_CHAR_CHARSET_P (coding, dst, dst_end, c, charset, result); |
| 2711 | if (result) | ||
| 2655 | code = ENCODE_CHAR (charset, c); | 2712 | code = ENCODE_CHAR (charset, c); |
| 2656 | else | 2713 | else |
| 2657 | charset = char_charset (c, charset_list, &code); | 2714 | CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list, |
| 2715 | &code, charset); | ||
| 2658 | } | 2716 | } |
| 2659 | else | 2717 | else |
| 2660 | charset = char_charset (c, charset_list, &code); | 2718 | CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list, |
| 2719 | &code, charset); | ||
| 2661 | if (! charset) | 2720 | if (! charset) |
| 2662 | { | 2721 | { |
| 2663 | c = coding->default_char; | 2722 | c = coding->default_char; |
| @@ -2666,7 +2725,8 @@ encode_coding_emacs_mule (struct coding_system *coding) | |||
| 2666 | EMIT_ONE_ASCII_BYTE (c); | 2725 | EMIT_ONE_ASCII_BYTE (c); |
| 2667 | continue; | 2726 | continue; |
| 2668 | } | 2727 | } |
| 2669 | charset = char_charset (c, charset_list, &code); | 2728 | CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list, |
| 2729 | &code, charset); | ||
| 2670 | } | 2730 | } |
| 2671 | dimension = CHARSET_DIMENSION (charset); | 2731 | dimension = CHARSET_DIMENSION (charset); |
| 2672 | emacs_mule_id = CHARSET_EMACS_MULE_ID (charset); | 2732 | emacs_mule_id = CHARSET_EMACS_MULE_ID (charset); |
| @@ -4185,7 +4245,8 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 4185 | 4245 | ||
| 4186 | #define ENCODE_ISO_CHARACTER(charset, c) \ | 4246 | #define ENCODE_ISO_CHARACTER(charset, c) \ |
| 4187 | do { \ | 4247 | do { \ |
| 4188 | unsigned code = ENCODE_CHAR ((charset), (c)); \ | 4248 | unsigned code; \ |
| 4249 | CODING_ENCODE_CHAR (coding, dst, dst_end, (charset), (c), code); \ | ||
| 4189 | \ | 4250 | \ |
| 4190 | if (CHARSET_DIMENSION (charset) == 1) \ | 4251 | if (CHARSET_DIMENSION (charset) == 1) \ |
| 4191 | ENCODE_ISO_CHARACTER_DIMENSION1 ((charset), code); \ | 4252 | ENCODE_ISO_CHARACTER_DIMENSION1 ((charset), code); \ |
| @@ -4283,15 +4344,19 @@ encode_invocation_designation (struct charset *charset, | |||
| 4283 | 4344 | ||
| 4284 | 4345 | ||
| 4285 | /* Produce designation sequences of charsets in the line started from | 4346 | /* Produce designation sequences of charsets in the line started from |
| 4286 | SRC to a place pointed by DST, and return updated DST. | 4347 | CHARBUF to a place pointed by DST, and return the number of |
| 4348 | produced bytes. DST should not directly point a buffer text area | ||
| 4349 | which may be relocated by char_charset call. | ||
| 4287 | 4350 | ||
| 4288 | If the current block ends before any end-of-line, we may fail to | 4351 | If the current block ends before any end-of-line, we may fail to |
| 4289 | find all the necessary designations. */ | 4352 | find all the necessary designations. */ |
| 4290 | 4353 | ||
| 4291 | static unsigned char * | 4354 | static int |
| 4292 | encode_designation_at_bol (struct coding_system *coding, int *charbuf, | 4355 | encode_designation_at_bol (struct coding_system *coding, |
| 4356 | int *charbuf, int *charbuf_end, | ||
| 4293 | unsigned char *dst) | 4357 | unsigned char *dst) |
| 4294 | { | 4358 | { |
| 4359 | unsigned char *orig = dst; | ||
| 4295 | struct charset *charset; | 4360 | struct charset *charset; |
| 4296 | /* Table of charsets to be designated to each graphic register. */ | 4361 | /* Table of charsets to be designated to each graphic register. */ |
| 4297 | int r[4]; | 4362 | int r[4]; |
| @@ -4309,7 +4374,7 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf, | |||
| 4309 | for (reg = 0; reg < 4; reg++) | 4374 | for (reg = 0; reg < 4; reg++) |
| 4310 | r[reg] = -1; | 4375 | r[reg] = -1; |
| 4311 | 4376 | ||
| 4312 | while (found < 4) | 4377 | while (charbuf < charbuf_end && found < 4) |
| 4313 | { | 4378 | { |
| 4314 | int id; | 4379 | int id; |
| 4315 | 4380 | ||
| @@ -4334,7 +4399,7 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf, | |||
| 4334 | ENCODE_DESIGNATION (CHARSET_FROM_ID (r[reg]), reg, coding); | 4399 | ENCODE_DESIGNATION (CHARSET_FROM_ID (r[reg]), reg, coding); |
| 4335 | } | 4400 | } |
| 4336 | 4401 | ||
| 4337 | return dst; | 4402 | return dst - orig; |
| 4338 | } | 4403 | } |
| 4339 | 4404 | ||
| 4340 | /* See the above "GENERAL NOTES on `encode_coding_XXX ()' functions". */ | 4405 | /* See the above "GENERAL NOTES on `encode_coding_XXX ()' functions". */ |
| @@ -4378,13 +4443,26 @@ encode_coding_iso_2022 (struct coding_system *coding) | |||
| 4378 | 4443 | ||
| 4379 | if (bol_designation) | 4444 | if (bol_designation) |
| 4380 | { | 4445 | { |
| 4381 | unsigned char *dst_prev = dst; | ||
| 4382 | |||
| 4383 | /* We have to produce designation sequences if any now. */ | 4446 | /* We have to produce designation sequences if any now. */ |
| 4384 | dst = encode_designation_at_bol (coding, charbuf, dst); | 4447 | unsigned char desig_buf[16]; |
| 4385 | bol_designation = 0; | 4448 | int nbytes; |
| 4449 | ptrdiff_t offset; | ||
| 4450 | |||
| 4451 | charset_map_loaded = 0; | ||
| 4452 | nbytes = encode_designation_at_bol (coding, charbuf, charbuf_end, | ||
| 4453 | desig_buf); | ||
| 4454 | if (charset_map_loaded | ||
| 4455 | && (offset = coding_set_destination (coding))) | ||
| 4456 | { | ||
| 4457 | dst += offset; | ||
| 4458 | dst_end += offset; | ||
| 4459 | } | ||
| 4460 | memcpy (dst, desig_buf, nbytes); | ||
| 4461 | dst += nbytes; | ||
| 4386 | /* We are sure that designation sequences are all ASCII bytes. */ | 4462 | /* We are sure that designation sequences are all ASCII bytes. */ |
| 4387 | produced_chars += dst - dst_prev; | 4463 | produced_chars += nbytes; |
| 4464 | bol_designation = 0; | ||
| 4465 | ASSURE_DESTINATION (safe_room); | ||
| 4388 | } | 4466 | } |
| 4389 | 4467 | ||
| 4390 | c = *charbuf++; | 4468 | c = *charbuf++; |
| @@ -4455,12 +4533,17 @@ encode_coding_iso_2022 (struct coding_system *coding) | |||
| 4455 | 4533 | ||
| 4456 | if (preferred_charset_id >= 0) | 4534 | if (preferred_charset_id >= 0) |
| 4457 | { | 4535 | { |
| 4536 | int result; | ||
| 4537 | |||
| 4458 | charset = CHARSET_FROM_ID (preferred_charset_id); | 4538 | charset = CHARSET_FROM_ID (preferred_charset_id); |
| 4459 | if (! CHAR_CHARSET_P (c, charset)) | 4539 | CODING_CHAR_CHARSET_P (coding, dst, dst_end, c, charset, result); |
| 4460 | charset = char_charset (c, charset_list, NULL); | 4540 | if (! result) |
| 4541 | CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list, | ||
| 4542 | NULL, charset); | ||
| 4461 | } | 4543 | } |
| 4462 | else | 4544 | else |
| 4463 | charset = char_charset (c, charset_list, NULL); | 4545 | CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list, |
| 4546 | NULL, charset); | ||
| 4464 | if (!charset) | 4547 | if (!charset) |
| 4465 | { | 4548 | { |
| 4466 | if (coding->mode & CODING_MODE_SAFE_ENCODING) | 4549 | if (coding->mode & CODING_MODE_SAFE_ENCODING) |
| @@ -4471,7 +4554,8 @@ encode_coding_iso_2022 (struct coding_system *coding) | |||
| 4471 | else | 4554 | else |
| 4472 | { | 4555 | { |
| 4473 | c = coding->default_char; | 4556 | c = coding->default_char; |
| 4474 | charset = char_charset (c, charset_list, NULL); | 4557 | CODING_CHAR_CHARSET (coding, dst, dst_end, c, |
| 4558 | charset_list, NULL, charset); | ||
| 4475 | } | 4559 | } |
| 4476 | } | 4560 | } |
| 4477 | ENCODE_ISO_CHARACTER (charset, c); | 4561 | ENCODE_ISO_CHARACTER (charset, c); |
| @@ -4897,7 +4981,9 @@ encode_coding_sjis (struct coding_system *coding) | |||
| 4897 | else | 4981 | else |
| 4898 | { | 4982 | { |
| 4899 | unsigned code; | 4983 | unsigned code; |
| 4900 | struct charset *charset = char_charset (c, charset_list, &code); | 4984 | struct charset *charset; |
| 4985 | CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list, | ||
| 4986 | &code, charset); | ||
| 4901 | 4987 | ||
| 4902 | if (!charset) | 4988 | if (!charset) |
| 4903 | { | 4989 | { |
| @@ -4909,7 +4995,8 @@ encode_coding_sjis (struct coding_system *coding) | |||
| 4909 | else | 4995 | else |
| 4910 | { | 4996 | { |
| 4911 | c = coding->default_char; | 4997 | c = coding->default_char; |
| 4912 | charset = char_charset (c, charset_list, &code); | 4998 | CODING_CHAR_CHARSET (coding, dst, dst_end, c, |
| 4999 | charset_list, &code, charset); | ||
| 4913 | } | 5000 | } |
| 4914 | } | 5001 | } |
| 4915 | if (code == CHARSET_INVALID_CODE (charset)) | 5002 | if (code == CHARSET_INVALID_CODE (charset)) |
| @@ -4984,7 +5071,9 @@ encode_coding_big5 (struct coding_system *coding) | |||
| 4984 | else | 5071 | else |
| 4985 | { | 5072 | { |
| 4986 | unsigned code; | 5073 | unsigned code; |
| 4987 | struct charset *charset = char_charset (c, charset_list, &code); | 5074 | struct charset *charset; |
| 5075 | CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list, | ||
| 5076 | &code, charset); | ||
| 4988 | 5077 | ||
| 4989 | if (! charset) | 5078 | if (! charset) |
| 4990 | { | 5079 | { |
| @@ -4996,7 +5085,8 @@ encode_coding_big5 (struct coding_system *coding) | |||
| 4996 | else | 5085 | else |
| 4997 | { | 5086 | { |
| 4998 | c = coding->default_char; | 5087 | c = coding->default_char; |
| 4999 | charset = char_charset (c, charset_list, &code); | 5088 | CODING_CHAR_CHARSET (coding, dst, dst_end, c, |
| 5089 | charset_list, &code, charset); | ||
| 5000 | } | 5090 | } |
| 5001 | } | 5091 | } |
| 5002 | if (code == CHARSET_INVALID_CODE (charset)) | 5092 | if (code == CHARSET_INVALID_CODE (charset)) |
| @@ -5154,7 +5244,7 @@ encode_coding_ccl (struct coding_system *coding) | |||
| 5154 | && coding->mode & CODING_MODE_LAST_BLOCK) | 5244 | && coding->mode & CODING_MODE_LAST_BLOCK) |
| 5155 | ccl->last_block = 1; | 5245 | ccl->last_block = 1; |
| 5156 | 5246 | ||
| 5157 | while (charbuf < charbuf_end) | 5247 | do |
| 5158 | { | 5248 | { |
| 5159 | ccl_driver (ccl, charbuf, destination_charbuf, | 5249 | ccl_driver (ccl, charbuf, destination_charbuf, |
| 5160 | charbuf_end - charbuf, 1024, charset_list); | 5250 | charbuf_end - charbuf, 1024, charset_list); |
| @@ -5176,6 +5266,7 @@ encode_coding_ccl (struct coding_system *coding) | |||
| 5176 | || ccl->status == CCL_STAT_INVALID_CMD) | 5266 | || ccl->status == CCL_STAT_INVALID_CMD) |
| 5177 | break; | 5267 | break; |
| 5178 | } | 5268 | } |
| 5269 | while (charbuf < charbuf_end); | ||
| 5179 | 5270 | ||
| 5180 | switch (ccl->status) | 5271 | switch (ccl->status) |
| 5181 | { | 5272 | { |
| @@ -5572,7 +5663,9 @@ encode_coding_charset (struct coding_system *coding) | |||
| 5572 | } | 5663 | } |
| 5573 | else | 5664 | else |
| 5574 | { | 5665 | { |
| 5575 | charset = char_charset (c, charset_list, &code); | 5666 | CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list, |
| 5667 | &code, charset); | ||
| 5668 | |||
| 5576 | if (charset) | 5669 | if (charset) |
| 5577 | { | 5670 | { |
| 5578 | if (CHARSET_DIMENSION (charset) == 1) | 5671 | if (CHARSET_DIMENSION (charset) == 1) |
| @@ -9207,7 +9300,7 @@ frame's terminal device. */) | |||
| 9207 | = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); | 9300 | = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); |
| 9208 | Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id); | 9301 | Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id); |
| 9209 | 9302 | ||
| 9210 | /* For backward compatibility, return nil if it is `undecided'. */ | 9303 | /* For backward compatibility, return nil if it is `undecided'. */ |
| 9211 | return (! EQ (coding_system, Qundecided) ? coding_system : Qnil); | 9304 | return (! EQ (coding_system, Qundecided) ? coding_system : Qnil); |
| 9212 | } | 9305 | } |
| 9213 | 9306 | ||
diff --git a/src/coding.h b/src/coding.h index 2165fa23712..711e41ed5b8 100644 --- a/src/coding.h +++ b/src/coding.h | |||
| @@ -457,7 +457,7 @@ struct coding_system | |||
| 457 | /* Number of error source data found in a decoding routine. */ | 457 | /* Number of error source data found in a decoding routine. */ |
| 458 | int errors; | 458 | int errors; |
| 459 | 459 | ||
| 460 | /* Store the positions of error source data. */ | 460 | /* Store the positions of error source data. */ |
| 461 | ptrdiff_t *error_positions; | 461 | ptrdiff_t *error_positions; |
| 462 | 462 | ||
| 463 | /* Finish status of code conversion. */ | 463 | /* Finish status of code conversion. */ |
diff --git a/src/data.c b/src/data.c index 7b30e91b12f..2337b0a4952 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -839,7 +839,7 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents) | |||
| 839 | 839 | ||
| 840 | case Lisp_Fwd_Kboard_Obj: | 840 | case Lisp_Fwd_Kboard_Obj: |
| 841 | /* We used to simply use current_kboard here, but from Lisp | 841 | /* We used to simply use current_kboard here, but from Lisp |
| 842 | code, it's value is often unexpected. It seems nicer to | 842 | code, its value is often unexpected. It seems nicer to |
| 843 | allow constructions like this to work as intuitively expected: | 843 | allow constructions like this to work as intuitively expected: |
| 844 | 844 | ||
| 845 | (with-selected-frame frame | 845 | (with-selected-frame frame |
diff --git a/src/dbusbind.c b/src/dbusbind.c index 352f2fc1ff8..7801ec259bb 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c | |||
| @@ -184,7 +184,7 @@ static int xd_in_read_queued_messages = 0; | |||
| 184 | #endif | 184 | #endif |
| 185 | 185 | ||
| 186 | /* This was a macro. On Solaris 2.11 it was said to compile for | 186 | /* This was a macro. On Solaris 2.11 it was said to compile for |
| 187 | hours, when optimzation is enabled. So we have transferred it into | 187 | hours, when optimization is enabled. So we have transferred it into |
| 188 | a function. */ | 188 | a function. */ |
| 189 | /* Determine the DBusType of a given Lisp symbol. OBJECT must be one | 189 | /* Determine the DBusType of a given Lisp symbol. OBJECT must be one |
| 190 | of the predefined D-Bus type symbols. */ | 190 | of the predefined D-Bus type symbols. */ |
diff --git a/src/dired.c b/src/dired.c index 3a3adfb5082..1d112db8a93 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -229,11 +229,11 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m | |||
| 229 | ptrdiff_t len; | 229 | ptrdiff_t len; |
| 230 | int wanted = 0; | 230 | int wanted = 0; |
| 231 | Lisp_Object name, finalname; | 231 | Lisp_Object name, finalname; |
| 232 | struct gcpro inner_gcpro1, inner_gcpro2; | 232 | struct gcpro gcpro1, gcpro2; |
| 233 | 233 | ||
| 234 | len = NAMLEN (dp); | 234 | len = NAMLEN (dp); |
| 235 | name = finalname = make_unibyte_string (dp->d_name, len); | 235 | name = finalname = make_unibyte_string (dp->d_name, len); |
| 236 | GCPRO2_VAR (finalname, name, inner_gcpro); | 236 | GCPRO2 (finalname, name); |
| 237 | 237 | ||
| 238 | /* Note: DECODE_FILE can GC; it should protect its argument, | 238 | /* Note: DECODE_FILE can GC; it should protect its argument, |
| 239 | though. */ | 239 | though. */ |
| @@ -289,23 +289,23 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full, Lisp_Object m | |||
| 289 | /* Construct an expanded filename for the directory entry. | 289 | /* Construct an expanded filename for the directory entry. |
| 290 | Use the decoded names for input to Ffile_attributes. */ | 290 | Use the decoded names for input to Ffile_attributes. */ |
| 291 | Lisp_Object decoded_fullname, fileattrs; | 291 | Lisp_Object decoded_fullname, fileattrs; |
| 292 | struct gcpro innermost_gcpro1, innermost_gcpro2; | 292 | struct gcpro gcpro1, gcpro2; |
| 293 | 293 | ||
| 294 | decoded_fullname = fileattrs = Qnil; | 294 | decoded_fullname = fileattrs = Qnil; |
| 295 | GCPRO2_VAR (decoded_fullname, fileattrs, innermost_gcpro); | 295 | GCPRO2 (decoded_fullname, fileattrs); |
| 296 | 296 | ||
| 297 | /* Both Fexpand_file_name and Ffile_attributes can GC. */ | 297 | /* Both Fexpand_file_name and Ffile_attributes can GC. */ |
| 298 | decoded_fullname = Fexpand_file_name (name, directory); | 298 | decoded_fullname = Fexpand_file_name (name, directory); |
| 299 | fileattrs = Ffile_attributes (decoded_fullname, id_format); | 299 | fileattrs = Ffile_attributes (decoded_fullname, id_format); |
| 300 | 300 | ||
| 301 | list = Fcons (Fcons (finalname, fileattrs), list); | 301 | list = Fcons (Fcons (finalname, fileattrs), list); |
| 302 | UNGCPRO_VAR (innermost_gcpro); | 302 | UNGCPRO; |
| 303 | } | 303 | } |
| 304 | else | 304 | else |
| 305 | list = Fcons (finalname, list); | 305 | list = Fcons (finalname, list); |
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | UNGCPRO_VAR (inner_gcpro); | 308 | UNGCPRO; |
| 309 | } | 309 | } |
| 310 | } | 310 | } |
| 311 | 311 | ||
| @@ -673,11 +673,11 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, int all_flag, int v | |||
| 673 | if (!NILP (predicate)) | 673 | if (!NILP (predicate)) |
| 674 | { | 674 | { |
| 675 | Lisp_Object val; | 675 | Lisp_Object val; |
| 676 | struct gcpro inner_gcpro1; | 676 | struct gcpro gcpro1; |
| 677 | 677 | ||
| 678 | GCPRO1_VAR (name, inner_gcpro); | 678 | GCPRO1 (name); |
| 679 | val = call1 (predicate, name); | 679 | val = call1 (predicate, name); |
| 680 | UNGCPRO_VAR (inner_gcpro); | 680 | UNGCPRO; |
| 681 | 681 | ||
| 682 | if (NILP (val)) | 682 | if (NILP (val)) |
| 683 | continue; | 683 | continue; |
diff --git a/src/dispextern.h b/src/dispextern.h index ccb85e7422e..9d5feea6024 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -405,7 +405,7 @@ struct glyph | |||
| 405 | { | 405 | { |
| 406 | /* Metrics of a partial glyph of an image (type == IMAGE_GLYPH). */ | 406 | /* Metrics of a partial glyph of an image (type == IMAGE_GLYPH). */ |
| 407 | struct glyph_slice img; | 407 | struct glyph_slice img; |
| 408 | /* Start and end indices of glyphs of a graphme cluster of a | 408 | /* Start and end indices of glyphs of a grapheme cluster of a |
| 409 | composition (type == COMPOSITE_GLYPH). */ | 409 | composition (type == COMPOSITE_GLYPH). */ |
| 410 | struct { int from, to; } cmp; | 410 | struct { int from, to; } cmp; |
| 411 | /* Pixel offsets for upper and lower part of the acronym. */ | 411 | /* Pixel offsets for upper and lower part of the acronym. */ |
| @@ -2649,11 +2649,11 @@ struct redisplay_interface | |||
| 2649 | void (*flush_display) (struct frame *f); | 2649 | void (*flush_display) (struct frame *f); |
| 2650 | 2650 | ||
| 2651 | /* Flush the display of frame F if non-NULL. This is called | 2651 | /* Flush the display of frame F if non-NULL. This is called |
| 2652 | during redisplay, and should be NULL on systems which flushes | 2652 | during redisplay, and should be NULL on systems which flush |
| 2653 | automatically before reading input. */ | 2653 | automatically before reading input. */ |
| 2654 | void (*flush_display_optional) (struct frame *f); | 2654 | void (*flush_display_optional) (struct frame *f); |
| 2655 | 2655 | ||
| 2656 | /* Clear the mouse hightlight in window W, if there is any. */ | 2656 | /* Clear the mouse highlight in window W, if there is any. */ |
| 2657 | void (*clear_window_mouse_face) (struct window *w); | 2657 | void (*clear_window_mouse_face) (struct window *w); |
| 2658 | 2658 | ||
| 2659 | /* Set *LEFT and *RIGHT to the left and right overhang of GLYPH on | 2659 | /* Set *LEFT and *RIGHT to the left and right overhang of GLYPH on |
| @@ -3127,9 +3127,7 @@ void w32_init_fringe (struct redisplay_interface *); | |||
| 3127 | void w32_reset_fringes (void); | 3127 | void w32_reset_fringes (void); |
| 3128 | #endif | 3128 | #endif |
| 3129 | 3129 | ||
| 3130 | #if XASSERTS | ||
| 3131 | extern unsigned row_hash (struct glyph_row *); | 3130 | extern unsigned row_hash (struct glyph_row *); |
| 3132 | #endif | ||
| 3133 | 3131 | ||
| 3134 | /* Defined in image.c */ | 3132 | /* Defined in image.c */ |
| 3135 | 3133 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index 88f75414074..e53e3fdf80d 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -431,7 +431,7 @@ margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin | |||
| 431 | 431 | ||
| 432 | #if XASSERTS | 432 | #if XASSERTS |
| 433 | /* Return non-zero if ROW's hash value is correct, zero if not. */ | 433 | /* Return non-zero if ROW's hash value is correct, zero if not. */ |
| 434 | static int | 434 | int |
| 435 | verify_row_hash (struct glyph_row *row) | 435 | verify_row_hash (struct glyph_row *row) |
| 436 | { | 436 | { |
| 437 | return row->hash == row_hash (row); | 437 | return row->hash == row_hash (row); |
| @@ -608,7 +608,6 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 608 | row->glyphs[LAST_AREA] | 608 | row->glyphs[LAST_AREA] |
| 609 | = row->glyphs[LEFT_MARGIN_AREA] + dim.width; | 609 | = row->glyphs[LEFT_MARGIN_AREA] + dim.width; |
| 610 | } | 610 | } |
| 611 | xassert (!row->enabled_p || verify_row_hash (row)); | ||
| 612 | ++row; | 611 | ++row; |
| 613 | } | 612 | } |
| 614 | } | 613 | } |
| @@ -3575,12 +3574,11 @@ update_window (struct window *w, int force_p) | |||
| 3575 | 3574 | ||
| 3576 | rif->update_window_begin_hook (w); | 3575 | rif->update_window_begin_hook (w); |
| 3577 | yb = window_text_bottom_y (w); | 3576 | yb = window_text_bottom_y (w); |
| 3578 | |||
| 3579 | /* If window has a header line, update it before everything else. | ||
| 3580 | Adjust y-positions of other rows by the header line height. */ | ||
| 3581 | row = desired_matrix->rows; | 3577 | row = desired_matrix->rows; |
| 3582 | end = row + desired_matrix->nrows - 1; | 3578 | end = row + desired_matrix->nrows - 1; |
| 3583 | 3579 | ||
| 3580 | /* Take note of the header line, if there is one. We will | ||
| 3581 | update it below, after updating all of the window's lines. */ | ||
| 3584 | if (row->mode_line_p) | 3582 | if (row->mode_line_p) |
| 3585 | { | 3583 | { |
| 3586 | header_line_row = row; | 3584 | header_line_row = row; |
| @@ -3625,6 +3623,8 @@ update_window (struct window *w, int force_p) | |||
| 3625 | 3623 | ||
| 3626 | /* Update the rest of the lines. */ | 3624 | /* Update the rest of the lines. */ |
| 3627 | for (; row < end && (force_p || !input_pending); ++row) | 3625 | for (; row < end && (force_p || !input_pending); ++row) |
| 3626 | /* scrolling_window resets the enabled_p flag of the rows it | ||
| 3627 | reuses from current_matrix. */ | ||
| 3628 | if (row->enabled_p) | 3628 | if (row->enabled_p) |
| 3629 | { | 3629 | { |
| 3630 | int vpos = MATRIX_ROW_VPOS (row, desired_matrix); | 3630 | int vpos = MATRIX_ROW_VPOS (row, desired_matrix); |
| @@ -4550,18 +4550,69 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4550 | { | 4550 | { |
| 4551 | rif->clear_window_mouse_face (w); | 4551 | rif->clear_window_mouse_face (w); |
| 4552 | rif->scroll_run_hook (w, r); | 4552 | rif->scroll_run_hook (w, r); |
| 4553 | } | ||
| 4553 | 4554 | ||
| 4554 | /* Invalidate runs that copy from where we copied to. */ | 4555 | /* Truncate runs that copy to where we copied to, and |
| 4555 | for (j = i + 1; j < nruns; ++j) | 4556 | invalidate runs that copy from where we copied to. */ |
| 4557 | for (j = nruns - 1; j > i; --j) | ||
| 4558 | { | ||
| 4559 | struct run *p = runs[j]; | ||
| 4560 | int truncated_p = 0; | ||
| 4561 | |||
| 4562 | if (p->nrows > 0 | ||
| 4563 | && p->desired_y < r->desired_y + r->height | ||
| 4564 | && p->desired_y + p->height > r->desired_y) | ||
| 4556 | { | 4565 | { |
| 4557 | struct run *p = runs[j]; | 4566 | if (p->desired_y < r->desired_y) |
| 4567 | { | ||
| 4568 | p->nrows = r->desired_vpos - p->desired_vpos; | ||
| 4569 | p->height = r->desired_y - p->desired_y; | ||
| 4570 | truncated_p = 1; | ||
| 4571 | } | ||
| 4572 | else | ||
| 4573 | { | ||
| 4574 | int nrows_copied = (r->desired_vpos + r->nrows | ||
| 4575 | - p->desired_vpos); | ||
| 4576 | |||
| 4577 | if (p->nrows <= nrows_copied) | ||
| 4578 | p->nrows = 0; | ||
| 4579 | else | ||
| 4580 | { | ||
| 4581 | int height_copied = (r->desired_y + r->height | ||
| 4582 | - p->desired_y); | ||
| 4583 | |||
| 4584 | p->current_vpos += nrows_copied; | ||
| 4585 | p->desired_vpos += nrows_copied; | ||
| 4586 | p->nrows -= nrows_copied; | ||
| 4587 | p->current_y += height_copied; | ||
| 4588 | p->desired_y += height_copied; | ||
| 4589 | p->height -= height_copied; | ||
| 4590 | truncated_p = 1; | ||
| 4591 | } | ||
| 4592 | } | ||
| 4593 | } | ||
| 4558 | 4594 | ||
| 4559 | if ((p->current_y >= r->desired_y | 4595 | if (r->current_y != r->desired_y |
| 4596 | /* The condition below is equivalent to | ||
| 4597 | ((p->current_y >= r->desired_y | ||
| 4560 | && p->current_y < r->desired_y + r->height) | 4598 | && p->current_y < r->desired_y + r->height) |
| 4561 | || (p->current_y + p->height >= r->desired_y | 4599 | || (p->current_y + p->height > r->desired_y |
| 4562 | && (p->current_y + p->height | 4600 | && (p->current_y + p->height |
| 4563 | < r->desired_y + r->height))) | 4601 | <= r->desired_y + r->height))) |
| 4564 | p->nrows = 0; | 4602 | because we have 0 < p->height <= r->height. */ |
| 4603 | && p->current_y < r->desired_y + r->height | ||
| 4604 | && p->current_y + p->height > r->desired_y) | ||
| 4605 | p->nrows = 0; | ||
| 4606 | |||
| 4607 | /* Reorder runs by copied pixel lines if truncated. */ | ||
| 4608 | if (truncated_p && p->nrows > 0) | ||
| 4609 | { | ||
| 4610 | int k = nruns - 1; | ||
| 4611 | |||
| 4612 | while (runs[k]->nrows == 0 || runs[k]->height < p->height) | ||
| 4613 | k--; | ||
| 4614 | memmove (runs + j, runs + j + 1, (k - j) * sizeof (*runs)); | ||
| 4615 | runs[k] = p; | ||
| 4565 | } | 4616 | } |
| 4566 | } | 4617 | } |
| 4567 | 4618 | ||
| @@ -4576,7 +4627,14 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4576 | to_overlapped_p = to->overlapped_p; | 4627 | to_overlapped_p = to->overlapped_p; |
| 4577 | from->redraw_fringe_bitmaps_p = from->fringe_bitmap_periodic_p; | 4628 | from->redraw_fringe_bitmaps_p = from->fringe_bitmap_periodic_p; |
| 4578 | assign_row (to, from); | 4629 | assign_row (to, from); |
| 4579 | to->enabled_p = 1, from->enabled_p = 0; | 4630 | /* The above `assign_row' actually does swap, so if we had |
| 4631 | an overlap in the copy destination of two runs, then | ||
| 4632 | the second run would assign a previously disabled bogus | ||
| 4633 | row. But thanks to the truncation code in the | ||
| 4634 | preceding for-loop, we no longer have such an overlap, | ||
| 4635 | and thus the assigned row should always be enabled. */ | ||
| 4636 | xassert (to->enabled_p); | ||
| 4637 | from->enabled_p = 0; | ||
| 4580 | to->overlapped_p = to_overlapped_p; | 4638 | to->overlapped_p = to_overlapped_p; |
| 4581 | } | 4639 | } |
| 4582 | } | 4640 | } |
diff --git a/src/emacs.c b/src/emacs.c index a5d2f619b8c..4c8d3298495 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -154,6 +154,8 @@ Lisp_Object Qfile_name_handler_alist; | |||
| 154 | 154 | ||
| 155 | Lisp_Object Qrisky_local_variable; | 155 | Lisp_Object Qrisky_local_variable; |
| 156 | 156 | ||
| 157 | Lisp_Object Qkill_emacs; | ||
| 158 | |||
| 157 | /* If non-zero, Emacs should not attempt to use a window-specific code, | 159 | /* If non-zero, Emacs should not attempt to use a window-specific code, |
| 158 | but instead should use the virtual terminal under which it was started. */ | 160 | but instead should use the virtual terminal under which it was started. */ |
| 159 | int inhibit_window_system; | 161 | int inhibit_window_system; |
| @@ -2399,6 +2401,7 @@ syms_of_emacs (void) | |||
| 2399 | { | 2401 | { |
| 2400 | DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist"); | 2402 | DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist"); |
| 2401 | DEFSYM (Qrisky_local_variable, "risky-local-variable"); | 2403 | DEFSYM (Qrisky_local_variable, "risky-local-variable"); |
| 2404 | DEFSYM (Qkill_emacs, "kill-emacs"); | ||
| 2402 | 2405 | ||
| 2403 | #ifndef CANNOT_DUMP | 2406 | #ifndef CANNOT_DUMP |
| 2404 | defsubr (&Sdump_emacs); | 2407 | defsubr (&Sdump_emacs); |
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c index aef1ffdf783..d9084bf9a98 100644 --- a/src/emacsgtkfixed.c +++ b/src/emacsgtkfixed.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* A Gtk Widget that inherits GtkFixed, but can be shrinked. | 1 | /* A Gtk Widget that inherits GtkFixed, but can be shrunk. |
| 2 | This file is only use when compiling with Gtk+ 3. | 2 | This file is only use when compiling with Gtk+ 3. |
| 3 | 3 | ||
| 4 | Copyright (C) 2011 Free Software Foundation, Inc. | 4 | Copyright (C) 2011 Free Software Foundation, Inc. |
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h index dbac136bd7f..c70e9a3efe3 100644 --- a/src/emacsgtkfixed.h +++ b/src/emacsgtkfixed.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* A Gtk Widget that inherits GtkFixed, but can be shrinked. | 1 | /* A Gtk Widget that inherits GtkFixed, but can be shrunk. |
| 2 | This file is only use when compiling with Gtk+ 3. | 2 | This file is only use when compiling with Gtk+ 3. |
| 3 | 3 | ||
| 4 | Copyright (C) 2011 Free Software Foundation, Inc. | 4 | Copyright (C) 2011 Free Software Foundation, Inc. |
diff --git a/src/eval.c b/src/eval.c index c6bf2ccef1d..b604df8f35b 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1601,6 +1601,18 @@ static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object); | |||
| 1601 | static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, | 1601 | static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, |
| 1602 | Lisp_Object data); | 1602 | Lisp_Object data); |
| 1603 | 1603 | ||
| 1604 | void | ||
| 1605 | process_quit_flag (void) | ||
| 1606 | { | ||
| 1607 | Lisp_Object flag = Vquit_flag; | ||
| 1608 | Vquit_flag = Qnil; | ||
| 1609 | if (EQ (flag, Qkill_emacs)) | ||
| 1610 | Fkill_emacs (Qnil); | ||
| 1611 | if (EQ (Vthrow_on_input, flag)) | ||
| 1612 | Fthrow (Vthrow_on_input, Qt); | ||
| 1613 | Fsignal (Qquit, Qnil); | ||
| 1614 | } | ||
| 1615 | |||
| 1604 | DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0, | 1616 | DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0, |
| 1605 | doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA. | 1617 | doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA. |
| 1606 | This function does not return. | 1618 | This function does not return. |
| @@ -3701,7 +3713,7 @@ When lexical binding is not being used, this variable is nil. | |||
| 3701 | A value of `(t)' indicates an empty environment, otherwise it is an | 3713 | A value of `(t)' indicates an empty environment, otherwise it is an |
| 3702 | alist of active lexical bindings. */); | 3714 | alist of active lexical bindings. */); |
| 3703 | Vinternal_interpreter_environment = Qnil; | 3715 | Vinternal_interpreter_environment = Qnil; |
| 3704 | /* Don't export this variable to Elisp, so noone can mess with it | 3716 | /* Don't export this variable to Elisp, so no one can mess with it |
| 3705 | (Just imagine if someone makes it buffer-local). */ | 3717 | (Just imagine if someone makes it buffer-local). */ |
| 3706 | Funintern (Qinternal_interpreter_environment, Qnil); | 3718 | Funintern (Qinternal_interpreter_environment, Qnil); |
| 3707 | 3719 | ||
diff --git a/src/fileio.c b/src/fileio.c index 110977b3a60..3139e634c80 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -62,7 +62,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 62 | 62 | ||
| 63 | #ifdef DOS_NT | 63 | #ifdef DOS_NT |
| 64 | /* On Windows, drive letters must be alphabetic - on DOS, the Netware | 64 | /* On Windows, drive letters must be alphabetic - on DOS, the Netware |
| 65 | redirector allows the six letters between 'Z' and 'a' as well. */ | 65 | redirector allows the six letters between 'Z' and 'a' as well. */ |
| 66 | #ifdef MSDOS | 66 | #ifdef MSDOS |
| 67 | #define IS_DRIVE(x) ((x) >= 'A' && (x) <= 'z') | 67 | #define IS_DRIVE(x) ((x) >= 'A' && (x) <= 'z') |
| 68 | #endif | 68 | #endif |
| @@ -70,7 +70,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 70 | #define IS_DRIVE(x) isalpha ((unsigned char) (x)) | 70 | #define IS_DRIVE(x) isalpha ((unsigned char) (x)) |
| 71 | #endif | 71 | #endif |
| 72 | /* Need to lower-case the drive letter, or else expanded | 72 | /* Need to lower-case the drive letter, or else expanded |
| 73 | filenames will sometimes compare inequal, because | 73 | filenames will sometimes compare unequal, because |
| 74 | `expand-file-name' doesn't always down-case the drive letter. */ | 74 | `expand-file-name' doesn't always down-case the drive letter. */ |
| 75 | #define DRIVE_LETTER(x) (tolower ((unsigned char) (x))) | 75 | #define DRIVE_LETTER(x) (tolower ((unsigned char) (x))) |
| 76 | #endif | 76 | #endif |
| @@ -338,7 +338,7 @@ Given a Unix syntax file name, returns a string ending in slash. */) | |||
| 338 | 338 | ||
| 339 | while (p != beg && !IS_DIRECTORY_SEP (p[-1]) | 339 | while (p != beg && !IS_DIRECTORY_SEP (p[-1]) |
| 340 | #ifdef DOS_NT | 340 | #ifdef DOS_NT |
| 341 | /* only recognise drive specifier at the beginning */ | 341 | /* only recognize drive specifier at the beginning */ |
| 342 | && !(p[-1] == ':' | 342 | && !(p[-1] == ':' |
| 343 | /* handle the "/:d:foo" and "/:foo" cases correctly */ | 343 | /* handle the "/:d:foo" and "/:foo" cases correctly */ |
| 344 | && ((p == beg + 2 && !IS_DIRECTORY_SEP (*beg)) | 344 | && ((p == beg + 2 && !IS_DIRECTORY_SEP (*beg)) |
| @@ -401,7 +401,7 @@ or the entire name if it contains no slash. */) | |||
| 401 | 401 | ||
| 402 | while (p != beg && !IS_DIRECTORY_SEP (p[-1]) | 402 | while (p != beg && !IS_DIRECTORY_SEP (p[-1]) |
| 403 | #ifdef DOS_NT | 403 | #ifdef DOS_NT |
| 404 | /* only recognise drive specifier at beginning */ | 404 | /* only recognize drive specifier at beginning */ |
| 405 | && !(p[-1] == ':' | 405 | && !(p[-1] == ':' |
| 406 | /* handle the "/:d:foo" case correctly */ | 406 | /* handle the "/:d:foo" case correctly */ |
| 407 | && (p == beg + 2 || (p == beg + 4 && IS_DIRECTORY_SEP (*beg)))) | 407 | && (p == beg + 2 || (p == beg + 4 && IS_DIRECTORY_SEP (*beg)))) |
| @@ -1553,7 +1553,7 @@ those `/' is discarded. */) | |||
| 1553 | if (p) | 1553 | if (p) |
| 1554 | /* Start over with the new string, so we check the file-name-handler | 1554 | /* Start over with the new string, so we check the file-name-handler |
| 1555 | again. Important with filenames like "/home/foo//:/hello///there" | 1555 | again. Important with filenames like "/home/foo//:/hello///there" |
| 1556 | which whould substitute to "/:/hello///there" rather than "/there". */ | 1556 | which would substitute to "/:/hello///there" rather than "/there". */ |
| 1557 | return Fsubstitute_in_file_name | 1557 | return Fsubstitute_in_file_name |
| 1558 | (make_specified_string (p, -1, endp - p, multibyte)); | 1558 | (make_specified_string (p, -1, endp - p, multibyte)); |
| 1559 | 1559 | ||
| @@ -3689,6 +3689,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3689 | ptrdiff_t this_count = SPECPDL_INDEX (); | 3689 | ptrdiff_t this_count = SPECPDL_INDEX (); |
| 3690 | int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); | 3690 | int multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); |
| 3691 | Lisp_Object conversion_buffer; | 3691 | Lisp_Object conversion_buffer; |
| 3692 | struct gcpro gcpro1; | ||
| 3692 | 3693 | ||
| 3693 | conversion_buffer = code_conversion_save (1, multibyte); | 3694 | conversion_buffer = code_conversion_save (1, multibyte); |
| 3694 | 3695 | ||
| @@ -3709,7 +3710,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3709 | { | 3710 | { |
| 3710 | /* We read one bunch by one (READ_BUF_SIZE bytes) to allow | 3711 | /* We read one bunch by one (READ_BUF_SIZE bytes) to allow |
| 3711 | quitting while reading a huge while. */ | 3712 | quitting while reading a huge while. */ |
| 3712 | /* try is reserved in some compilers (Microsoft C) */ | 3713 | /* `try'' is reserved in some compilers (Microsoft C). */ |
| 3713 | int trytry = min (total - how_much, READ_BUF_SIZE - unprocessed); | 3714 | int trytry = min (total - how_much, READ_BUF_SIZE - unprocessed); |
| 3714 | 3715 | ||
| 3715 | /* Allow quitting out of the actual I/O. */ | 3716 | /* Allow quitting out of the actual I/O. */ |
| @@ -4101,6 +4102,16 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 4101 | adjust_after_insert (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted, | 4102 | adjust_after_insert (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted, |
| 4102 | inserted); | 4103 | inserted); |
| 4103 | 4104 | ||
| 4105 | /* Call after-change hooks for the inserted text, aside from the case | ||
| 4106 | of normal visiting (not with REPLACE), which is done in a new buffer | ||
| 4107 | "before" the buffer is changed. */ | ||
| 4108 | if (inserted > 0 && total > 0 | ||
| 4109 | && (NILP (visit) || !NILP (replace))) | ||
| 4110 | { | ||
| 4111 | signal_after_change (PT, 0, inserted); | ||
| 4112 | update_compositions (PT, PT, CHECK_BORDER); | ||
| 4113 | } | ||
| 4114 | |||
| 4104 | /* Now INSERTED is measured in characters. */ | 4115 | /* Now INSERTED is measured in characters. */ |
| 4105 | 4116 | ||
| 4106 | handled: | 4117 | handled: |
| @@ -4179,7 +4190,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 4179 | /* If REPLACE is non-nil and we succeeded in not replacing the | 4190 | /* If REPLACE is non-nil and we succeeded in not replacing the |
| 4180 | beginning or end of the buffer text with the file's contents, | 4191 | beginning or end of the buffer text with the file's contents, |
| 4181 | call format-decode with `point' positioned at the beginning | 4192 | call format-decode with `point' positioned at the beginning |
| 4182 | of the buffer and `inserted' equalling the number of | 4193 | of the buffer and `inserted' equaling the number of |
| 4183 | characters in the buffer. Otherwise, format-decode might | 4194 | characters in the buffer. Otherwise, format-decode might |
| 4184 | fail to correctly analyze the beginning or end of the buffer. | 4195 | fail to correctly analyze the beginning or end of the buffer. |
| 4185 | Hence we temporarily save `point' and `inserted' here and | 4196 | Hence we temporarily save `point' and `inserted' here and |
| @@ -4276,16 +4287,6 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 4276 | unbind_to (count1, Qnil); | 4287 | unbind_to (count1, Qnil); |
| 4277 | } | 4288 | } |
| 4278 | 4289 | ||
| 4279 | /* Call after-change hooks for the inserted text, aside from the case | ||
| 4280 | of normal visiting (not with REPLACE), which is done in a new buffer | ||
| 4281 | "before" the buffer is changed. */ | ||
| 4282 | if (inserted > 0 && total > 0 | ||
| 4283 | && (NILP (visit) || !NILP (replace))) | ||
| 4284 | { | ||
| 4285 | signal_after_change (PT, 0, inserted); | ||
| 4286 | update_compositions (PT, PT, CHECK_BORDER); | ||
| 4287 | } | ||
| 4288 | |||
| 4289 | if (!NILP (visit) | 4290 | if (!NILP (visit) |
| 4290 | && current_buffer->modtime == -1) | 4291 | && current_buffer->modtime == -1) |
| 4291 | { | 4292 | { |
| @@ -3245,7 +3245,7 @@ DEFUN ("base64-decode-string", Fbase64_decode_string, Sbase64_decode_string, | |||
| 3245 | return decoded_string; | 3245 | return decoded_string; |
| 3246 | } | 3246 | } |
| 3247 | 3247 | ||
| 3248 | /* Base64-decode the data at FROM of LENGHT bytes into TO. If | 3248 | /* Base64-decode the data at FROM of LENGTH bytes into TO. If |
| 3249 | MULTIBYTE is nonzero, the decoded result should be in multibyte | 3249 | MULTIBYTE is nonzero, the decoded result should be in multibyte |
| 3250 | form. If NCHARS_RETRUN is not NULL, store the number of produced | 3250 | form. If NCHARS_RETRUN is not NULL, store the number of produced |
| 3251 | characters in *NCHARS_RETURN. */ | 3251 | characters in *NCHARS_RETURN. */ |
diff --git a/src/font.c b/src/font.c index cb27155f09d..64ac36d364c 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -614,7 +614,7 @@ static const struct | |||
| 614 | /* Function to validate PROP's value VAL, or NULL if any value is | 614 | /* Function to validate PROP's value VAL, or NULL if any value is |
| 615 | ok. The value is VAL or its regularized value if VAL is valid, | 615 | ok. The value is VAL or its regularized value if VAL is valid, |
| 616 | and Qerror if not. */ | 616 | and Qerror if not. */ |
| 617 | Lisp_Object (*validater) (Lisp_Object prop, Lisp_Object val); | 617 | Lisp_Object (*validator) (Lisp_Object prop, Lisp_Object val); |
| 618 | } font_property_table[] = | 618 | } font_property_table[] = |
| 619 | { { &QCtype, font_prop_validate_symbol }, | 619 | { { &QCtype, font_prop_validate_symbol }, |
| 620 | { &QCfoundry, font_prop_validate_symbol }, | 620 | { &QCfoundry, font_prop_validate_symbol }, |
| @@ -672,7 +672,7 @@ font_prop_validate (int idx, Lisp_Object prop, Lisp_Object val) | |||
| 672 | if (idx < 0) | 672 | if (idx < 0) |
| 673 | return val; | 673 | return val; |
| 674 | } | 674 | } |
| 675 | validated = (font_property_table[idx].validater) (prop, val); | 675 | validated = (font_property_table[idx].validator) (prop, val); |
| 676 | if (EQ (validated, Qerror)) | 676 | if (EQ (validated, Qerror)) |
| 677 | signal_error ("invalid font property", Fcons (prop, val)); | 677 | signal_error ("invalid font property", Fcons (prop, val)); |
| 678 | return validated; | 678 | return validated; |
| @@ -825,7 +825,7 @@ font_expand_wildcards (Lisp_Object *field, int n) | |||
| 825 | range_mask = (range_mask << 1) | 1; | 825 | range_mask = (range_mask << 1) | 1; |
| 826 | 826 | ||
| 827 | /* The triplet RANGE_FROM, RANGE_TO, and RANGE_MASK is a | 827 | /* The triplet RANGE_FROM, RANGE_TO, and RANGE_MASK is a |
| 828 | position-based retriction for FIELD[I]. */ | 828 | position-based restriction for FIELD[I]. */ |
| 829 | for (i = 0, range_from = 0, range_to = 14 - n; i < n; | 829 | for (i = 0, range_from = 0, range_to = 14 - n; i < n; |
| 830 | i++, range_from++, range_to++, range_mask <<= 1) | 830 | i++, range_from++, range_to++, range_mask <<= 1) |
| 831 | { | 831 | { |
| @@ -842,7 +842,7 @@ font_expand_wildcards (Lisp_Object *field, int n) | |||
| 842 | else | 842 | else |
| 843 | { | 843 | { |
| 844 | /* The triplet FROM, TO, and MASK is a value-based | 844 | /* The triplet FROM, TO, and MASK is a value-based |
| 845 | retriction for FIELD[I]. */ | 845 | restriction for FIELD[I]. */ |
| 846 | int from, to; | 846 | int from, to; |
| 847 | unsigned mask; | 847 | unsigned mask; |
| 848 | 848 | ||
| @@ -3162,14 +3162,7 @@ font_find_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec, int c) | |||
| 3162 | else | 3162 | else |
| 3163 | { | 3163 | { |
| 3164 | Lisp_Object alters | 3164 | Lisp_Object alters |
| 3165 | = Fassoc_string (val, Vface_alternative_font_family_alist, | 3165 | = Fassoc_string (val, Vface_alternative_font_family_alist, Qt); |
| 3166 | /* Font family names are case-sensitive under NS. */ | ||
| 3167 | #ifndef HAVE_NS | ||
| 3168 | Qt | ||
| 3169 | #else | ||
| 3170 | Qnil | ||
| 3171 | #endif | ||
| 3172 | ); | ||
| 3173 | 3166 | ||
| 3174 | if (! NILP (alters)) | 3167 | if (! NILP (alters)) |
| 3175 | { | 3168 | { |
diff --git a/src/font.h b/src/font.h index f49f06a1fbc..72ee15c5e00 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -705,7 +705,7 @@ struct font_driver | |||
| 705 | 705 | ||
| 706 | 706 | ||
| 707 | /* Chain of font drivers. There's one global font driver list | 707 | /* Chain of font drivers. There's one global font driver list |
| 708 | (font_driver_list in font.c). In addition, each frame has it's own | 708 | (font_driver_list in font.c). In addition, each frame has its own |
| 709 | font driver list at FRAME_PTR->font_driver_list. */ | 709 | font driver list at FRAME_PTR->font_driver_list. */ |
| 710 | 710 | ||
| 711 | struct font_driver_list | 711 | struct font_driver_list |
| @@ -721,7 +721,7 @@ struct font_driver_list | |||
| 721 | 721 | ||
| 722 | 722 | ||
| 723 | /* Chain of arbitrary data specific to each font driver. Each frame | 723 | /* Chain of arbitrary data specific to each font driver. Each frame |
| 724 | has it's own font data list at FRAME_PTR->font_data_list. */ | 724 | has its own font data list at FRAME_PTR->font_data_list. */ |
| 725 | 725 | ||
| 726 | struct font_data_list | 726 | struct font_data_list |
| 727 | { | 727 | { |
diff --git a/src/fontset.c b/src/fontset.c index ae919468695..b5b36822a2d 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -166,7 +166,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 166 | These structures are hidden from the other codes than this file. | 166 | These structures are hidden from the other codes than this file. |
| 167 | The other codes handle fontsets only by their ID numbers. They | 167 | The other codes handle fontsets only by their ID numbers. They |
| 168 | usually use the variable name `fontset' for IDs. But, in this | 168 | usually use the variable name `fontset' for IDs. But, in this |
| 169 | file, we always use varialbe name `id' for IDs, and name `fontset' | 169 | file, we always use variable name `id' for IDs, and name `fontset' |
| 170 | for an actual fontset object, i.e., char-table. | 170 | for an actual fontset object, i.e., char-table. |
| 171 | 171 | ||
| 172 | */ | 172 | */ |
| @@ -633,7 +633,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, int fa | |||
| 633 | { | 633 | { |
| 634 | /* Something strange happened, perhaps because of a | 634 | /* Something strange happened, perhaps because of a |
| 635 | Font-backend problem. Too avoid crashing, record | 635 | Font-backend problem. Too avoid crashing, record |
| 636 | that this spec is unsable. It may be better to find | 636 | that this spec is unusable. It may be better to find |
| 637 | another font of the same spec, but currently we don't | 637 | another font of the same spec, but currently we don't |
| 638 | have such an API. */ | 638 | have such an API. */ |
| 639 | RFONT_DEF_SET_FACE (rfont_def, -1); | 639 | RFONT_DEF_SET_FACE (rfont_def, -1); |
| @@ -907,7 +907,7 @@ face_suitable_for_char_p (struct face *face, int c) | |||
| 907 | 907 | ||
| 908 | 908 | ||
| 909 | /* Return ID of face suitable for displaying character C on frame F. | 909 | /* Return ID of face suitable for displaying character C on frame F. |
| 910 | FACE must be reazlied for ASCII characters in advance. Called from | 910 | FACE must be realized for ASCII characters in advance. Called from |
| 911 | the macro FACE_FOR_CHAR. */ | 911 | the macro FACE_FOR_CHAR. */ |
| 912 | 912 | ||
| 913 | int | 913 | int |
| @@ -1348,7 +1348,7 @@ accumulate_script_ranges (Lisp_Object arg, Lisp_Object range, Lisp_Object val) | |||
| 1348 | 1348 | ||
| 1349 | In FONTSET, set FONT_DEF in a fashion specified by ADD for | 1349 | In FONTSET, set FONT_DEF in a fashion specified by ADD for |
| 1350 | characters in RANGE and ranges in SCRIPT_RANGE_LIST before RANGE. | 1350 | characters in RANGE and ranges in SCRIPT_RANGE_LIST before RANGE. |
| 1351 | The consumed ranges are poped up from SCRIPT_RANGE_LIST, and the | 1351 | The consumed ranges are popped up from SCRIPT_RANGE_LIST, and the |
| 1352 | new SCRIPT_RANGE_LIST is stored in ARG. | 1352 | new SCRIPT_RANGE_LIST is stored in ARG. |
| 1353 | 1353 | ||
| 1354 | If ASCII is nil, don't set FONT_DEF for ASCII characters. It is | 1354 | If ASCII is nil, don't set FONT_DEF for ASCII characters. It is |
diff --git a/src/frame.c b/src/frame.c index dbee6a8092b..00653af74d6 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -374,7 +374,7 @@ make_frame (int mini_p) | |||
| 374 | 374 | ||
| 375 | /* Use set_window_buffer, not Fset_window_buffer, and don't let | 375 | /* Use set_window_buffer, not Fset_window_buffer, and don't let |
| 376 | hooks be run by it. The reason is that the whole frame/window | 376 | hooks be run by it. The reason is that the whole frame/window |
| 377 | arrangement is not yet fully intialized at this point. Windows | 377 | arrangement is not yet fully initialized at this point. Windows |
| 378 | don't have the right size, glyph matrices aren't initialized | 378 | don't have the right size, glyph matrices aren't initialized |
| 379 | etc. Running Lisp functions at this point surely ends in a | 379 | etc. Running Lisp functions at this point surely ends in a |
| 380 | SEGV. */ | 380 | SEGV. */ |
| @@ -1712,7 +1712,7 @@ If omitted, FRAME defaults to the currently selected frame. */) | |||
| 1712 | } | 1712 | } |
| 1713 | 1713 | ||
| 1714 | /* Update the display_time slot of the buffers shown in WINDOW | 1714 | /* Update the display_time slot of the buffers shown in WINDOW |
| 1715 | and all its descendents. */ | 1715 | and all its descendants. */ |
| 1716 | 1716 | ||
| 1717 | static void | 1717 | static void |
| 1718 | make_frame_visible_1 (Lisp_Object window) | 1718 | make_frame_visible_1 (Lisp_Object window) |
| @@ -1929,7 +1929,7 @@ request a switch to FOCUS-FRAME, and `last-event-frame' will be | |||
| 1929 | FOCUS-FRAME after reading an event typed at FRAME. | 1929 | FOCUS-FRAME after reading an event typed at FRAME. |
| 1930 | 1930 | ||
| 1931 | If FOCUS-FRAME is omitted or nil, any existing redirection is | 1931 | If FOCUS-FRAME is omitted or nil, any existing redirection is |
| 1932 | cancelled, and the frame again receives its own keystrokes. | 1932 | canceled, and the frame again receives its own keystrokes. |
| 1933 | 1933 | ||
| 1934 | Focus redirection is useful for temporarily redirecting keystrokes to | 1934 | Focus redirection is useful for temporarily redirecting keystrokes to |
| 1935 | a surrogate minibuffer frame when a frame doesn't have its own | 1935 | a surrogate minibuffer frame when a frame doesn't have its own |
diff --git a/src/fringe.c b/src/fringe.c index 727547b1ab7..edc254fa3f2 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -35,7 +35,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 35 | Logical bitmaps are used internally to denote things like | 35 | Logical bitmaps are used internally to denote things like |
| 36 | 'end-of-buffer', 'left-truncation', 'overlay-arrow', etc. | 36 | 'end-of-buffer', 'left-truncation', 'overlay-arrow', etc. |
| 37 | 37 | ||
| 38 | Physical bitmaps specify the visual appearence of the bitmap, | 38 | Physical bitmaps specify the visual appearance of the bitmap, |
| 39 | e.g. 'bottom-left-angle', 'left-arrow', 'left-triangle', etc. | 39 | e.g. 'bottom-left-angle', 'left-arrow', 'left-triangle', etc. |
| 40 | User defined bitmaps are physical bitmaps. | 40 | User defined bitmaps are physical bitmaps. |
| 41 | 41 | ||
| @@ -928,7 +928,7 @@ update_window_fringes (struct window *w, int keep_current_p) | |||
| 928 | int top_ind_rn, bot_ind_rn; | 928 | int top_ind_rn, bot_ind_rn; |
| 929 | int top_ind_min_y, bot_ind_max_y; | 929 | int top_ind_min_y, bot_ind_max_y; |
| 930 | 930 | ||
| 931 | /* top_ind_rn is set to a nonnegative value whenver | 931 | /* top_ind_rn is set to a nonnegative value whenever |
| 932 | row->indicate_bob_p is set, so it's OK that top_row_ends_at_zv_p | 932 | row->indicate_bob_p is set, so it's OK that top_row_ends_at_zv_p |
| 933 | is not initialized here. Similarly for bot_ind_rn, | 933 | is not initialized here. Similarly for bot_ind_rn, |
| 934 | row->indicate_eob_p and bot_row_ends_at_zv_p. */ | 934 | row->indicate_eob_p and bot_row_ends_at_zv_p. */ |
diff --git a/src/ftfont.c b/src/ftfont.c index 9da4a98d692..2f0643a31e0 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -164,6 +164,13 @@ get_adstyle_property (FcPattern *p) | |||
| 164 | char *str, *end; | 164 | char *str, *end; |
| 165 | Lisp_Object adstyle; | 165 | Lisp_Object adstyle; |
| 166 | 166 | ||
| 167 | #ifdef FC_FONTFORMAT | ||
| 168 | if ((FcPatternGetString (p, FC_FONTFORMAT, 0, &fcstr) == FcResultMatch) | ||
| 169 | && xstrcasecmp ((char *) fcstr, "bdf") != 0 | ||
| 170 | && xstrcasecmp ((char *) fcstr, "pcf") != 0) | ||
| 171 | /* Not a BDF nor PCF font. */ | ||
| 172 | return Qnil; | ||
| 173 | #endif | ||
| 167 | if (FcPatternGetString (p, FC_STYLE, 0, &fcstr) != FcResultMatch) | 174 | if (FcPatternGetString (p, FC_STYLE, 0, &fcstr) != FcResultMatch) |
| 168 | return Qnil; | 175 | return Qnil; |
| 169 | str = (char *) fcstr; | 176 | str = (char *) fcstr; |
| @@ -272,7 +279,7 @@ ftfont_pattern_entity (FcPattern *p, Lisp_Object extra) | |||
| 272 | } | 279 | } |
| 273 | else | 280 | else |
| 274 | { | 281 | { |
| 275 | /* As this font is not scalable, parhaps this is a BDF or PCF | 282 | /* As this font is not scalable, perhaps this is a BDF or PCF |
| 276 | font. */ | 283 | font. */ |
| 277 | FT_Face ft_face; | 284 | FT_Face ft_face; |
| 278 | 285 | ||
| @@ -730,7 +737,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots | |||
| 730 | 737 | ||
| 731 | if ((n = FONT_SLANT_NUMERIC (spec)) >= 0 | 738 | if ((n = FONT_SLANT_NUMERIC (spec)) >= 0 |
| 732 | && n < 100) | 739 | && n < 100) |
| 733 | /* Fontconfig doesn't support reverse-italic/obligue. */ | 740 | /* Fontconfig doesn't support reverse-italic/oblique. */ |
| 734 | return NULL; | 741 | return NULL; |
| 735 | 742 | ||
| 736 | if (INTEGERP (AREF (spec, FONT_DPI_INDEX))) | 743 | if (INTEGERP (AREF (spec, FONT_DPI_INDEX))) |
| @@ -1462,7 +1469,7 @@ ftfont_get_bitmap (struct font *font, unsigned int code, struct font_bitmap *bit | |||
| 1462 | : ft_face->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_LCD_V ? 8 | 1469 | : ft_face->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_LCD_V ? 8 |
| 1463 | : -1); | 1470 | : -1); |
| 1464 | if (bitmap->bits_per_pixel < 0) | 1471 | if (bitmap->bits_per_pixel < 0) |
| 1465 | /* We don't suport that kind of pixel mode. */ | 1472 | /* We don't support that kind of pixel mode. */ |
| 1466 | return -1; | 1473 | return -1; |
| 1467 | bitmap->rows = ft_face->glyph->bitmap.rows; | 1474 | bitmap->rows = ft_face->glyph->bitmap.rows; |
| 1468 | bitmap->width = ft_face->glyph->bitmap.width; | 1475 | bitmap->width = ft_face->glyph->bitmap.width; |
diff --git a/src/ftxfont.c b/src/ftxfont.c index bbba3ca8163..e04e802a3db 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c | |||
| @@ -48,14 +48,14 @@ static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long); | |||
| 48 | static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *, | 48 | static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *, |
| 49 | unsigned, int, int, XPoint *, int, int *, | 49 | unsigned, int, int, XPoint *, int, int *, |
| 50 | int); | 50 | int); |
| 51 | static void ftxfont_draw_backgrond (FRAME_PTR, struct font *, GC, | 51 | static void ftxfont_draw_background (FRAME_PTR, struct font *, GC, |
| 52 | int, int, int); | 52 | int, int, int); |
| 53 | 53 | ||
| 54 | struct ftxfont_frame_data | 54 | struct ftxfont_frame_data |
| 55 | { | 55 | { |
| 56 | /* Background and foreground colors. */ | 56 | /* Background and foreground colors. */ |
| 57 | XColor colors[2]; | 57 | XColor colors[2]; |
| 58 | /* GCs interporationg the above colors. gcs[0] is for a color | 58 | /* GCs interpolating the above colors. gcs[0] is for a color |
| 59 | closest to BACKGROUND, and gcs[5] is for a color closest to | 59 | closest to BACKGROUND, and gcs[5] is for a color closest to |
| 60 | FOREGROUND. */ | 60 | FOREGROUND. */ |
| 61 | GC gcs[6]; | 61 | GC gcs[6]; |
| @@ -219,7 +219,8 @@ ftxfont_draw_bitmap (FRAME_PTR f, GC gc_fore, GC *gcs, struct font *font, unsign | |||
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | static void | 221 | static void |
| 222 | ftxfont_draw_backgrond (FRAME_PTR f, struct font *font, GC gc, int x, int y, int width) | 222 | ftxfont_draw_background (FRAME_PTR f, struct font *font, GC gc, int x, int y, |
| 223 | int width) | ||
| 223 | { | 224 | { |
| 224 | XGCValues xgcv; | 225 | XGCValues xgcv; |
| 225 | 226 | ||
| @@ -296,7 +297,7 @@ ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b | |||
| 296 | 297 | ||
| 297 | BLOCK_INPUT; | 298 | BLOCK_INPUT; |
| 298 | if (with_background) | 299 | if (with_background) |
| 299 | ftxfont_draw_backgrond (f, font, s->gc, x, y, s->width); | 300 | ftxfont_draw_background (f, font, s->gc, x, y, s->width); |
| 300 | code = alloca (sizeof (unsigned) * len); | 301 | code = alloca (sizeof (unsigned) * len); |
| 301 | for (i = 0; i < len; i++) | 302 | for (i = 0; i < len; i++) |
| 302 | code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8) | 303 | code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8) |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 31cbd32f441..43cdb38c640 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -127,7 +127,7 @@ xg_set_screen (GtkWidget *w, FRAME_PTR f) | |||
| 127 | 127 | ||
| 128 | Returns non-zero if display could be opened, zero if display could not | 128 | Returns non-zero if display could be opened, zero if display could not |
| 129 | be opened, and less than zero if the GTK version doesn't support | 129 | be opened, and less than zero if the GTK version doesn't support |
| 130 | multipe displays. */ | 130 | multiple displays. */ |
| 131 | 131 | ||
| 132 | void | 132 | void |
| 133 | xg_display_open (char *display_name, Display **dpy) | 133 | xg_display_open (char *display_name, Display **dpy) |
| @@ -1100,6 +1100,14 @@ xg_create_frame_widgets (FRAME_PTR f) | |||
| 1100 | else | 1100 | else |
| 1101 | wtop = gtk_window_new (GTK_WINDOW_TOPLEVEL); | 1101 | wtop = gtk_window_new (GTK_WINDOW_TOPLEVEL); |
| 1102 | 1102 | ||
| 1103 | /* gtk_window_set_has_resize_grip is a Gtk+ 3.0 function but Ubuntu | ||
| 1104 | has backported it to Gtk+ 2.0 and they add the resize grip for | ||
| 1105 | Gtk+ 2.0 applications also. But it has a bug that makes Emacs loop | ||
| 1106 | forever, so disable the grip. */ | ||
| 1107 | #if GTK_MAJOR_VERSION < 3 && defined (HAVE_GTK_WINDOW_SET_HAS_RESIZE_GRIP) | ||
| 1108 | gtk_window_set_has_resize_grip (GTK_WINDOW (wtop), FALSE); | ||
| 1109 | #endif | ||
| 1110 | |||
| 1103 | xg_set_screen (wtop, f); | 1111 | xg_set_screen (wtop, f); |
| 1104 | 1112 | ||
| 1105 | wvbox = gtk_vbox_new (FALSE, 0); | 1113 | wvbox = gtk_vbox_new (FALSE, 0); |
| @@ -2363,7 +2371,7 @@ xg_create_one_menuitem (widget_value *item, | |||
| 2363 | HIGHLIGHT_CB is the callback to call when entering/leaving menu items. | 2371 | HIGHLIGHT_CB is the callback to call when entering/leaving menu items. |
| 2364 | POP_UP_P is non-zero if we shall create a popup menu. | 2372 | POP_UP_P is non-zero if we shall create a popup menu. |
| 2365 | MENU_BAR_P is non-zero if we shall create a menu bar. | 2373 | MENU_BAR_P is non-zero if we shall create a menu bar. |
| 2366 | ADD_TEAROFF_P is non-zero if we shall add a teroff menu item. Ignored | 2374 | ADD_TEAROFF_P is non-zero if we shall add a tearoff menu item. Ignored |
| 2367 | if MENU_BAR_P is non-zero. | 2375 | if MENU_BAR_P is non-zero. |
| 2368 | TOPMENU is the topmost GtkWidget that others shall be placed under. | 2376 | TOPMENU is the topmost GtkWidget that others shall be placed under. |
| 2369 | It may be NULL, in that case we create the appropriate widget | 2377 | It may be NULL, in that case we create the appropriate widget |
| @@ -4262,7 +4270,7 @@ xg_make_tool_item (FRAME_PTR f, | |||
| 4262 | #endif | 4270 | #endif |
| 4263 | gtk_tool_item_set_homogeneous (ti, FALSE); | 4271 | gtk_tool_item_set_homogeneous (ti, FALSE); |
| 4264 | 4272 | ||
| 4265 | /* Callback to save modifyer mask (Shift/Control, etc). GTK makes | 4273 | /* Callback to save modifier mask (Shift/Control, etc). GTK makes |
| 4266 | no distinction based on modifiers in the activate callback, | 4274 | no distinction based on modifiers in the activate callback, |
| 4267 | so we have to do it ourselves. */ | 4275 | so we have to do it ourselves. */ |
| 4268 | g_signal_connect (wb, "button-release-event", | 4276 | g_signal_connect (wb, "button-release-event", |
diff --git a/src/gtkutil.h b/src/gtkutil.h index 2dfb3a5ed6c..7cc2d21f9c4 100644 --- a/src/gtkutil.h +++ b/src/gtkutil.h | |||
| @@ -98,7 +98,7 @@ extern GtkWidget *xg_create_widget (const char *type, | |||
| 98 | struct _widget_value *val, | 98 | struct _widget_value *val, |
| 99 | GCallback select_cb, | 99 | GCallback select_cb, |
| 100 | GCallback deactivate_cb, | 100 | GCallback deactivate_cb, |
| 101 | GCallback hightlight_cb); | 101 | GCallback highlight_cb); |
| 102 | 102 | ||
| 103 | extern void xg_modify_menubar_widgets (GtkWidget *menubar, | 103 | extern void xg_modify_menubar_widgets (GtkWidget *menubar, |
| 104 | FRAME_PTR f, | 104 | FRAME_PTR f, |
| @@ -106,7 +106,7 @@ extern void xg_modify_menubar_widgets (GtkWidget *menubar, | |||
| 106 | int deep_p, | 106 | int deep_p, |
| 107 | GCallback select_cb, | 107 | GCallback select_cb, |
| 108 | GCallback deactivate_cb, | 108 | GCallback deactivate_cb, |
| 109 | GCallback hightlight_cb); | 109 | GCallback highlight_cb); |
| 110 | 110 | ||
| 111 | extern int xg_update_frame_menubar (FRAME_PTR f); | 111 | extern int xg_update_frame_menubar (FRAME_PTR f); |
| 112 | 112 | ||
diff --git a/src/image.c b/src/image.c index fd842f3e347..736c1b3472f 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -7619,7 +7619,7 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7619 | image = image_spec_value (img->spec, QCindex, NULL); | 7619 | image = image_spec_value (img->spec, QCindex, NULL); |
| 7620 | ino = INTEGERP (image) ? XFASTINT (image) : 0; | 7620 | ino = INTEGERP (image) ? XFASTINT (image) : 0; |
| 7621 | ping_wand = NewMagickWand (); | 7621 | ping_wand = NewMagickWand (); |
| 7622 | MagickSetResolution (ping_wand, 2, 2); | 7622 | |
| 7623 | if (filename != NULL) | 7623 | if (filename != NULL) |
| 7624 | { | 7624 | { |
| 7625 | status = MagickPingImage (ping_wand, filename); | 7625 | status = MagickPingImage (ping_wand, filename); |
| @@ -7629,6 +7629,8 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7629 | status = MagickPingImageBlob (ping_wand, contents, size); | 7629 | status = MagickPingImageBlob (ping_wand, contents, size); |
| 7630 | } | 7630 | } |
| 7631 | 7631 | ||
| 7632 | MagickSetResolution (ping_wand, 2, 2); | ||
| 7633 | |||
| 7632 | if (! (0 <= ino && ino < MagickGetNumberImages (ping_wand))) | 7634 | if (! (0 <= ino && ino < MagickGetNumberImages (ping_wand))) |
| 7633 | { | 7635 | { |
| 7634 | image_error ("Invalid image number `%s' in image `%s'", | 7636 | image_error ("Invalid image number `%s' in image `%s'", |
| @@ -7755,7 +7757,7 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7755 | } | 7757 | } |
| 7756 | 7758 | ||
| 7757 | /* Finally we are done manipulating the image. Figure out the | 7759 | /* Finally we are done manipulating the image. Figure out the |
| 7758 | resulting width/height and transfer ownerwship to Emacs. */ | 7760 | resulting width/height and transfer ownership to Emacs. */ |
| 7759 | height = MagickGetImageHeight (image_wand); | 7761 | height = MagickGetImageHeight (image_wand); |
| 7760 | width = MagickGetImageWidth (image_wand); | 7762 | width = MagickGetImageWidth (image_wand); |
| 7761 | 7763 | ||
| @@ -7787,7 +7789,7 @@ imagemagick_load_image (struct frame *f, struct image *img, | |||
| 7787 | goto imagemagick_error; | 7789 | goto imagemagick_error; |
| 7788 | } | 7790 | } |
| 7789 | 7791 | ||
| 7790 | /* Copy imagegmagick image to x with primitive yet robust pixel | 7792 | /* Copy imagemagick image to x with primitive yet robust pixel |
| 7791 | pusher loop. This has been tested a lot with many different | 7793 | pusher loop. This has been tested a lot with many different |
| 7792 | images. */ | 7794 | images. */ |
| 7793 | 7795 | ||
diff --git a/src/intervals.c b/src/intervals.c index 6f8dda4294e..ecb37495a04 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -1900,7 +1900,7 @@ set_point (ptrdiff_t charpos) | |||
| 1900 | current buffer, and the invisible property has a `stickiness' such that | 1900 | current buffer, and the invisible property has a `stickiness' such that |
| 1901 | inserting a character at position POS would inherit the property it, | 1901 | inserting a character at position POS would inherit the property it, |
| 1902 | return POS + ADJ, otherwise return POS. If TEST_INTANG is non-zero, | 1902 | return POS + ADJ, otherwise return POS. If TEST_INTANG is non-zero, |
| 1903 | then intangibility is required as well as invisibleness. | 1903 | then intangibility is required as well as invisibility. |
| 1904 | 1904 | ||
| 1905 | TEST_OFFS should be either 0 or -1, and ADJ should be either 1 or -1. | 1905 | TEST_OFFS should be either 0 or -1, and ADJ should be either 1 or -1. |
| 1906 | 1906 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index 3b82c497650..aa8a9908f3b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -464,7 +464,8 @@ static void input_available_signal (int signo); | |||
| 464 | static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object, | 464 | static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object, |
| 465 | Lisp_Object); | 465 | Lisp_Object); |
| 466 | static void handle_interrupt (void); | 466 | static void handle_interrupt (void); |
| 467 | static void quit_throw_to_read_char (void) NO_RETURN; | 467 | static void quit_throw_to_read_char (int) NO_RETURN; |
| 468 | static void process_special_events (void); | ||
| 468 | static void timer_start_idle (void); | 469 | static void timer_start_idle (void); |
| 469 | static void timer_stop_idle (void); | 470 | static void timer_stop_idle (void); |
| 470 | static void timer_resume_idle (void); | 471 | static void timer_resume_idle (void); |
| @@ -653,7 +654,7 @@ echo_now (void) | |||
| 653 | echo_kboard = current_kboard; | 654 | echo_kboard = current_kboard; |
| 654 | 655 | ||
| 655 | if (waiting_for_input && !NILP (Vquit_flag)) | 656 | if (waiting_for_input && !NILP (Vquit_flag)) |
| 656 | quit_throw_to_read_char (); | 657 | quit_throw_to_read_char (0); |
| 657 | } | 658 | } |
| 658 | 659 | ||
| 659 | /* Turn off echoing, for the start of a new command. */ | 660 | /* Turn off echoing, for the start of a new command. */ |
| @@ -2998,7 +2999,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, | |||
| 2998 | Lisp_Object keys; | 2999 | Lisp_Object keys; |
| 2999 | ptrdiff_t key_count; | 3000 | ptrdiff_t key_count; |
| 3000 | int key_count_reset; | 3001 | int key_count_reset; |
| 3001 | struct gcpro inner_gcpro1; | 3002 | struct gcpro gcpro1; |
| 3002 | ptrdiff_t count = SPECPDL_INDEX (); | 3003 | ptrdiff_t count = SPECPDL_INDEX (); |
| 3003 | 3004 | ||
| 3004 | /* Save the echo status. */ | 3005 | /* Save the echo status. */ |
| @@ -3026,7 +3027,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, | |||
| 3026 | keys = Fcopy_sequence (this_command_keys); | 3027 | keys = Fcopy_sequence (this_command_keys); |
| 3027 | else | 3028 | else |
| 3028 | keys = Qnil; | 3029 | keys = Qnil; |
| 3029 | GCPRO1_VAR (keys, inner_gcpro); | 3030 | GCPRO1 (keys); |
| 3030 | 3031 | ||
| 3031 | /* Clear out this_command_keys. */ | 3032 | /* Clear out this_command_keys. */ |
| 3032 | this_command_key_count = 0; | 3033 | this_command_key_count = 0; |
| @@ -3064,7 +3065,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps, | |||
| 3064 | if (saved_immediate_echo) | 3065 | if (saved_immediate_echo) |
| 3065 | echo_now (); | 3066 | echo_now (); |
| 3066 | 3067 | ||
| 3067 | UNGCPRO_VAR (inner_gcpro); | 3068 | UNGCPRO; |
| 3068 | 3069 | ||
| 3069 | /* The input method can return no events. */ | 3070 | /* The input method can return no events. */ |
| 3070 | if (! CONSP (tem)) | 3071 | if (! CONSP (tem)) |
| @@ -3817,7 +3818,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 3817 | /* If the quit flag is set, then read_char will return | 3818 | /* If the quit flag is set, then read_char will return |
| 3818 | quit_char, so that counts as "available input." */ | 3819 | quit_char, so that counts as "available input." */ |
| 3819 | if (!NILP (Vquit_flag)) | 3820 | if (!NILP (Vquit_flag)) |
| 3820 | quit_throw_to_read_char (); | 3821 | quit_throw_to_read_char (0); |
| 3821 | 3822 | ||
| 3822 | /* One way or another, wait until input is available; then, if | 3823 | /* One way or another, wait until input is available; then, if |
| 3823 | interrupt handlers have not read it, read it now. */ | 3824 | interrupt handlers have not read it, read it now. */ |
| @@ -4145,14 +4146,12 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4145 | return (obj); | 4146 | return (obj); |
| 4146 | } | 4147 | } |
| 4147 | 4148 | ||
| 4148 | /* Process any events that are not user-visible, | 4149 | /* Process any non-user-visible events (currently X selection events), |
| 4149 | then return, without reading any user-visible events. */ | 4150 | without reading any user-visible events. */ |
| 4150 | 4151 | ||
| 4151 | void | 4152 | static void |
| 4152 | swallow_events (int do_display) | 4153 | process_special_events (void) |
| 4153 | { | 4154 | { |
| 4154 | int old_timers_run; | ||
| 4155 | |||
| 4156 | while (kbd_fetch_ptr != kbd_store_ptr) | 4155 | while (kbd_fetch_ptr != kbd_store_ptr) |
| 4157 | { | 4156 | { |
| 4158 | struct input_event *event; | 4157 | struct input_event *event; |
| @@ -4187,6 +4186,17 @@ swallow_events (int do_display) | |||
| 4187 | else | 4186 | else |
| 4188 | break; | 4187 | break; |
| 4189 | } | 4188 | } |
| 4189 | } | ||
| 4190 | |||
| 4191 | /* Process any events that are not user-visible, run timer events that | ||
| 4192 | are ripe, and return, without reading any user-visible events. */ | ||
| 4193 | |||
| 4194 | void | ||
| 4195 | swallow_events (int do_display) | ||
| 4196 | { | ||
| 4197 | int old_timers_run; | ||
| 4198 | |||
| 4199 | process_special_events (); | ||
| 4190 | 4200 | ||
| 4191 | old_timers_run = timers_run; | 4201 | old_timers_run = timers_run; |
| 4192 | get_input_pending (&input_pending, READABLE_EVENTS_DO_TIMERS_NOW); | 4202 | get_input_pending (&input_pending, READABLE_EVENTS_DO_TIMERS_NOW); |
| @@ -4813,7 +4823,7 @@ const char *const lispy_function_keys[] = | |||
| 4813 | "ico-00", /* VK_ICO_00 0xE4 */ | 4823 | "ico-00", /* VK_ICO_00 0xE4 */ |
| 4814 | 0, /* VK_PROCESSKEY 0xE5 - used by IME */ | 4824 | 0, /* VK_PROCESSKEY 0xE5 - used by IME */ |
| 4815 | "ico-clear", /* VK_ICO_CLEAR 0xE6 */ | 4825 | "ico-clear", /* VK_ICO_CLEAR 0xE6 */ |
| 4816 | 0, /* VK_PACKET 0xE7 - used to pass unicode chars */ | 4826 | 0, /* VK_PACKET 0xE7 - used to pass Unicode chars */ |
| 4817 | 0, /* 0xE8 */ | 4827 | 0, /* 0xE8 */ |
| 4818 | "reset", /* VK_OEM_RESET 0xE9 */ | 4828 | "reset", /* VK_OEM_RESET 0xE9 */ |
| 4819 | "jump", /* VK_OEM_JUMP 0xEA */ | 4829 | "jump", /* VK_OEM_JUMP 0xEA */ |
| @@ -9058,9 +9068,9 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9058 | int junk; | 9068 | int junk; |
| 9059 | #endif | 9069 | #endif |
| 9060 | 9070 | ||
| 9061 | struct gcpro outer_gcpro1; | 9071 | struct gcpro gcpro1; |
| 9062 | 9072 | ||
| 9063 | GCPRO1_VAR (fake_prefixed_keys, outer_gcpro); | 9073 | GCPRO1 (fake_prefixed_keys); |
| 9064 | raw_keybuf_count = 0; | 9074 | raw_keybuf_count = 0; |
| 9065 | 9075 | ||
| 9066 | last_nonmenu_event = Qnil; | 9076 | last_nonmenu_event = Qnil; |
| @@ -9356,7 +9366,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 9356 | if (EQ (key, Qt)) | 9366 | if (EQ (key, Qt)) |
| 9357 | { | 9367 | { |
| 9358 | unbind_to (count, Qnil); | 9368 | unbind_to (count, Qnil); |
| 9359 | UNGCPRO_VAR (outer_gcpro); | 9369 | UNGCPRO; |
| 9360 | return -1; | 9370 | return -1; |
| 9361 | } | 9371 | } |
| 9362 | 9372 | ||
| @@ -10054,7 +10064,7 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 10054 | add_command_key (keybuf[t]); | 10064 | add_command_key (keybuf[t]); |
| 10055 | } | 10065 | } |
| 10056 | 10066 | ||
| 10057 | UNGCPRO_VAR (outer_gcpro); | 10067 | UNGCPRO; |
| 10058 | return t; | 10068 | return t; |
| 10059 | } | 10069 | } |
| 10060 | 10070 | ||
| @@ -10142,7 +10152,7 @@ will read just one key sequence. */) | |||
| 10142 | ! NILP (can_return_switch_frame), 0); | 10152 | ! NILP (can_return_switch_frame), 0); |
| 10143 | 10153 | ||
| 10144 | #if 0 /* The following is fine for code reading a key sequence and | 10154 | #if 0 /* The following is fine for code reading a key sequence and |
| 10145 | then proceeding with a lenghty computation, but it's not good | 10155 | then proceeding with a lengthy computation, but it's not good |
| 10146 | for code reading keys in a loop, like an input method. */ | 10156 | for code reading keys in a loop, like an input method. */ |
| 10147 | #ifdef HAVE_WINDOW_SYSTEM | 10157 | #ifdef HAVE_WINDOW_SYSTEM |
| 10148 | if (display_hourglass_p) | 10158 | if (display_hourglass_p) |
| @@ -10527,6 +10537,9 @@ if there is a doubt, the value is t. */) | |||
| 10527 | || !NILP (Vunread_input_method_events)) | 10537 | || !NILP (Vunread_input_method_events)) |
| 10528 | return (Qt); | 10538 | return (Qt); |
| 10529 | 10539 | ||
| 10540 | /* Process non-user-visible events (Bug#10195). */ | ||
| 10541 | process_special_events (); | ||
| 10542 | |||
| 10530 | get_input_pending (&input_pending, | 10543 | get_input_pending (&input_pending, |
| 10531 | READABLE_EVENTS_DO_TIMERS_NOW | 10544 | READABLE_EVENTS_DO_TIMERS_NOW |
| 10532 | | READABLE_EVENTS_FILTER_EVENTS); | 10545 | | READABLE_EVENTS_FILTER_EVENTS); |
| @@ -10829,7 +10842,7 @@ set_waiting_for_input (struct timeval *time_to_clear) | |||
| 10829 | /* If handle_interrupt was called before and buffered a C-g, | 10842 | /* If handle_interrupt was called before and buffered a C-g, |
| 10830 | make it run again now, to avoid timing error. */ | 10843 | make it run again now, to avoid timing error. */ |
| 10831 | if (!NILP (Vquit_flag)) | 10844 | if (!NILP (Vquit_flag)) |
| 10832 | quit_throw_to_read_char (); | 10845 | quit_throw_to_read_char (0); |
| 10833 | } | 10846 | } |
| 10834 | 10847 | ||
| 10835 | void | 10848 | void |
| @@ -10844,7 +10857,7 @@ clear_waiting_for_input (void) | |||
| 10844 | 10857 | ||
| 10845 | If we have a frame on the controlling tty, we assume that the | 10858 | If we have a frame on the controlling tty, we assume that the |
| 10846 | SIGINT was generated by C-g, so we call handle_interrupt. | 10859 | SIGINT was generated by C-g, so we call handle_interrupt. |
| 10847 | Otherwise, the handler kills Emacs. */ | 10860 | Otherwise, tell QUIT to kill Emacs. */ |
| 10848 | 10861 | ||
| 10849 | static void | 10862 | static void |
| 10850 | interrupt_signal (int signalnum) /* If we don't have an argument, some */ | 10863 | interrupt_signal (int signalnum) /* If we don't have an argument, some */ |
| @@ -10861,12 +10874,10 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */ | |||
| 10861 | if (!terminal) | 10874 | if (!terminal) |
| 10862 | { | 10875 | { |
| 10863 | /* If there are no frames there, let's pretend that we are a | 10876 | /* If there are no frames there, let's pretend that we are a |
| 10864 | well-behaving UN*X program and quit. We cannot do that while | 10877 | well-behaving UN*X program and quit. We must not call Lisp |
| 10865 | GC is in progress, though. */ | 10878 | in a signal handler, so tell QUIT to exit when it is |
| 10866 | if (!gc_in_progress) | 10879 | safe. */ |
| 10867 | Fkill_emacs (Qnil); | 10880 | Vquit_flag = Qkill_emacs; |
| 10868 | else | ||
| 10869 | Vquit_flag = Qt; | ||
| 10870 | } | 10881 | } |
| 10871 | else | 10882 | else |
| 10872 | { | 10883 | { |
| @@ -11015,15 +11026,20 @@ handle_interrupt (void) | |||
| 11015 | separate event loop thread like W32. */ | 11026 | separate event loop thread like W32. */ |
| 11016 | #ifndef HAVE_NS | 11027 | #ifndef HAVE_NS |
| 11017 | if (waiting_for_input && !echoing) | 11028 | if (waiting_for_input && !echoing) |
| 11018 | quit_throw_to_read_char (); | 11029 | quit_throw_to_read_char (1); |
| 11019 | #endif | 11030 | #endif |
| 11020 | } | 11031 | } |
| 11021 | 11032 | ||
| 11022 | /* Handle a C-g by making read_char return C-g. */ | 11033 | /* Handle a C-g by making read_char return C-g. */ |
| 11023 | 11034 | ||
| 11024 | static void | 11035 | static void |
| 11025 | quit_throw_to_read_char (void) | 11036 | quit_throw_to_read_char (int from_signal) |
| 11026 | { | 11037 | { |
| 11038 | /* When not called from a signal handler it is safe to call | ||
| 11039 | Lisp. */ | ||
| 11040 | if (!from_signal && EQ (Vquit_flag, Qkill_emacs)) | ||
| 11041 | Fkill_emacs (Qnil); | ||
| 11042 | |||
| 11027 | sigfree (); | 11043 | sigfree (); |
| 11028 | /* Prevent another signal from doing this before we finish. */ | 11044 | /* Prevent another signal from doing this before we finish. */ |
| 11029 | clear_waiting_for_input (); | 11045 | clear_waiting_for_input (); |
| @@ -12105,7 +12121,7 @@ This variable is keyboard-local. */); | |||
| 12105 | Function key definitions that apply to all terminal devices should go | 12121 | Function key definitions that apply to all terminal devices should go |
| 12106 | here. If a mapping is defined in both the current | 12122 | here. If a mapping is defined in both the current |
| 12107 | `local-function-key-map' binding and this variable, then the local | 12123 | `local-function-key-map' binding and this variable, then the local |
| 12108 | definition will take precendence. */); | 12124 | definition will take precedence. */); |
| 12109 | Vfunction_key_map = Fmake_sparse_keymap (Qnil); | 12125 | Vfunction_key_map = Fmake_sparse_keymap (Qnil); |
| 12110 | 12126 | ||
| 12111 | DEFVAR_LISP ("key-translation-map", Vkey_translation_map, | 12127 | DEFVAR_LISP ("key-translation-map", Vkey_translation_map, |
| @@ -12250,7 +12266,7 @@ text in the region before modifying the buffer. The next | |||
| 12250 | DEFVAR_LISP ("debug-on-event", | 12266 | DEFVAR_LISP ("debug-on-event", |
| 12251 | Vdebug_on_event, | 12267 | Vdebug_on_event, |
| 12252 | doc: /* Enter debugger on this event. When Emacs | 12268 | doc: /* Enter debugger on this event. When Emacs |
| 12253 | receives the special event specifed by this variable, it will try to | 12269 | receives the special event specified by this variable, it will try to |
| 12254 | break into the debugger as soon as possible instead of processing the | 12270 | break into the debugger as soon as possible instead of processing the |
| 12255 | event normally through `special-event-map'. | 12271 | event normally through `special-event-map'. |
| 12256 | 12272 | ||
diff --git a/src/lisp.h b/src/lisp.h index 648eb6430bd..ecc2fd16267 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -163,14 +163,23 @@ extern int suppress_checking EXTERNALLY_VISIBLE; | |||
| 163 | /* First, try and define DECL_ALIGN(type,var) which declares a static | 163 | /* First, try and define DECL_ALIGN(type,var) which declares a static |
| 164 | variable VAR of type TYPE with the added requirement that it be | 164 | variable VAR of type TYPE with the added requirement that it be |
| 165 | TYPEBITS-aligned. */ | 165 | TYPEBITS-aligned. */ |
| 166 | |||
| 167 | #ifndef GCTYPEBITS | ||
| 168 | #define GCTYPEBITS 3 | ||
| 169 | #endif | ||
| 170 | |||
| 166 | #ifndef NO_DECL_ALIGN | 171 | #ifndef NO_DECL_ALIGN |
| 167 | # ifndef DECL_ALIGN | 172 | # ifndef DECL_ALIGN |
| 168 | # if HAVE_ATTRIBUTE_ALIGNED | 173 | # if HAVE_ATTRIBUTE_ALIGNED |
| 169 | # define DECL_ALIGN(type, var) \ | 174 | # define DECL_ALIGN(type, var) \ |
| 170 | type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var | 175 | type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var |
| 171 | # elif defined(_MSC_VER) | 176 | # elif defined(_MSC_VER) |
| 177 | # define ALIGN_GCTYPEBITS 8 | ||
| 178 | # if (1 << GCTYPEBITS) != ALIGN_GCTYPEBITS | ||
| 179 | # error ALIGN_GCTYPEBITS is wrong! | ||
| 180 | # endif | ||
| 172 | # define DECL_ALIGN(type, var) \ | 181 | # define DECL_ALIGN(type, var) \ |
| 173 | type __declspec(align(1 << GCTYPEBITS)) var | 182 | type __declspec(align(ALIGN_GCTYPEBITS)) var |
| 174 | # else | 183 | # else |
| 175 | /* What directives do other compilers use? */ | 184 | /* What directives do other compilers use? */ |
| 176 | # endif | 185 | # endif |
| @@ -300,10 +309,6 @@ enum Lisp_Fwd_Type | |||
| 300 | Lisp_Fwd_Kboard_Obj, /* Fwd to a Lisp_Object field of kboards. */ | 309 | Lisp_Fwd_Kboard_Obj, /* Fwd to a Lisp_Object field of kboards. */ |
| 301 | }; | 310 | }; |
| 302 | 311 | ||
| 303 | #ifndef GCTYPEBITS | ||
| 304 | #define GCTYPEBITS 3 | ||
| 305 | #endif | ||
| 306 | |||
| 307 | /* These values are overridden by the m- file on some machines. */ | 312 | /* These values are overridden by the m- file on some machines. */ |
| 308 | #ifndef VALBITS | 313 | #ifndef VALBITS |
| 309 | #define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS) | 314 | #define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS) |
| @@ -324,7 +329,7 @@ union Lisp_Object | |||
| 324 | 329 | ||
| 325 | struct | 330 | struct |
| 326 | { | 331 | { |
| 327 | /* Use explict signed, the signedness of a bit-field of type | 332 | /* Use explicit signed, the signedness of a bit-field of type |
| 328 | int is implementation defined. */ | 333 | int is implementation defined. */ |
| 329 | signed EMACS_INT val : VALBITS; | 334 | signed EMACS_INT val : VALBITS; |
| 330 | ENUM_BF (Lisp_Type) type : GCTYPEBITS; | 335 | ENUM_BF (Lisp_Type) type : GCTYPEBITS; |
| @@ -349,7 +354,7 @@ union Lisp_Object | |||
| 349 | struct | 354 | struct |
| 350 | { | 355 | { |
| 351 | ENUM_BF (Lisp_Type) type : GCTYPEBITS; | 356 | ENUM_BF (Lisp_Type) type : GCTYPEBITS; |
| 352 | /* Use explict signed, the signedness of a bit-field of type | 357 | /* Use explicit signed, the signedness of a bit-field of type |
| 353 | int is implementation defined. */ | 358 | int is implementation defined. */ |
| 354 | signed EMACS_INT val : VALBITS; | 359 | signed EMACS_INT val : VALBITS; |
| 355 | } s; | 360 | } s; |
| @@ -948,7 +953,7 @@ struct Lisp_Vector | |||
| 948 | 953 | ||
| 949 | /* Compute A OP B, using the unsigned comparison operator OP. A and B | 954 | /* Compute A OP B, using the unsigned comparison operator OP. A and B |
| 950 | should be integer expressions. This is not the same as | 955 | should be integer expressions. This is not the same as |
| 951 | mathemeatical comparison; for example, UNSIGNED_CMP (0, <, -1) | 956 | mathematical comparison; for example, UNSIGNED_CMP (0, <, -1) |
| 952 | returns 1. For efficiency, prefer plain unsigned comparison if A | 957 | returns 1. For efficiency, prefer plain unsigned comparison if A |
| 953 | and B's sizes both fit (after integer promotion). */ | 958 | and B's sizes both fit (after integer promotion). */ |
| 954 | #define UNSIGNED_CMP(a, op, b) \ | 959 | #define UNSIGNED_CMP(a, op, b) \ |
| @@ -1909,9 +1914,6 @@ typedef struct { | |||
| 1909 | CHECK_NATNUM (tmp); \ | 1914 | CHECK_NATNUM (tmp); \ |
| 1910 | XSETCDR ((x), tmp); \ | 1915 | XSETCDR ((x), tmp); \ |
| 1911 | } while (0) | 1916 | } while (0) |
| 1912 | |||
| 1913 | /* Cast pointers to this type to compare them. */ | ||
| 1914 | #define PNTR_COMPARISON_TYPE uintptr_t | ||
| 1915 | 1917 | ||
| 1916 | /* Define a built-in function for calling from Lisp. | 1918 | /* Define a built-in function for calling from Lisp. |
| 1917 | `lname' should be the name to give the function in Lisp, | 1919 | `lname' should be the name to give the function in Lisp, |
| @@ -2158,7 +2160,10 @@ extern char *stack_bottom; | |||
| 2158 | Exception: if you set immediate_quit to nonzero, | 2160 | Exception: if you set immediate_quit to nonzero, |
| 2159 | then the handler that responds to the C-g does the quit itself. | 2161 | then the handler that responds to the C-g does the quit itself. |
| 2160 | This is a good thing to do around a loop that has no side effects | 2162 | This is a good thing to do around a loop that has no side effects |
| 2161 | and (in particular) cannot call arbitrary Lisp code. */ | 2163 | and (in particular) cannot call arbitrary Lisp code. |
| 2164 | |||
| 2165 | If quit-flag is set to `kill-emacs' the SIGINT handler has received | ||
| 2166 | a request to exit Emacs when it is safe to do. */ | ||
| 2162 | 2167 | ||
| 2163 | #ifdef SYNC_INPUT | 2168 | #ifdef SYNC_INPUT |
| 2164 | extern void process_pending_signals (void); | 2169 | extern void process_pending_signals (void); |
| @@ -2170,16 +2175,11 @@ extern int pending_signals; | |||
| 2170 | #define ELSE_PENDING_SIGNALS | 2175 | #define ELSE_PENDING_SIGNALS |
| 2171 | #endif /* not SYNC_INPUT */ | 2176 | #endif /* not SYNC_INPUT */ |
| 2172 | 2177 | ||
| 2178 | extern void process_quit_flag (void); | ||
| 2173 | #define QUIT \ | 2179 | #define QUIT \ |
| 2174 | do { \ | 2180 | do { \ |
| 2175 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ | 2181 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ |
| 2176 | { \ | 2182 | process_quit_flag (); \ |
| 2177 | Lisp_Object flag = Vquit_flag; \ | ||
| 2178 | Vquit_flag = Qnil; \ | ||
| 2179 | if (EQ (Vthrow_on_input, flag)) \ | ||
| 2180 | Fthrow (Vthrow_on_input, Qt); \ | ||
| 2181 | Fsignal (Qquit, Qnil); \ | ||
| 2182 | } \ | ||
| 2183 | ELSE_PENDING_SIGNALS \ | 2183 | ELSE_PENDING_SIGNALS \ |
| 2184 | } while (0) | 2184 | } while (0) |
| 2185 | 2185 | ||
| @@ -2253,143 +2253,127 @@ struct gcpro | |||
| 2253 | || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) | 2253 | || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) |
| 2254 | 2254 | ||
| 2255 | 2255 | ||
| 2256 | #define GCPRO1(var) \ | ||
| 2257 | GCPRO1_VAR (var, gcpro) | ||
| 2258 | #define GCPRO2(var1, var2) \ | ||
| 2259 | GCPRO2_VAR (var1, var2, gcpro) | ||
| 2260 | #define GCPRO3(var1, var2, var3) \ | ||
| 2261 | GCPRO3_VAR (var1, var2, var3, gcpro) | ||
| 2262 | #define GCPRO4(var1, var2, var3, var4) \ | ||
| 2263 | GCPRO4_VAR (var1, var2, var3, var4, gcpro) | ||
| 2264 | #define GCPRO5(var1, var2, var3, var4, var5) \ | ||
| 2265 | GCPRO5_VAR (var1, var2, var3, var4, var5, gcpro) | ||
| 2266 | #define GCPRO6(var1, var2, var3, var4, var5, var6) \ | ||
| 2267 | GCPRO6_VAR (var1, var2, var3, var4, var5, var6, gcpro) | ||
| 2268 | #define UNGCPRO UNGCPRO_VAR (gcpro) | ||
| 2269 | |||
| 2270 | #if GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS | 2256 | #if GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS |
| 2271 | 2257 | ||
| 2272 | /* Do something silly with gcproN vars just so gcc shuts up. */ | 2258 | /* Do something silly with gcproN vars just so gcc shuts up. */ |
| 2273 | /* You get warnings from MIPSPro... */ | 2259 | /* You get warnings from MIPSPro... */ |
| 2274 | 2260 | ||
| 2275 | #define GCPRO1_VAR(var, gcpro) ((void) gcpro##1) | 2261 | #define GCPRO1(varname) ((void) gcpro1) |
| 2276 | #define GCPRO2_VAR(var1, var2, gcpro) \ | 2262 | #define GCPRO2(varname1, varname2) ((void) gcpro2, (void) gcpro1) |
| 2277 | ((void) gcpro##2, (void) gcpro##1) | 2263 | #define GCPRO3(varname1, varname2, varname3) \ |
| 2278 | #define GCPRO3_VAR(var1, var2, var3, gcpro) \ | 2264 | ((void) gcpro3, (void) gcpro2, (void) gcpro1) |
| 2279 | ((void) gcpro##3, (void) gcpro##2, (void) gcpro##1) | 2265 | #define GCPRO4(varname1, varname2, varname3, varname4) \ |
| 2280 | #define GCPRO4_VAR(var1, var2, var3, var4, gcpro) \ | 2266 | ((void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1) |
| 2281 | ((void) gcpro##4, (void) gcpro##3, (void) gcpro##2, (void) gcpro##1) | 2267 | #define GCPRO5(varname1, varname2, varname3, varname4, varname5) \ |
| 2282 | #define GCPRO5_VAR(var1, var2, var3, var4, var5, gcpro) \ | 2268 | ((void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, (void) gcpro1) |
| 2283 | ((void) gcpro##5, (void) gcpro##4, (void) gcpro##3, (void) gcpro##2, \ | 2269 | #define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \ |
| 2284 | (void) gcpro##1) | 2270 | ((void) gcpro6, (void) gcpro5, (void) gcpro4, (void) gcpro3, (void) gcpro2, \ |
| 2285 | #define GCPRO6_VAR(var1, var2, var3, var4, var5, var6, gcpro) \ | 2271 | (void) gcpro1) |
| 2286 | ((void) gcpro##6, (void) gcpro##5, (void) gcpro##4, (void) gcpro##3, \ | 2272 | #define UNGCPRO ((void) 0) |
| 2287 | (void) gcpro##2, (void) gcpro##1) | ||
| 2288 | #define UNGCPRO_VAR(gcpro) ((void) 0) | ||
| 2289 | 2273 | ||
| 2290 | #else /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */ | 2274 | #else /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */ |
| 2291 | 2275 | ||
| 2292 | #ifndef DEBUG_GCPRO | 2276 | #ifndef DEBUG_GCPRO |
| 2293 | 2277 | ||
| 2294 | #define GCPRO1_VAR(var1, gcpro) \ | 2278 | #define GCPRO1(varname) \ |
| 2295 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2279 | {gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \ |
| 2296 | gcprolist = &gcpro##1; } | 2280 | gcprolist = &gcpro1; } |
| 2297 | 2281 | ||
| 2298 | #define GCPRO2_VAR(var1, var2, gcpro) \ | 2282 | #define GCPRO2(varname1, varname2) \ |
| 2299 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2283 | {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ |
| 2300 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ | 2284 | gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ |
| 2301 | gcprolist = &gcpro##2; } | 2285 | gcprolist = &gcpro2; } |
| 2302 | 2286 | ||
| 2303 | #define GCPRO3_VAR(var1, var2, var3, gcpro) \ | 2287 | #define GCPRO3(varname1, varname2, varname3) \ |
| 2304 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2288 | {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ |
| 2305 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ | 2289 | gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ |
| 2306 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ | 2290 | gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ |
| 2307 | gcprolist = &gcpro##3; } | 2291 | gcprolist = &gcpro3; } |
| 2308 | 2292 | ||
| 2309 | #define GCPRO4_VAR(var1, var2, var3, var4, gcpro) \ | 2293 | #define GCPRO4(varname1, varname2, varname3, varname4) \ |
| 2310 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2294 | {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ |
| 2311 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ | 2295 | gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ |
| 2312 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ | 2296 | gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ |
| 2313 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ | 2297 | gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ |
| 2314 | gcprolist = &gcpro##4; } | 2298 | gcprolist = &gcpro4; } |
| 2315 | 2299 | ||
| 2316 | #define GCPRO5_VAR(var1, var2, var3, var4, var5, gcpro) \ | 2300 | #define GCPRO5(varname1, varname2, varname3, varname4, varname5) \ |
| 2317 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2301 | {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ |
| 2318 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ | 2302 | gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ |
| 2319 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ | 2303 | gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ |
| 2320 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ | 2304 | gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ |
| 2321 | gcpro##5 .next = &gcpro##4; gcpro##5 .var = &var5; gcpro##5 .nvars = 1; \ | 2305 | gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \ |
| 2322 | gcprolist = &gcpro##5; } | 2306 | gcprolist = &gcpro5; } |
| 2323 | 2307 | ||
| 2324 | #define GCPRO6_VAR(var1, var2, var3, var4, var5, var6, gcpro) \ | 2308 | #define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \ |
| 2325 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2309 | {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ |
| 2326 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ | 2310 | gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ |
| 2327 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ | 2311 | gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ |
| 2328 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ | 2312 | gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ |
| 2329 | gcpro##5 .next = &gcpro##4; gcpro##5 .var = &var5; gcpro##5 .nvars = 1; \ | 2313 | gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \ |
| 2330 | gcpro##6 .next = &gcpro##5; gcpro##6 .var = &var6; gcpro##6 .nvars = 1; \ | 2314 | gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \ |
| 2331 | gcprolist = &gcpro##6; } | 2315 | gcprolist = &gcpro6; } |
| 2332 | 2316 | ||
| 2333 | #define UNGCPRO_VAR(gcpro) (gcprolist = gcpro##1 .next) | 2317 | #define UNGCPRO (gcprolist = gcpro1.next) |
| 2334 | 2318 | ||
| 2335 | #else | 2319 | #else |
| 2336 | 2320 | ||
| 2337 | extern int gcpro_level; | 2321 | extern int gcpro_level; |
| 2338 | 2322 | ||
| 2339 | #define GCPRO1_VAR(var1, gcpro) \ | 2323 | #define GCPRO1(varname) \ |
| 2340 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2324 | {gcpro1.next = gcprolist; gcpro1.var = &varname; gcpro1.nvars = 1; \ |
| 2341 | gcpro##1 .level = gcpro_level++; \ | 2325 | gcpro1.level = gcpro_level++; \ |
| 2342 | gcprolist = &gcpro##1; } | 2326 | gcprolist = &gcpro1; } |
| 2343 | 2327 | ||
| 2344 | #define GCPRO2_VAR(var1, var2, gcpro) \ | 2328 | #define GCPRO2(varname1, varname2) \ |
| 2345 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2329 | {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ |
| 2346 | gcpro##1 .level = gcpro_level; \ | 2330 | gcpro1.level = gcpro_level; \ |
| 2347 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ | 2331 | gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ |
| 2348 | gcpro##2 .level = gcpro_level++; \ | 2332 | gcpro2.level = gcpro_level++; \ |
| 2349 | gcprolist = &gcpro##2; } | 2333 | gcprolist = &gcpro2; } |
| 2350 | 2334 | ||
| 2351 | #define GCPRO3_VAR(var1, var2, var3, gcpro) \ | 2335 | #define GCPRO3(varname1, varname2, varname3) \ |
| 2352 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2336 | {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ |
| 2353 | gcpro##1 .level = gcpro_level; \ | 2337 | gcpro1.level = gcpro_level; \ |
| 2354 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ | 2338 | gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ |
| 2355 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ | 2339 | gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ |
| 2356 | gcpro##3 .level = gcpro_level++; \ | 2340 | gcpro3.level = gcpro_level++; \ |
| 2357 | gcprolist = &gcpro##3; } | 2341 | gcprolist = &gcpro3; } |
| 2358 | 2342 | ||
| 2359 | #define GCPRO4_VAR(var1, var2, var3, var4, gcpro) \ | 2343 | #define GCPRO4(varname1, varname2, varname3, varname4) \ |
| 2360 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2344 | {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ |
| 2361 | gcpro##1 .level = gcpro_level; \ | 2345 | gcpro1.level = gcpro_level; \ |
| 2362 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ | 2346 | gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ |
| 2363 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ | 2347 | gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ |
| 2364 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ | 2348 | gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ |
| 2365 | gcpro##4 .level = gcpro_level++; \ | 2349 | gcpro4.level = gcpro_level++; \ |
| 2366 | gcprolist = &gcpro##4; } | 2350 | gcprolist = &gcpro4; } |
| 2367 | 2351 | ||
| 2368 | #define GCPRO5_VAR(var1, var2, var3, var4, var5, gcpro) \ | 2352 | #define GCPRO5(varname1, varname2, varname3, varname4, varname5) \ |
| 2369 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2353 | {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ |
| 2370 | gcpro##1 .level = gcpro_level; \ | 2354 | gcpro1.level = gcpro_level; \ |
| 2371 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ | 2355 | gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ |
| 2372 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ | 2356 | gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ |
| 2373 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ | 2357 | gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ |
| 2374 | gcpro##5 .next = &gcpro##4; gcpro##5 .var = &var5; gcpro##5 .nvars = 1; \ | 2358 | gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \ |
| 2375 | gcpro##5 .level = gcpro_level++; \ | 2359 | gcpro5.level = gcpro_level++; \ |
| 2376 | gcprolist = &gcpro##5; } | 2360 | gcprolist = &gcpro5; } |
| 2377 | 2361 | ||
| 2378 | #define GCPRO6_VAR(var1, var2, var3, var4, var5, var6, gcpro) \ | 2362 | #define GCPRO6(varname1, varname2, varname3, varname4, varname5, varname6) \ |
| 2379 | {gcpro##1 .next = gcprolist; gcpro##1 .var = &var1; gcpro##1 .nvars = 1; \ | 2363 | {gcpro1.next = gcprolist; gcpro1.var = &varname1; gcpro1.nvars = 1; \ |
| 2380 | gcpro##1 .level = gcpro_level; \ | 2364 | gcpro1.level = gcpro_level; \ |
| 2381 | gcpro##2 .next = &gcpro##1; gcpro##2 .var = &var2; gcpro##2 .nvars = 1; \ | 2365 | gcpro2.next = &gcpro1; gcpro2.var = &varname2; gcpro2.nvars = 1; \ |
| 2382 | gcpro##3 .next = &gcpro##2; gcpro##3 .var = &var3; gcpro##3 .nvars = 1; \ | 2366 | gcpro3.next = &gcpro2; gcpro3.var = &varname3; gcpro3.nvars = 1; \ |
| 2383 | gcpro##4 .next = &gcpro##3; gcpro##4 .var = &var4; gcpro##4 .nvars = 1; \ | 2367 | gcpro4.next = &gcpro3; gcpro4.var = &varname4; gcpro4.nvars = 1; \ |
| 2384 | gcpro##5 .next = &gcpro##4; gcpro##5 .var = &var5; gcpro##5 .nvars = 1; \ | 2368 | gcpro5.next = &gcpro4; gcpro5.var = &varname5; gcpro5.nvars = 1; \ |
| 2385 | gcpro##6 .next = &gcpro##5; gcpro##6 .var = &var6; gcpro##6 .nvars = 1; \ | 2369 | gcpro6.next = &gcpro5; gcpro6.var = &varname6; gcpro6.nvars = 1; \ |
| 2386 | gcpro##6 .level = gcpro_level++; \ | 2370 | gcpro6.level = gcpro_level++; \ |
| 2387 | gcprolist = &gcpro##6; } | 2371 | gcprolist = &gcpro6; } |
| 2388 | 2372 | ||
| 2389 | #define UNGCPRO_VAR(gcpro) \ | 2373 | #define UNGCPRO \ |
| 2390 | ((--gcpro_level != gcpro##1 .level) \ | 2374 | ((--gcpro_level != gcpro1.level) \ |
| 2391 | ? (abort (), 0) \ | 2375 | ? (abort (), 0) \ |
| 2392 | : ((gcprolist = gcpro##1 .next), 0)) | 2376 | : ((gcprolist = gcpro1.next), 0)) |
| 2393 | 2377 | ||
| 2394 | #endif /* DEBUG_GCPRO */ | 2378 | #endif /* DEBUG_GCPRO */ |
| 2395 | #endif /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */ | 2379 | #endif /* GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS */ |
| @@ -3337,6 +3321,7 @@ extern Lisp_Object Qfile_name_handler_alist; | |||
| 3337 | #ifdef FLOAT_CATCH_SIGILL | 3321 | #ifdef FLOAT_CATCH_SIGILL |
| 3338 | extern void fatal_error_signal (int); | 3322 | extern void fatal_error_signal (int); |
| 3339 | #endif | 3323 | #endif |
| 3324 | extern Lisp_Object Qkill_emacs; | ||
| 3340 | EXFUN (Fkill_emacs, 1) NO_RETURN; | 3325 | EXFUN (Fkill_emacs, 1) NO_RETURN; |
| 3341 | #if HAVE_SETLOCALE | 3326 | #if HAVE_SETLOCALE |
| 3342 | void fixup_locale (void); | 3327 | void fixup_locale (void); |
diff --git a/src/lread.c b/src/lread.c index d7c5db3a02c..90bc8c11b96 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1922,7 +1922,7 @@ which is the input stream for reading characters. | |||
| 1922 | This function does not move point. */) | 1922 | This function does not move point. */) |
| 1923 | (Lisp_Object start, Lisp_Object end, Lisp_Object printflag, Lisp_Object read_function) | 1923 | (Lisp_Object start, Lisp_Object end, Lisp_Object printflag, Lisp_Object read_function) |
| 1924 | { | 1924 | { |
| 1925 | /* FIXME: Do the eval-sexp-add-defvars danse! */ | 1925 | /* FIXME: Do the eval-sexp-add-defvars dance! */ |
| 1926 | ptrdiff_t count = SPECPDL_INDEX (); | 1926 | ptrdiff_t count = SPECPDL_INDEX (); |
| 1927 | Lisp_Object tem, cbuf; | 1927 | Lisp_Object tem, cbuf; |
| 1928 | 1928 | ||
| @@ -3990,7 +3990,7 @@ init_obarray (void) | |||
| 3990 | Qnil = intern_c_string ("nil"); | 3990 | Qnil = intern_c_string ("nil"); |
| 3991 | 3991 | ||
| 3992 | /* Fmake_symbol inits fields of new symbols with Qunbound and Qnil, | 3992 | /* Fmake_symbol inits fields of new symbols with Qunbound and Qnil, |
| 3993 | so those two need to be fixed manally. */ | 3993 | so those two need to be fixed manually. */ |
| 3994 | SET_SYMBOL_VAL (XSYMBOL (Qunbound), Qunbound); | 3994 | SET_SYMBOL_VAL (XSYMBOL (Qunbound), Qunbound); |
| 3995 | XSYMBOL (Qunbound)->function = Qunbound; | 3995 | XSYMBOL (Qunbound)->function = Qunbound; |
| 3996 | XSYMBOL (Qunbound)->plist = Qnil; | 3996 | XSYMBOL (Qunbound)->plist = Qnil; |
| @@ -4186,13 +4186,16 @@ init_lread (void) | |||
| 4186 | } | 4186 | } |
| 4187 | 4187 | ||
| 4188 | /* Add site-lisp under the installation dir, if it exists. */ | 4188 | /* Add site-lisp under the installation dir, if it exists. */ |
| 4189 | tem = Fexpand_file_name (build_string ("site-lisp"), | 4189 | if (!no_site_lisp) |
| 4190 | Vinstallation_directory); | ||
| 4191 | tem1 = Ffile_exists_p (tem); | ||
| 4192 | if (!NILP (tem1)) | ||
| 4193 | { | 4190 | { |
| 4194 | if (NILP (Fmember (tem, Vload_path))) | 4191 | tem = Fexpand_file_name (build_string ("site-lisp"), |
| 4195 | Vload_path = Fcons (tem, Vload_path); | 4192 | Vinstallation_directory); |
| 4193 | tem1 = Ffile_exists_p (tem); | ||
| 4194 | if (!NILP (tem1)) | ||
| 4195 | { | ||
| 4196 | if (NILP (Fmember (tem, Vload_path))) | ||
| 4197 | Vload_path = Fcons (tem, Vload_path); | ||
| 4198 | } | ||
| 4196 | } | 4199 | } |
| 4197 | 4200 | ||
| 4198 | /* If Emacs was not built in the source directory, | 4201 | /* If Emacs was not built in the source directory, |
| @@ -4228,11 +4231,14 @@ init_lread (void) | |||
| 4228 | if (NILP (Fmember (tem, Vload_path))) | 4231 | if (NILP (Fmember (tem, Vload_path))) |
| 4229 | Vload_path = Fcons (tem, Vload_path); | 4232 | Vload_path = Fcons (tem, Vload_path); |
| 4230 | 4233 | ||
| 4231 | tem = Fexpand_file_name (build_string ("site-lisp"), | 4234 | if (!no_site_lisp) |
| 4232 | Vsource_directory); | 4235 | { |
| 4236 | tem = Fexpand_file_name (build_string ("site-lisp"), | ||
| 4237 | Vsource_directory); | ||
| 4233 | 4238 | ||
| 4234 | if (NILP (Fmember (tem, Vload_path))) | 4239 | if (NILP (Fmember (tem, Vload_path))) |
| 4235 | Vload_path = Fcons (tem, Vload_path); | 4240 | Vload_path = Fcons (tem, Vload_path); |
| 4241 | } | ||
| 4236 | } | 4242 | } |
| 4237 | } | 4243 | } |
| 4238 | if (!NILP (sitelisp) && !no_site_lisp) | 4244 | if (!NILP (sitelisp) && !no_site_lisp) |
diff --git a/src/m/ibms390.h b/src/m/ibms390.h deleted file mode 100644 index c309035dc5c..00000000000 --- a/src/m/ibms390.h +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | /* Machine description file for IBM S390 in 32-bit mode | ||
| 2 | |||
| 3 | Copyright (C) 1985-1986, 2001-2011 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 19 | |||
| 20 | |||
| 21 | /* Define VIRT_ADDR_VARIES if the virtual addresses of | ||
| 22 | pure and impure space as loaded can vary, and even their | ||
| 23 | relative order cannot be relied on. | ||
| 24 | |||
| 25 | Otherwise Emacs assumes that text space precedes data space, | ||
| 26 | numerically. */ | ||
| 27 | #define VIRT_ADDR_VARIES | ||
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h index 04092d6e1ac..5ea7974b052 100644 --- a/src/m/ibms390x.h +++ b/src/m/ibms390x.h | |||
| @@ -17,8 +17,6 @@ GNU General Public License for more details. | |||
| 17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
| 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 18 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 | 19 | ||
| 20 | #include "ibms390.h" | ||
| 21 | |||
| 22 | #define BITS_PER_LONG 64 | 20 | #define BITS_PER_LONG 64 |
| 23 | #define BITS_PER_EMACS_INT 64 | 21 | #define BITS_PER_EMACS_INT 64 |
| 24 | 22 | ||
diff --git a/src/m/intel386.h b/src/m/intel386.h index 16f0645715c..114b7fef963 100644 --- a/src/m/intel386.h +++ b/src/m/intel386.h | |||
| @@ -19,7 +19,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 19 | 19 | ||
| 20 | 20 | ||
| 21 | #ifdef WINDOWSNT | 21 | #ifdef WINDOWSNT |
| 22 | #define VIRT_ADDR_VARIES | ||
| 23 | #define DATA_START get_data_start () | 22 | #define DATA_START get_data_start () |
| 24 | #endif | 23 | #endif |
| 25 | 24 | ||
| @@ -28,4 +27,3 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | /* we cannot get the maximum address for brk */ | 27 | /* we cannot get the maximum address for brk */ |
| 29 | #define ULIMIT_BREAK_VALUE (32*1024*1024) | 28 | #define ULIMIT_BREAK_VALUE (32*1024*1024) |
| 30 | #endif | 29 | #endif |
| 31 | |||
diff --git a/src/m/template.h b/src/m/template.h index 54fb0da9521..38649e8ac6d 100644 --- a/src/m/template.h +++ b/src/m/template.h | |||
| @@ -21,14 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | does not define it automatically. | 21 | does not define it automatically. |
| 22 | Ones defined so far include m68k and many others */ | 22 | Ones defined so far include m68k and many others */ |
| 23 | 23 | ||
| 24 | /* Define VIRT_ADDR_VARIES if the virtual addresses of | ||
| 25 | pure and impure space as loaded can vary, and even their | ||
| 26 | relative order cannot be relied on. | ||
| 27 | |||
| 28 | Otherwise Emacs assumes that text space precedes data space, | ||
| 29 | numerically. */ | ||
| 30 | #define VIRT_ADDR_VARIES | ||
| 31 | |||
| 32 | /* After adding support for a new machine, modify the large case | 24 | /* After adding support for a new machine, modify the large case |
| 33 | statement in configure.in to recognize reasonable | 25 | statement in configure.in to recognize reasonable |
| 34 | configuration names, and add a description of the system to | 26 | configuration names, and add a description of the system to |
diff --git a/src/minibuf.c b/src/minibuf.c index 7dd189c325b..9a4df333788 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -905,26 +905,36 @@ DEFUN ("read-from-minibuffer", Fread_from_minibuffer, | |||
| 905 | The optional second arg INITIAL-CONTENTS is an obsolete alternative to | 905 | The optional second arg INITIAL-CONTENTS is an obsolete alternative to |
| 906 | DEFAULT-VALUE. It normally should be nil in new code, except when | 906 | DEFAULT-VALUE. It normally should be nil in new code, except when |
| 907 | HIST is a cons. It is discussed in more detail below. | 907 | HIST is a cons. It is discussed in more detail below. |
| 908 | |||
| 908 | Third arg KEYMAP is a keymap to use whilst reading; | 909 | Third arg KEYMAP is a keymap to use whilst reading; |
| 909 | if omitted or nil, the default is `minibuffer-local-map'. | 910 | if omitted or nil, the default is `minibuffer-local-map'. |
| 910 | If fourth arg READ is non-nil, then interpret the result as a Lisp object | 911 | |
| 912 | If fourth arg READ is non-nil, interpret the result as a Lisp object | ||
| 911 | and return that object: | 913 | and return that object: |
| 912 | in other words, do `(car (read-from-string INPUT-STRING))' | 914 | in other words, do `(car (read-from-string INPUT-STRING))' |
| 915 | |||
| 913 | Fifth arg HIST, if non-nil, specifies a history list and optionally | 916 | Fifth arg HIST, if non-nil, specifies a history list and optionally |
| 914 | the initial position in the list. It can be a symbol, which is the | 917 | the initial position in the list. It can be a symbol, which is the |
| 915 | history list variable to use, or it can be a cons cell | 918 | history list variable to use, or a cons cell (HISTVAR . HISTPOS). |
| 916 | (HISTVAR . HISTPOS). In that case, HISTVAR is the history list variable | 919 | In that case, HISTVAR is the history list variable to use, and |
| 917 | to use, and HISTPOS is the initial position for use by the minibuffer | 920 | HISTPOS is the initial position for use by the minibuffer history |
| 918 | history commands. For consistency, you should also specify that | 921 | commands. For consistency, you should also specify that element of |
| 919 | element of the history as the value of INITIAL-CONTENTS. Positions | 922 | the history as the value of INITIAL-CONTENTS. Positions are counted |
| 920 | are counted starting from 1 at the beginning of the list. | 923 | starting from 1 at the beginning of the list. |
| 921 | Sixth arg DEFAULT-VALUE is a default value or list of default values. | 924 | |
| 922 | If non-nil, it is available via history commands. If READ is | 925 | Sixth arg DEFAULT-VALUE, if non-nil, should be a string, which is used |
| 923 | non-nil, it is also the default to `read' if the user enters empty | 926 | as the default to `read' if READ is non-nil and the user enters |
| 924 | input. If READ is non-nil, `read-from-minibuffer' does NOT return | 927 | empty input. But if READ is nil, this function does _not_ return |
| 925 | DEFAULT-VALUE for empty input! It returns the empty string. | 928 | DEFAULT-VALUE for empty input! Instead, it returns the empty string. |
| 929 | |||
| 930 | Whatever the value of READ, DEFAULT-VALUE is made available via the | ||
| 931 | minibuffer history commands. DEFAULT-VALUE can also be a list of | ||
| 932 | strings, in which case all the strings are available in the history, | ||
| 933 | and the first string is the default to `read' if READ is non-nil. | ||
| 934 | |||
| 926 | Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits | 935 | Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits |
| 927 | the current input method and the setting of `enable-multibyte-characters'. | 936 | the current input method and the setting of `enable-multibyte-characters'. |
| 937 | |||
| 928 | If the variable `minibuffer-allow-text-properties' is non-nil, | 938 | If the variable `minibuffer-allow-text-properties' is non-nil, |
| 929 | then the string which is returned includes whatever text properties | 939 | then the string which is returned includes whatever text properties |
| 930 | were present in the minibuffer. Otherwise the value has no text properties. | 940 | were present in the minibuffer. Otherwise the value has no text properties. |
diff --git a/src/msdos.c b/src/msdos.c index 6b6e365a165..64e9d72c784 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -1342,7 +1342,7 @@ static void | |||
| 1342 | IT_copy_glyphs (int xfrom, int xto, size_t len, int ypos) | 1342 | IT_copy_glyphs (int xfrom, int xto, size_t len, int ypos) |
| 1343 | { | 1343 | { |
| 1344 | /* The offsets of source and destination relative to the | 1344 | /* The offsets of source and destination relative to the |
| 1345 | conventional memorty selector. */ | 1345 | conventional memory selector. */ |
| 1346 | int from = 2 * (xfrom + screen_size_X * ypos) + ScreenPrimary; | 1346 | int from = 2 * (xfrom + screen_size_X * ypos) + ScreenPrimary; |
| 1347 | int to = 2 * (xto + screen_size_X * ypos) + ScreenPrimary; | 1347 | int to = 2 * (xto + screen_size_X * ypos) + ScreenPrimary; |
| 1348 | 1348 | ||
| @@ -1558,7 +1558,7 @@ IT_set_terminal_window (struct frame *f, int foo) | |||
| 1558 | { | 1558 | { |
| 1559 | } | 1559 | } |
| 1560 | 1560 | ||
| 1561 | /* Remember the screen colors of the curent frame, to serve as the | 1561 | /* Remember the screen colors of the current frame, to serve as the |
| 1562 | default colors for newly-created frames. */ | 1562 | default colors for newly-created frames. */ |
| 1563 | DEFUN ("msdos-remember-default-colors", Fmsdos_remember_default_colors, | 1563 | DEFUN ("msdos-remember-default-colors", Fmsdos_remember_default_colors, |
| 1564 | Smsdos_remember_default_colors, 1, 1, 0, | 1564 | Smsdos_remember_default_colors, 1, 1, 0, |
diff --git a/src/nsfns.m b/src/nsfns.m index f320a909497..ccefec1e34f 100644 --- a/src/nsfns.m +++ b/src/nsfns.m | |||
| @@ -1076,7 +1076,41 @@ unwind_create_frame (Lisp_Object frame) | |||
| 1076 | return Qnil; | 1076 | return Qnil; |
| 1077 | } | 1077 | } |
| 1078 | 1078 | ||
| 1079 | /* | ||
| 1080 | * Read geometry related parameters from preferences if not in PARMS. | ||
| 1081 | * Returns the union of parms and any preferences read. | ||
| 1082 | */ | ||
| 1083 | |||
| 1084 | static Lisp_Object | ||
| 1085 | get_geometry_from_preferences (struct ns_display_info *dpyinfo, | ||
| 1086 | Lisp_Object parms) | ||
| 1087 | { | ||
| 1088 | struct { | ||
| 1089 | const char *val; | ||
| 1090 | const char *cls; | ||
| 1091 | Lisp_Object tem; | ||
| 1092 | } r[] = { | ||
| 1093 | { "width", "Width", Qwidth }, | ||
| 1094 | { "height", "Height", Qheight }, | ||
| 1095 | { "left", "Left", Qleft }, | ||
| 1096 | { "top", "Top", Qtop }, | ||
| 1097 | }; | ||
| 1098 | |||
| 1099 | int i; | ||
| 1100 | for (i = 0; i < sizeof (r)/sizeof (r[0]); ++i) | ||
| 1101 | { | ||
| 1102 | if (NILP (Fassq (r[i].tem, parms))) | ||
| 1103 | { | ||
| 1104 | Lisp_Object value | ||
| 1105 | = x_get_arg (dpyinfo, parms, r[i].tem, r[i].val, r[i].cls, | ||
| 1106 | RES_TYPE_NUMBER); | ||
| 1107 | if (! EQ (value, Qunbound)) | ||
| 1108 | parms = Fcons (Fcons (r[i].tem, value), parms); | ||
| 1109 | } | ||
| 1110 | } | ||
| 1079 | 1111 | ||
| 1112 | return parms; | ||
| 1113 | } | ||
| 1080 | 1114 | ||
| 1081 | /* ========================================================================== | 1115 | /* ========================================================================== |
| 1082 | 1116 | ||
| @@ -1285,6 +1319,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 1285 | x_default_parameter (f, parms, Qtitle, Qnil, "title", "Title", | 1319 | x_default_parameter (f, parms, Qtitle, Qnil, "title", "Title", |
| 1286 | RES_TYPE_STRING); | 1320 | RES_TYPE_STRING); |
| 1287 | 1321 | ||
| 1322 | parms = get_geometry_from_preferences (dpyinfo, parms); | ||
| 1288 | window_prompting = x_figure_window_size (f, parms, 1); | 1323 | window_prompting = x_figure_window_size (f, parms, 1); |
| 1289 | 1324 | ||
| 1290 | tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); | 1325 | tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); |
| @@ -1511,6 +1546,17 @@ Optional arg INIT, if non-nil, provides a default file name to use. */) | |||
| 1511 | return ret ? fname : Qnil; | 1546 | return ret ? fname : Qnil; |
| 1512 | } | 1547 | } |
| 1513 | 1548 | ||
| 1549 | const char * | ||
| 1550 | ns_get_defaults_value (const char *key) | ||
| 1551 | { | ||
| 1552 | NSObject *obj = [[NSUserDefaults standardUserDefaults] | ||
| 1553 | objectForKey: [NSString stringWithUTF8String: key]]; | ||
| 1554 | |||
| 1555 | if (!obj) return NULL; | ||
| 1556 | |||
| 1557 | return [[NSString stringWithFormat: @"%@", obj] UTF8String]; | ||
| 1558 | } | ||
| 1559 | |||
| 1514 | 1560 | ||
| 1515 | DEFUN ("ns-get-resource", Fns_get_resource, Sns_get_resource, 2, 2, 0, | 1561 | DEFUN ("ns-get-resource", Fns_get_resource, Sns_get_resource, 2, 2, 0, |
| 1516 | doc: /* Return the value of the property NAME of OWNER from the defaults database. | 1562 | doc: /* Return the value of the property NAME of OWNER from the defaults database. |
| @@ -1525,9 +1571,7 @@ If OWNER is nil, Emacs is assumed. */) | |||
| 1525 | CHECK_STRING (name); | 1571 | CHECK_STRING (name); |
| 1526 | /*fprintf (stderr, "ns-get-resource checking resource '%s'\n", SDATA (name)); */ | 1572 | /*fprintf (stderr, "ns-get-resource checking resource '%s'\n", SDATA (name)); */ |
| 1527 | 1573 | ||
| 1528 | value =[[[NSUserDefaults standardUserDefaults] | 1574 | value = ns_get_defaults_value (SDATA (name)); |
| 1529 | objectForKey: [NSString stringWithUTF8String: SDATA (name)]] | ||
| 1530 | UTF8String]; | ||
| 1531 | 1575 | ||
| 1532 | if (value) | 1576 | if (value) |
| 1533 | return build_string (value); | 1577 | return build_string (value); |
| @@ -2182,8 +2226,7 @@ x_get_string_resource (XrmDatabase rdb, char *name, char *class) | |||
| 2182 | /* --quick was passed, so this is a no-op. */ | 2226 | /* --quick was passed, so this is a no-op. */ |
| 2183 | return NULL; | 2227 | return NULL; |
| 2184 | 2228 | ||
| 2185 | res = [[[NSUserDefaults standardUserDefaults] objectForKey: | 2229 | res = ns_get_defaults_value (toCheck); |
| 2186 | [NSString stringWithUTF8String: toCheck]] UTF8String]; | ||
| 2187 | return !res ? NULL : | 2230 | return !res ? NULL : |
| 2188 | (!strncasecmp (res, "YES", 3) ? "true" : | 2231 | (!strncasecmp (res, "YES", 3) ? "true" : |
| 2189 | (!strncasecmp (res, "NO", 2) ? "false" : res)); | 2232 | (!strncasecmp (res, "NO", 2) ? "false" : res)); |
diff --git a/src/nsfont.m b/src/nsfont.m index ca94b07a6bd..7dfb995dd27 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -256,7 +256,7 @@ ns_char_width (NSFont *sfont, int c) | |||
| 256 | 256 | ||
| 257 | 257 | ||
| 258 | /* Return whether set1 covers set2 to a reasonable extent given by pct. | 258 | /* Return whether set1 covers set2 to a reasonable extent given by pct. |
| 259 | We check, out of each 16 unicode char range containing chars in set2, | 259 | We check, out of each 16 Unicode char range containing chars in set2, |
| 260 | whether at least one character is present in set1. | 260 | whether at least one character is present in set1. |
| 261 | This must be true for pct of the pairs to consider it covering. */ | 261 | This must be true for pct of the pairs to consider it covering. */ |
| 262 | static BOOL | 262 | static BOOL |
| @@ -297,7 +297,7 @@ static NSString | |||
| 297 | 297 | ||
| 298 | 298 | ||
| 299 | /* Convert OTF 4-letter script code to emacs script name. (Why can't | 299 | /* Convert OTF 4-letter script code to emacs script name. (Why can't |
| 300 | everyone just use some standard unicode names for these?) */ | 300 | everyone just use some standard Unicode names for these?) */ |
| 301 | static NSString | 301 | static NSString |
| 302 | *ns_otf_to_script (Lisp_Object otf) | 302 | *ns_otf_to_script (Lisp_Object otf) |
| 303 | { | 303 | { |
| @@ -329,7 +329,7 @@ static NSString | |||
| 329 | 329 | ||
| 330 | /* Searches the :script, :lang, and :otf extra-bundle properties of the spec, | 330 | /* Searches the :script, :lang, and :otf extra-bundle properties of the spec, |
| 331 | plus registry regular property, for something that can be mapped to a | 331 | plus registry regular property, for something that can be mapped to a |
| 332 | unicode script. Empty string returned if no script spec found. */ | 332 | Unicode script. Empty string returned if no script spec found. */ |
| 333 | static NSString | 333 | static NSString |
| 334 | *ns_get_req_script (Lisp_Object font_spec) | 334 | *ns_get_req_script (Lisp_Object font_spec) |
| 335 | { | 335 | { |
| @@ -385,7 +385,7 @@ accumulate_script_ranges (Lisp_Object arg, Lisp_Object range, Lisp_Object val) | |||
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | 387 | ||
| 388 | /* Use the unicode range information in Vchar_script_table to convert a script | 388 | /* Use the Unicode range information in Vchar_script_table to convert a script |
| 389 | name into an NSCharacterSet. */ | 389 | name into an NSCharacterSet. */ |
| 390 | static NSCharacterSet | 390 | static NSCharacterSet |
| 391 | *ns_script_to_charset (NSString *scriptName) | 391 | *ns_script_to_charset (NSString *scriptName) |
| @@ -426,7 +426,7 @@ static NSCharacterSet | |||
| 426 | If none are found, we reduce the percentage and try again, until 5%. | 426 | If none are found, we reduce the percentage and try again, until 5%. |
| 427 | This provides a font with at least some characters if such can be found. | 427 | This provides a font with at least some characters if such can be found. |
| 428 | We don't use isSupersetOfSet: because (a) it doesn't work on Tiger, and | 428 | We don't use isSupersetOfSet: because (a) it doesn't work on Tiger, and |
| 429 | (b) need approximate match as fonts covering full unicode ranges are rare. */ | 429 | (b) need approximate match as fonts covering full Unicode ranges are rare. */ |
| 430 | static NSSet | 430 | static NSSet |
| 431 | *ns_get_covering_families (NSString *script, float pct) | 431 | *ns_get_covering_families (NSString *script, float pct) |
| 432 | { | 432 | { |
| @@ -1292,7 +1292,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block) | |||
| 1292 | if (!unichars || !(font_info->glyphs[block])) | 1292 | if (!unichars || !(font_info->glyphs[block])) |
| 1293 | abort (); | 1293 | abort (); |
| 1294 | 1294 | ||
| 1295 | /* create a string containing all unicode characters in this block */ | 1295 | /* create a string containing all Unicode characters in this block */ |
| 1296 | for (idx = block<<8, i =0; i<0x100; idx++, i++) | 1296 | for (idx = block<<8, i =0; i<0x100; idx++, i++) |
| 1297 | if (idx < 0xD800 || idx > 0xDFFF) | 1297 | if (idx < 0xD800 || idx > 0xDFFF) |
| 1298 | unichars[i] = idx; | 1298 | unichars[i] = idx; |
| @@ -1487,5 +1487,5 @@ syms_of_nsfont (void) | |||
| 1487 | DEFSYM (Qroman, "roman"); | 1487 | DEFSYM (Qroman, "roman"); |
| 1488 | DEFSYM (Qmedium, "medium"); | 1488 | DEFSYM (Qmedium, "medium"); |
| 1489 | DEFVAR_LISP ("ns-reg-to-script", Vns_reg_to_script, | 1489 | DEFVAR_LISP ("ns-reg-to-script", Vns_reg_to_script, |
| 1490 | doc: /* Internal use: maps font registry to unicode script. */); | 1490 | doc: /* Internal use: maps font registry to Unicode script. */); |
| 1491 | } | 1491 | } |
diff --git a/src/nsgui.h b/src/nsgui.h index 5cc2eee3230..99c64cd4cde 100644 --- a/src/nsgui.h +++ b/src/nsgui.h | |||
| @@ -65,7 +65,7 @@ typedef struct _XCharStruct | |||
| 65 | int descent; | 65 | int descent; |
| 66 | } XCharStruct; | 66 | } XCharStruct; |
| 67 | 67 | ||
| 68 | /* Fake tructure from Xlib.h to represent two-byte characters. */ | 68 | /* Fake structure from Xlib.h to represent two-byte characters. */ |
| 69 | #ifndef __OBJC__ | 69 | #ifndef __OBJC__ |
| 70 | typedef unsigned short unichar; | 70 | typedef unsigned short unichar; |
| 71 | #endif | 71 | #endif |
| @@ -202,4 +202,3 @@ typedef struct _NSRect { NSPoint origin; NSSize size; } NSRect; | |||
| 202 | #define PWinGravity (1L << 9) /* program specified window gravity */ | 202 | #define PWinGravity (1L << 9) /* program specified window gravity */ |
| 203 | 203 | ||
| 204 | #endif /* __NSGUI_H__ */ | 204 | #endif /* __NSGUI_H__ */ |
| 205 | |||
diff --git a/src/nsterm.h b/src/nsterm.h index 574d31c962a..14918cca90d 100644 --- a/src/nsterm.h +++ b/src/nsterm.h | |||
| @@ -470,7 +470,7 @@ struct nsfont_info | |||
| 470 | XCharStruct max_bounds; | 470 | XCharStruct max_bounds; |
| 471 | /* we compute glyph codes and metrics on-demand in blocks of 256 indexed | 471 | /* we compute glyph codes and metrics on-demand in blocks of 256 indexed |
| 472 | by hibyte, lobyte */ | 472 | by hibyte, lobyte */ |
| 473 | unsigned short **glyphs; /* map unicode index to glyph */ | 473 | unsigned short **glyphs; /* map Unicode index to glyph */ |
| 474 | struct font_metrics **metrics; | 474 | struct font_metrics **metrics; |
| 475 | }; | 475 | }; |
| 476 | 476 | ||
| @@ -760,6 +760,7 @@ extern void ns_release_object (void *obj); | |||
| 760 | extern void ns_retain_object (void *obj); | 760 | extern void ns_retain_object (void *obj); |
| 761 | extern void *ns_alloc_autorelease_pool (); | 761 | extern void *ns_alloc_autorelease_pool (); |
| 762 | extern void ns_release_autorelease_pool (); | 762 | extern void ns_release_autorelease_pool (); |
| 763 | extern const char *ns_get_defaults_value (); | ||
| 763 | 764 | ||
| 764 | /* in nsmenu */ | 765 | /* in nsmenu */ |
| 765 | extern void update_frame_tool_bar (FRAME_PTR f); | 766 | extern void update_frame_tool_bar (FRAME_PTR f); |
| @@ -794,6 +795,7 @@ extern void x_set_tool_bar_lines (struct frame *f, | |||
| 794 | Lisp_Object oldval); | 795 | Lisp_Object oldval); |
| 795 | extern void x_activate_menubar (struct frame *); | 796 | extern void x_activate_menubar (struct frame *); |
| 796 | extern void free_frame_menubar (struct frame *); | 797 | extern void free_frame_menubar (struct frame *); |
| 798 | extern void x_free_frame_resources (struct frame *); | ||
| 797 | 799 | ||
| 798 | #define NSAPP_DATA2_RUNASSCRIPT 10 | 800 | #define NSAPP_DATA2_RUNASSCRIPT 10 |
| 799 | extern void ns_run_ascript (void); | 801 | extern void ns_run_ascript (void); |
diff --git a/src/nsterm.m b/src/nsterm.m index c5b28d57ac5..1d645943065 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -559,7 +559,7 @@ ns_constrain_all_frames (void) | |||
| 559 | { | 559 | { |
| 560 | NSView *view = FRAME_NS_VIEW (f); | 560 | NSView *view = FRAME_NS_VIEW (f); |
| 561 | /* This no-op will trigger the default window placing | 561 | /* This no-op will trigger the default window placing |
| 562 | * constriant system. */ | 562 | * constraint system. */ |
| 563 | f->output_data.ns->dont_constrain = 0; | 563 | f->output_data.ns->dont_constrain = 0; |
| 564 | [[view window] setFrameOrigin:[[view window] frame].origin]; | 564 | [[view window] setFrameOrigin:[[view window] frame].origin]; |
| 565 | } | 565 | } |
| @@ -2108,7 +2108,7 @@ ns_scroll_run (struct window *w, struct run *run) | |||
| 2108 | } | 2108 | } |
| 2109 | else | 2109 | else |
| 2110 | { | 2110 | { |
| 2111 | /* Scolling down. Make sure we don't copy over the mode line. | 2111 | /* Scrolling down. Make sure we don't copy over the mode line. |
| 2112 | at the bottom. */ | 2112 | at the bottom. */ |
| 2113 | if (to_y + run->height > bottom_y) | 2113 | if (to_y + run->height > bottom_y) |
| 2114 | height = bottom_y - to_y; | 2114 | height = bottom_y - to_y; |
| @@ -3075,7 +3075,7 @@ ns_dumpglyphs_image (struct glyph_string *s, NSRect r) | |||
| 3075 | 3075 | ||
| 3076 | /* If there is no mask, the background won't be seen, | 3076 | /* If there is no mask, the background won't be seen, |
| 3077 | so draw a rectangle on the image for the cursor. | 3077 | so draw a rectangle on the image for the cursor. |
| 3078 | Do this for all images, getting trancparency right is not reliable. */ | 3078 | Do this for all images, getting transparency right is not reliable. */ |
| 3079 | if (s->hl == DRAW_CURSOR) | 3079 | if (s->hl == DRAW_CURSOR) |
| 3080 | { | 3080 | { |
| 3081 | int thickness = abs (s->img->relief); | 3081 | int thickness = abs (s->img->relief); |
| @@ -3824,11 +3824,9 @@ ns_default (const char *parameter, Lisp_Object *result, | |||
| 3824 | Check a parameter value in user's preferences | 3824 | Check a parameter value in user's preferences |
| 3825 | -------------------------------------------------------------------------- */ | 3825 | -------------------------------------------------------------------------- */ |
| 3826 | { | 3826 | { |
| 3827 | const char *value; | 3827 | const char *value = ns_get_defaults_value (parameter); |
| 3828 | 3828 | ||
| 3829 | if ( (value =[[[NSUserDefaults standardUserDefaults] | 3829 | if (value) |
| 3830 | stringForKey: [NSString stringWithUTF8String: parameter]] | ||
| 3831 | UTF8String]) ) | ||
| 3832 | { | 3830 | { |
| 3833 | double f; | 3831 | double f; |
| 3834 | char *pos; | 3832 | char *pos; |
diff --git a/src/print.c b/src/print.c index f3302daaea3..b8b7ab371f6 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1627,7 +1627,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag | |||
| 1627 | /* Detect circular list. */ | 1627 | /* Detect circular list. */ |
| 1628 | if (NILP (Vprint_circle)) | 1628 | if (NILP (Vprint_circle)) |
| 1629 | { | 1629 | { |
| 1630 | /* Simple but imcomplete way. */ | 1630 | /* Simple but incomplete way. */ |
| 1631 | if (i != 0 && EQ (obj, halftail)) | 1631 | if (i != 0 && EQ (obj, halftail)) |
| 1632 | { | 1632 | { |
| 1633 | sprintf (buf, " . #%"pMd, i / 2); | 1633 | sprintf (buf, " . #%"pMd, i / 2); |
diff --git a/src/process.c b/src/process.c index 71da2e17670..206af7059fb 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1408,7 +1408,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1408 | val = XCDR (Vdefault_process_coding_system); | 1408 | val = XCDR (Vdefault_process_coding_system); |
| 1409 | } | 1409 | } |
| 1410 | XPROCESS (proc)->encode_coding_system = val; | 1410 | XPROCESS (proc)->encode_coding_system = val; |
| 1411 | /* Note: At this momemnt, the above coding system may leave | 1411 | /* Note: At this moment, the above coding system may leave |
| 1412 | text-conversion or eol-conversion unspecified. They will be | 1412 | text-conversion or eol-conversion unspecified. They will be |
| 1413 | decided after we read output from the process and decode it by | 1413 | decided after we read output from the process and decode it by |
| 1414 | some coding system, or just before we actually send a text to | 1414 | some coding system, or just before we actually send a text to |
| @@ -1515,8 +1515,9 @@ start_process_unwind (Lisp_Object proc) | |||
| 1515 | if (!PROCESSP (proc)) | 1515 | if (!PROCESSP (proc)) |
| 1516 | abort (); | 1516 | abort (); |
| 1517 | 1517 | ||
| 1518 | /* Was PROC started successfully? */ | 1518 | /* Was PROC started successfully? |
| 1519 | if (XPROCESS (proc)->pid == -1) | 1519 | -2 is used for a pty with no process, eg for gdb. */ |
| 1520 | if (XPROCESS (proc)->pid <= 0 && XPROCESS (proc)->pid != -2) | ||
| 1520 | remove_process (proc); | 1521 | remove_process (proc); |
| 1521 | 1522 | ||
| 1522 | return Qnil; | 1523 | return Qnil; |
| @@ -3470,7 +3471,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3470 | 3471 | ||
| 3471 | { | 3472 | { |
| 3472 | /* Setup coding systems for communicating with the network stream. */ | 3473 | /* Setup coding systems for communicating with the network stream. */ |
| 3473 | struct gcpro inner_gcpro1; | 3474 | struct gcpro gcpro1; |
| 3474 | /* Qt denotes we have not yet called Ffind_operation_coding_system. */ | 3475 | /* Qt denotes we have not yet called Ffind_operation_coding_system. */ |
| 3475 | Lisp_Object coding_systems = Qt; | 3476 | Lisp_Object coding_systems = Qt; |
| 3476 | Lisp_Object fargs[5], val; | 3477 | Lisp_Object fargs[5], val; |
| @@ -3498,9 +3499,9 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3498 | { | 3499 | { |
| 3499 | fargs[0] = Qopen_network_stream, fargs[1] = name, | 3500 | fargs[0] = Qopen_network_stream, fargs[1] = name, |
| 3500 | fargs[2] = buffer, fargs[3] = host, fargs[4] = service; | 3501 | fargs[2] = buffer, fargs[3] = host, fargs[4] = service; |
| 3501 | GCPRO1_VAR (proc, inner_gcpro); | 3502 | GCPRO1 (proc); |
| 3502 | coding_systems = Ffind_operation_coding_system (5, fargs); | 3503 | coding_systems = Ffind_operation_coding_system (5, fargs); |
| 3503 | UNGCPRO_VAR (inner_gcpro); | 3504 | UNGCPRO; |
| 3504 | } | 3505 | } |
| 3505 | if (CONSP (coding_systems)) | 3506 | if (CONSP (coding_systems)) |
| 3506 | val = XCAR (coding_systems); | 3507 | val = XCAR (coding_systems); |
| @@ -3531,9 +3532,9 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3531 | { | 3532 | { |
| 3532 | fargs[0] = Qopen_network_stream, fargs[1] = name, | 3533 | fargs[0] = Qopen_network_stream, fargs[1] = name, |
| 3533 | fargs[2] = buffer, fargs[3] = host, fargs[4] = service; | 3534 | fargs[2] = buffer, fargs[3] = host, fargs[4] = service; |
| 3534 | GCPRO1_VAR (proc, inner_gcpro); | 3535 | GCPRO1 (proc); |
| 3535 | coding_systems = Ffind_operation_coding_system (5, fargs); | 3536 | coding_systems = Ffind_operation_coding_system (5, fargs); |
| 3536 | UNGCPRO_VAR (inner_gcpro); | 3537 | UNGCPRO; |
| 3537 | } | 3538 | } |
| 3538 | } | 3539 | } |
| 3539 | if (CONSP (coding_systems)) | 3540 | if (CONSP (coding_systems)) |
| @@ -3713,7 +3714,7 @@ DEFUN ("network-interface-info", Fnetwork_interface_info, Snetwork_interface_inf | |||
| 3713 | doc: /* Return information about network interface named IFNAME. | 3714 | doc: /* Return information about network interface named IFNAME. |
| 3714 | The return value is a list (ADDR BCAST NETMASK HWADDR FLAGS), | 3715 | The return value is a list (ADDR BCAST NETMASK HWADDR FLAGS), |
| 3715 | where ADDR is the layer 3 address, BCAST is the layer 3 broadcast address, | 3716 | where ADDR is the layer 3 address, BCAST is the layer 3 broadcast address, |
| 3716 | NETMASK is the layer 3 network mask, HWADDR is the layer 2 addres, and | 3717 | NETMASK is the layer 3 network mask, HWADDR is the layer 2 address, and |
| 3717 | FLAGS is the current flags of the interface. */) | 3718 | FLAGS is the current flags of the interface. */) |
| 3718 | (Lisp_Object ifname) | 3719 | (Lisp_Object ifname) |
| 3719 | { | 3720 | { |
| @@ -4606,15 +4607,46 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 4606 | some data in the TCP buffers so that select works, but | 4607 | some data in the TCP buffers so that select works, but |
| 4607 | with custom pull/push functions we need to check if some | 4608 | with custom pull/push functions we need to check if some |
| 4608 | data is available in the buffers manually. */ | 4609 | data is available in the buffers manually. */ |
| 4609 | if (nfds == 0 && | 4610 | if (nfds == 0) |
| 4610 | wait_proc && wait_proc->gnutls_p /* Check for valid process. */ | 4611 | { |
| 4611 | /* Do we have pending data? */ | 4612 | if (! wait_proc) |
| 4612 | && emacs_gnutls_record_check_pending (wait_proc->gnutls_state) > 0) | 4613 | { |
| 4613 | { | 4614 | /* We're not waiting on a specific process, so loop |
| 4614 | nfds = 1; | 4615 | through all the channels and check for data. |
| 4615 | /* Set to Available. */ | 4616 | This is a workaround needed for some versions of |
| 4616 | FD_SET (wait_proc->infd, &Available); | 4617 | the gnutls library -- 2.12.14 has been confirmed |
| 4617 | } | 4618 | to need it. See |
| 4619 | http://comments.gmane.org/gmane.emacs.devel/145074 */ | ||
| 4620 | for (channel = 0; channel < MAXDESC; ++channel) | ||
| 4621 | if (! NILP (chan_process[channel])) | ||
| 4622 | { | ||
| 4623 | struct Lisp_Process *p = | ||
| 4624 | XPROCESS (chan_process[channel]); | ||
| 4625 | if (p && p->gnutls_p && p->infd | ||
| 4626 | && ((emacs_gnutls_record_check_pending | ||
| 4627 | (p->gnutls_state)) | ||
| 4628 | > 0)) | ||
| 4629 | { | ||
| 4630 | nfds++; | ||
| 4631 | FD_SET (p->infd, &Available); | ||
| 4632 | } | ||
| 4633 | } | ||
| 4634 | } | ||
| 4635 | else | ||
| 4636 | { | ||
| 4637 | /* Check this specific channel. */ | ||
| 4638 | if (wait_proc->gnutls_p /* Check for valid process. */ | ||
| 4639 | /* Do we have pending data? */ | ||
| 4640 | && ((emacs_gnutls_record_check_pending | ||
| 4641 | (wait_proc->gnutls_state)) | ||
| 4642 | > 0)) | ||
| 4643 | { | ||
| 4644 | nfds = 1; | ||
| 4645 | /* Set to Available. */ | ||
| 4646 | FD_SET (wait_proc->infd, &Available); | ||
| 4647 | } | ||
| 4648 | } | ||
| 4649 | } | ||
| 4618 | #endif | 4650 | #endif |
| 4619 | } | 4651 | } |
| 4620 | 4652 | ||
diff --git a/src/puresize.h b/src/puresize.h index a1b7007805b..889d836af78 100644 --- a/src/puresize.h +++ b/src/puresize.h | |||
| @@ -79,21 +79,7 @@ extern void pure_write_error (void) NO_RETURN; | |||
| 79 | 79 | ||
| 80 | /* Define PURE_P. */ | 80 | /* Define PURE_P. */ |
| 81 | 81 | ||
| 82 | #ifdef VIRT_ADDR_VARIES | ||
| 83 | /* For machines where text and data can go anywhere | ||
| 84 | in virtual memory. */ | ||
| 85 | |||
| 86 | extern EMACS_INT pure[]; | 82 | extern EMACS_INT pure[]; |
| 87 | 83 | ||
| 88 | #define PURE_P(obj) \ | 84 | #define PURE_P(obj) \ |
| 89 | ((PNTR_COMPARISON_TYPE) XPNTR (obj) < (PNTR_COMPARISON_TYPE) ((char *) pure + PURESIZE) \ | 85 | ((uintptr_t) XPNTR (obj) - (uintptr_t) pure <= PURESIZE) |
| 90 | && (PNTR_COMPARISON_TYPE) XPNTR (obj) >= (PNTR_COMPARISON_TYPE) pure) | ||
| 91 | |||
| 92 | #else /* not VIRT_ADDR_VARIES */ | ||
| 93 | |||
| 94 | extern char my_edata[]; | ||
| 95 | |||
| 96 | #define PURE_P(obj) \ | ||
| 97 | ((PNTR_COMPARISON_TYPE) XPNTR (obj) < (PNTR_COMPARISON_TYPE) my_edata) | ||
| 98 | |||
| 99 | #endif /* VIRT_ADDRESS_VARIES */ | ||
diff --git a/src/regex.c b/src/regex.c index b7699378f5a..0ba05a95fdb 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC && !emacs) | 53 | (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC && !emacs) |
| 54 | #endif | 54 | #endif |
| 55 | 55 | ||
| 56 | /* For platform which support the ISO C amendement 1 functionality we | 56 | /* For platform which support the ISO C amendment 1 functionality we |
| 57 | support user defined character classes. */ | 57 | support user defined character classes. */ |
| 58 | #if WIDE_CHAR_SUPPORT | 58 | #if WIDE_CHAR_SUPPORT |
| 59 | /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ | 59 | /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ |
diff --git a/src/regex.h b/src/regex.h index eba62f2e769..32ccfb7ddef 100644 --- a/src/regex.h +++ b/src/regex.h | |||
| @@ -582,7 +582,7 @@ extern void regfree _RE_ARGS ((regex_t *__preg)); | |||
| 582 | } | 582 | } |
| 583 | #endif /* C++ */ | 583 | #endif /* C++ */ |
| 584 | 584 | ||
| 585 | /* For platform which support the ISO C amendement 1 functionality we | 585 | /* For platform which support the ISO C amendment 1 functionality we |
| 586 | support user defined character classes. */ | 586 | support user defined character classes. */ |
| 587 | #if WIDE_CHAR_SUPPORT | 587 | #if WIDE_CHAR_SUPPORT |
| 588 | /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ | 588 | /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ |
| @@ -592,7 +592,7 @@ extern void regfree _RE_ARGS ((regex_t *__preg)); | |||
| 592 | 592 | ||
| 593 | #if WIDE_CHAR_SUPPORT | 593 | #if WIDE_CHAR_SUPPORT |
| 594 | /* The GNU C library provides support for user-defined character classes | 594 | /* The GNU C library provides support for user-defined character classes |
| 595 | and the functions from ISO C amendement 1. */ | 595 | and the functions from ISO C amendment 1. */ |
| 596 | # ifdef CHARCLASS_NAME_MAX | 596 | # ifdef CHARCLASS_NAME_MAX |
| 597 | # define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX | 597 | # define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX |
| 598 | # else | 598 | # else |
diff --git a/src/s/cygwin.h b/src/s/cygwin.h index af5308ff7bb..8f5a0ab1fc7 100644 --- a/src/s/cygwin.h +++ b/src/s/cygwin.h | |||
| @@ -91,9 +91,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 91 | why it needed to be changed. */ | 91 | why it needed to be changed. */ |
| 92 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | 92 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS |
| 93 | 93 | ||
| 94 | /* Virtual addresses of pure and impure space can vary, as on Windows. */ | ||
| 95 | #define VIRT_ADDR_VARIES | ||
| 96 | |||
| 97 | /* Emacs supplies its own malloc, but glib (part of Gtk+) calls | 94 | /* Emacs supplies its own malloc, but glib (part of Gtk+) calls |
| 98 | memalign and on Cygwin, that becomes the Cygwin-supplied memalign. | 95 | memalign and on Cygwin, that becomes the Cygwin-supplied memalign. |
| 99 | As malloc is not the Cygwin malloc, the Cygwin memalign always | 96 | As malloc is not the Cygwin malloc, the Cygwin memalign always |
diff --git a/src/s/hpux10-20.h b/src/s/hpux10-20.h index 37199bcc29b..be457498add 100644 --- a/src/s/hpux10-20.h +++ b/src/s/hpux10-20.h | |||
| @@ -100,14 +100,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 100 | header sections which lose when `static' is defined away, as it is | 100 | header sections which lose when `static' is defined away, as it is |
| 101 | on HP-UX. (You get duplicate symbol errors on linking). */ | 101 | on HP-UX. (You get duplicate symbol errors on linking). */ |
| 102 | #undef _FILE_OFFSET_BITS | 102 | #undef _FILE_OFFSET_BITS |
| 103 | |||
| 104 | /* Define VIRT_ADDR_VARIES if the virtual addresses of | ||
| 105 | pure and impure space as loaded can vary, and even their | ||
| 106 | relative order cannot be relied on. | ||
| 107 | |||
| 108 | Otherwise Emacs assumes that text space precedes data space, | ||
| 109 | numerically. */ | ||
| 110 | #define VIRT_ADDR_VARIES | ||
| 111 | 103 | ||
| 112 | /* The data segment on this machine always starts at address 0x40000000. */ | 104 | /* The data segment on this machine always starts at address 0x40000000. */ |
| 113 | #define DATA_SEG_BITS 0x40000000 | 105 | #define DATA_SEG_BITS 0x40000000 |
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index fb0882860d1..cc19765aba6 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h | |||
| @@ -267,6 +267,8 @@ struct sigaction { | |||
| 267 | #define getpid _getpid | 267 | #define getpid _getpid |
| 268 | #ifdef _MSC_VER | 268 | #ifdef _MSC_VER |
| 269 | typedef int pid_t; | 269 | typedef int pid_t; |
| 270 | #define snprintf _snprintf | ||
| 271 | #define strtoll _strtoi64 | ||
| 270 | #endif | 272 | #endif |
| 271 | #define isatty _isatty | 273 | #define isatty _isatty |
| 272 | #define logb _logb | 274 | #define logb _logb |
| @@ -275,15 +277,17 @@ typedef int pid_t; | |||
| 275 | #define popen _popen | 277 | #define popen _popen |
| 276 | #define pclose _pclose | 278 | #define pclose _pclose |
| 277 | #define umask _umask | 279 | #define umask _umask |
| 280 | #ifndef _MSC_VER | ||
| 278 | #define utimbuf _utimbuf | 281 | #define utimbuf _utimbuf |
| 282 | #endif | ||
| 279 | #define strdup _strdup | 283 | #define strdup _strdup |
| 280 | #define strupr _strupr | 284 | #define strupr _strupr |
| 281 | #define strnicmp _strnicmp | 285 | #define strnicmp _strnicmp |
| 282 | #define stricmp _stricmp | 286 | #define stricmp _stricmp |
| 283 | #define tzset _tzset | 287 | #define tzset _tzset |
| 284 | 288 | ||
| 285 | #if !defined (_MSC_VER) || (_MSC_VER < 1400) | ||
| 286 | #define tzname _tzname | 289 | #define tzname _tzname |
| 290 | #if !defined (_MSC_VER) || (_MSC_VER < 1400) | ||
| 287 | #undef utime | 291 | #undef utime |
| 288 | #define utime _utime | 292 | #define utime _utime |
| 289 | #endif | 293 | #endif |
| @@ -335,7 +339,7 @@ extern char *get_emacs_configuration_options (void); | |||
| 335 | #define _WINSOCK_H | 339 | #define _WINSOCK_H |
| 336 | 340 | ||
| 337 | /* Defines size_t and alloca (). */ | 341 | /* Defines size_t and alloca (). */ |
| 338 | #if (defined(_MSC_VER) && defined(emacs)) || defined(USE_CRT_DLL) | 342 | #ifdef emacs |
| 339 | #define malloc e_malloc | 343 | #define malloc e_malloc |
| 340 | #define free e_free | 344 | #define free e_free |
| 341 | #define realloc e_realloc | 345 | #define realloc e_realloc |
diff --git a/src/search.c b/src/search.c index df53dbf8d89..160d08e3c8c 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -83,11 +83,10 @@ static struct re_registers search_regs; | |||
| 83 | Qnil if no searching has been done yet. */ | 83 | Qnil if no searching has been done yet. */ |
| 84 | static Lisp_Object last_thing_searched; | 84 | static Lisp_Object last_thing_searched; |
| 85 | 85 | ||
| 86 | /* error condition signaled when regexp compile_pattern fails */ | 86 | /* Error condition signaled when regexp compile_pattern fails. */ |
| 87 | |||
| 88 | static Lisp_Object Qinvalid_regexp; | 87 | static Lisp_Object Qinvalid_regexp; |
| 89 | 88 | ||
| 90 | /* Error condition used for failing searches */ | 89 | /* Error condition used for failing searches. */ |
| 91 | static Lisp_Object Qsearch_failed; | 90 | static Lisp_Object Qsearch_failed; |
| 92 | 91 | ||
| 93 | static void set_search_regs (ptrdiff_t, ptrdiff_t); | 92 | static void set_search_regs (ptrdiff_t, ptrdiff_t); |
| @@ -1893,7 +1892,7 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat, | |||
| 1893 | || CHAR_HEAD_P (cursor[1])) | 1892 | || CHAR_HEAD_P (cursor[1])) |
| 1894 | && (CHAR_HEAD_P (cursor[0]) | 1893 | && (CHAR_HEAD_P (cursor[0]) |
| 1895 | /* Check if this is the last byte of | 1894 | /* Check if this is the last byte of |
| 1896 | a translable character. */ | 1895 | a translatable character. */ |
| 1897 | || (translate_prev_byte1 == cursor[-1] | 1896 | || (translate_prev_byte1 == cursor[-1] |
| 1898 | && (CHAR_HEAD_P (translate_prev_byte1) | 1897 | && (CHAR_HEAD_P (translate_prev_byte1) |
| 1899 | || (translate_prev_byte2 == cursor[-2] | 1898 | || (translate_prev_byte2 == cursor[-2] |
| @@ -1992,7 +1991,7 @@ boyer_moore (EMACS_INT n, unsigned char *base_pat, | |||
| 1992 | || CHAR_HEAD_P (ptr[1])) | 1991 | || CHAR_HEAD_P (ptr[1])) |
| 1993 | && (CHAR_HEAD_P (ptr[0]) | 1992 | && (CHAR_HEAD_P (ptr[0]) |
| 1994 | /* Check if this is the last byte of a | 1993 | /* Check if this is the last byte of a |
| 1995 | translable character. */ | 1994 | translatable character. */ |
| 1996 | || (translate_prev_byte1 == ptr[-1] | 1995 | || (translate_prev_byte1 == ptr[-1] |
| 1997 | && (CHAR_HEAD_P (translate_prev_byte1) | 1996 | && (CHAR_HEAD_P (translate_prev_byte1) |
| 1998 | || (translate_prev_byte2 == ptr[-2] | 1997 | || (translate_prev_byte2 == ptr[-2] |
| @@ -2079,13 +2078,16 @@ set_search_regs (ptrdiff_t beg_byte, ptrdiff_t nbytes) | |||
| 2079 | XSETBUFFER (last_thing_searched, current_buffer); | 2078 | XSETBUFFER (last_thing_searched, current_buffer); |
| 2080 | } | 2079 | } |
| 2081 | 2080 | ||
| 2082 | /* Given STRING, a string of words separated by word delimiters, | 2081 | DEFUN ("word-search-regexp", Fword_search_regexp, Sword_search_regexp, 1, 2, 0, |
| 2083 | compute a regexp that matches those exact words separated by | 2082 | doc: /* Return a regexp which matches words, ignoring punctuation. |
| 2084 | arbitrary punctuation. If LAX is nonzero, the end of the string | 2083 | Given STRING, a string of words separated by word delimiters, |
| 2085 | need not match a word boundary unless it ends in whitespace. */ | 2084 | compute a regexp that matches those exact words separated by |
| 2086 | 2085 | arbitrary punctuation. If LAX is non-nil, the end of the string | |
| 2087 | static Lisp_Object | 2086 | need not match a word boundary unless it ends in whitespace. |
| 2088 | wordify (Lisp_Object string, int lax) | 2087 | |
| 2088 | Used in `word-search-forward', `word-search-backward', | ||
| 2089 | `word-search-forward-lax', `word-search-backward-lax'. */) | ||
| 2090 | (Lisp_Object string, Lisp_Object lax) | ||
| 2089 | { | 2091 | { |
| 2090 | register unsigned char *o; | 2092 | register unsigned char *o; |
| 2091 | register ptrdiff_t i, i_byte, len, punct_count = 0, word_count = 0; | 2093 | register ptrdiff_t i, i_byte, len, punct_count = 0, word_count = 0; |
| @@ -2129,7 +2131,7 @@ wordify (Lisp_Object string, int lax) | |||
| 2129 | if (TYPE_MAXIMUM (EMACS_INT) / 5 < adjust) | 2131 | if (TYPE_MAXIMUM (EMACS_INT) / 5 < adjust) |
| 2130 | memory_full (SIZE_MAX); | 2132 | memory_full (SIZE_MAX); |
| 2131 | adjust = - punct_count + 5 * adjust | 2133 | adjust = - punct_count + 5 * adjust |
| 2132 | + ((lax && !whitespace_at_end) ? 2 : 4); | 2134 | + ((!NILP (lax) && !whitespace_at_end) ? 2 : 4); |
| 2133 | if (STRING_MULTIBYTE (string)) | 2135 | if (STRING_MULTIBYTE (string)) |
| 2134 | { | 2136 | { |
| 2135 | if (INT_ADD_OVERFLOW (SBYTES (string), adjust)) | 2137 | if (INT_ADD_OVERFLOW (SBYTES (string), adjust)) |
| @@ -2173,7 +2175,7 @@ wordify (Lisp_Object string, int lax) | |||
| 2173 | prev_c = c; | 2175 | prev_c = c; |
| 2174 | } | 2176 | } |
| 2175 | 2177 | ||
| 2176 | if (!lax || whitespace_at_end) | 2178 | if (NILP (lax) || whitespace_at_end) |
| 2177 | { | 2179 | { |
| 2178 | *o++ = '\\'; | 2180 | *o++ = '\\'; |
| 2179 | *o++ = 'b'; | 2181 | *o++ = 'b'; |
| @@ -2228,10 +2230,14 @@ An optional second argument bounds the search; it is a buffer position. | |||
| 2228 | The match found must not extend before that position. | 2230 | The match found must not extend before that position. |
| 2229 | Optional third argument, if t, means if fail just return nil (no error). | 2231 | Optional third argument, if t, means if fail just return nil (no error). |
| 2230 | If not nil and not t, move to limit of search and return nil. | 2232 | If not nil and not t, move to limit of search and return nil. |
| 2231 | Optional fourth argument is repeat count--search for successive occurrences. */) | 2233 | Optional fourth argument is repeat count--search for successive occurrences. |
| 2234 | |||
| 2235 | Relies on the function `word-search-regexp' to convert a sequence | ||
| 2236 | of words in STRING to a regexp used to search words without regard | ||
| 2237 | to punctuation. */) | ||
| 2232 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) | 2238 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) |
| 2233 | { | 2239 | { |
| 2234 | return search_command (wordify (string, 0), bound, noerror, count, -1, 1, 0); | 2240 | return search_command (Fword_search_regexp (string, Qnil), bound, noerror, count, -1, 1, 0); |
| 2235 | } | 2241 | } |
| 2236 | 2242 | ||
| 2237 | DEFUN ("word-search-forward", Fword_search_forward, Sword_search_forward, 1, 4, | 2243 | DEFUN ("word-search-forward", Fword_search_forward, Sword_search_forward, 1, 4, |
| @@ -2242,10 +2248,14 @@ An optional second argument bounds the search; it is a buffer position. | |||
| 2242 | The match found must not extend after that position. | 2248 | The match found must not extend after that position. |
| 2243 | Optional third argument, if t, means if fail just return nil (no error). | 2249 | Optional third argument, if t, means if fail just return nil (no error). |
| 2244 | If not nil and not t, move to limit of search and return nil. | 2250 | If not nil and not t, move to limit of search and return nil. |
| 2245 | Optional fourth argument is repeat count--search for successive occurrences. */) | 2251 | Optional fourth argument is repeat count--search for successive occurrences. |
| 2252 | |||
| 2253 | Relies on the function `word-search-regexp' to convert a sequence | ||
| 2254 | of words in STRING to a regexp used to search words without regard | ||
| 2255 | to punctuation. */) | ||
| 2246 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) | 2256 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) |
| 2247 | { | 2257 | { |
| 2248 | return search_command (wordify (string, 0), bound, noerror, count, 1, 1, 0); | 2258 | return search_command (Fword_search_regexp (string, Qnil), bound, noerror, count, 1, 1, 0); |
| 2249 | } | 2259 | } |
| 2250 | 2260 | ||
| 2251 | DEFUN ("word-search-backward-lax", Fword_search_backward_lax, Sword_search_backward_lax, 1, 4, | 2261 | DEFUN ("word-search-backward-lax", Fword_search_backward_lax, Sword_search_backward_lax, 1, 4, |
| @@ -2260,10 +2270,14 @@ An optional second argument bounds the search; it is a buffer position. | |||
| 2260 | The match found must not extend before that position. | 2270 | The match found must not extend before that position. |
| 2261 | Optional third argument, if t, means if fail just return nil (no error). | 2271 | Optional third argument, if t, means if fail just return nil (no error). |
| 2262 | If not nil and not t, move to limit of search and return nil. | 2272 | If not nil and not t, move to limit of search and return nil. |
| 2263 | Optional fourth argument is repeat count--search for successive occurrences. */) | 2273 | Optional fourth argument is repeat count--search for successive occurrences. |
| 2274 | |||
| 2275 | Relies on the function `word-search-regexp' to convert a sequence | ||
| 2276 | of words in STRING to a regexp used to search words without regard | ||
| 2277 | to punctuation. */) | ||
| 2264 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) | 2278 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) |
| 2265 | { | 2279 | { |
| 2266 | return search_command (wordify (string, 1), bound, noerror, count, -1, 1, 0); | 2280 | return search_command (Fword_search_regexp (string, Qt), bound, noerror, count, -1, 1, 0); |
| 2267 | } | 2281 | } |
| 2268 | 2282 | ||
| 2269 | DEFUN ("word-search-forward-lax", Fword_search_forward_lax, Sword_search_forward_lax, 1, 4, | 2283 | DEFUN ("word-search-forward-lax", Fword_search_forward_lax, Sword_search_forward_lax, 1, 4, |
| @@ -2278,10 +2292,14 @@ An optional second argument bounds the search; it is a buffer position. | |||
| 2278 | The match found must not extend after that position. | 2292 | The match found must not extend after that position. |
| 2279 | Optional third argument, if t, means if fail just return nil (no error). | 2293 | Optional third argument, if t, means if fail just return nil (no error). |
| 2280 | If not nil and not t, move to limit of search and return nil. | 2294 | If not nil and not t, move to limit of search and return nil. |
| 2281 | Optional fourth argument is repeat count--search for successive occurrences. */) | 2295 | Optional fourth argument is repeat count--search for successive occurrences. |
| 2296 | |||
| 2297 | Relies on the function `word-search-regexp' to convert a sequence | ||
| 2298 | of words in STRING to a regexp used to search words without regard | ||
| 2299 | to punctuation. */) | ||
| 2282 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) | 2300 | (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count) |
| 2283 | { | 2301 | { |
| 2284 | return search_command (wordify (string, 1), bound, noerror, count, 1, 1, 0); | 2302 | return search_command (Fword_search_regexp (string, Qt), bound, noerror, count, 1, 1, 0); |
| 2285 | } | 2303 | } |
| 2286 | 2304 | ||
| 2287 | DEFUN ("re-search-backward", Fre_search_backward, Sre_search_backward, 1, 4, | 2305 | DEFUN ("re-search-backward", Fre_search_backward, Sre_search_backward, 1, 4, |
| @@ -3157,7 +3175,7 @@ record_unwind_save_match_data (void) | |||
| 3157 | Fmatch_data (Qnil, Qnil, Qnil)); | 3175 | Fmatch_data (Qnil, Qnil, Qnil)); |
| 3158 | } | 3176 | } |
| 3159 | 3177 | ||
| 3160 | /* Quote a string to inactivate reg-expr chars */ | 3178 | /* Quote a string to deactivate reg-expr chars */ |
| 3161 | 3179 | ||
| 3162 | DEFUN ("regexp-quote", Fregexp_quote, Sregexp_quote, 1, 1, 0, | 3180 | DEFUN ("regexp-quote", Fregexp_quote, Sregexp_quote, 1, 1, 0, |
| 3163 | doc: /* Return a regexp string which matches exactly STRING and nothing else. */) | 3181 | doc: /* Return a regexp string which matches exactly STRING and nothing else. */) |
| @@ -3254,6 +3272,7 @@ is to bind it with `let' around a small expression. */); | |||
| 3254 | defsubr (&Sposix_string_match); | 3272 | defsubr (&Sposix_string_match); |
| 3255 | defsubr (&Ssearch_forward); | 3273 | defsubr (&Ssearch_forward); |
| 3256 | defsubr (&Ssearch_backward); | 3274 | defsubr (&Ssearch_backward); |
| 3275 | defsubr (&Sword_search_regexp); | ||
| 3257 | defsubr (&Sword_search_forward); | 3276 | defsubr (&Sword_search_forward); |
| 3258 | defsubr (&Sword_search_backward); | 3277 | defsubr (&Sword_search_backward); |
| 3259 | defsubr (&Sword_search_forward_lax); | 3278 | defsubr (&Sword_search_forward_lax); |
diff --git a/src/sound.c b/src/sound.c index 9e15caae3ea..af9dc98c3d3 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -267,7 +267,7 @@ struct sound | |||
| 267 | read from the start of a sound file. */ | 267 | read from the start of a sound file. */ |
| 268 | char *header; | 268 | char *header; |
| 269 | 269 | ||
| 270 | /* Number of bytes raed from sound file. This is always <= | 270 | /* Number of bytes read from sound file. This is always <= |
| 271 | MAX_SOUND_HEADER_BYTES. */ | 271 | MAX_SOUND_HEADER_BYTES. */ |
| 272 | int header_size; | 272 | int header_size; |
| 273 | 273 | ||
diff --git a/src/sysdep.c b/src/sysdep.c index 9b4bd088046..bd8a1020441 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -433,7 +433,7 @@ child_setup_tty (int out) | |||
| 433 | #endif /* AIX */ | 433 | #endif /* AIX */ |
| 434 | 434 | ||
| 435 | /* We originally enabled ICANON (and set VEOF to 04), and then had | 435 | /* We originally enabled ICANON (and set VEOF to 04), and then had |
| 436 | proces.c send additional EOF chars to flush the output when faced | 436 | process.c send additional EOF chars to flush the output when faced |
| 437 | with long lines, but this leads to weird effects when the | 437 | with long lines, but this leads to weird effects when the |
| 438 | subprocess has disabled ICANON and ends up seeing those spurious | 438 | subprocess has disabled ICANON and ends up seeing those spurious |
| 439 | extra EOFs. So we don't send EOFs any more in | 439 | extra EOFs. So we don't send EOFs any more in |
| @@ -1663,7 +1663,7 @@ init_signals (void) | |||
| 1663 | sys_siglist[SIGQUIT] = "Quit"; | 1663 | sys_siglist[SIGQUIT] = "Quit"; |
| 1664 | # endif | 1664 | # endif |
| 1665 | # ifdef SIGRETRACT | 1665 | # ifdef SIGRETRACT |
| 1666 | sys_siglist[SIGRETRACT] = "Need to relinguish monitor mode"; | 1666 | sys_siglist[SIGRETRACT] = "Need to relinquish monitor mode"; |
| 1667 | # endif | 1667 | # endif |
| 1668 | # ifdef SIGSAK | 1668 | # ifdef SIGSAK |
| 1669 | sys_siglist[SIGSAK] = "Secure attention"; | 1669 | sys_siglist[SIGSAK] = "Secure attention"; |
diff --git a/src/term.c b/src/term.c index fb3166a6e50..036f5797e48 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3234,7 +3234,7 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ | |||
| 3234 | MultiLeft (tty) = tgetstr ("LE", address); | 3234 | MultiLeft (tty) = tgetstr ("LE", address); |
| 3235 | MultiRight (tty) = tgetstr ("RI", address); | 3235 | MultiRight (tty) = tgetstr ("RI", address); |
| 3236 | 3236 | ||
| 3237 | /* SVr4/ANSI color suppert. If "op" isn't available, don't support | 3237 | /* SVr4/ANSI color support. If "op" isn't available, don't support |
| 3238 | color because we can't switch back to the default foreground and | 3238 | color because we can't switch back to the default foreground and |
| 3239 | background. */ | 3239 | background. */ |
| 3240 | tty->TS_orig_pair = tgetstr ("op", address); | 3240 | tty->TS_orig_pair = tgetstr ("op", address); |
diff --git a/src/textprop.c b/src/textprop.c index a877e2a67ae..1a635444b00 100644 --- a/src/textprop.c +++ b/src/textprop.c | |||
| @@ -1625,7 +1625,7 @@ Return t if any property was actually removed, nil otherwise. */) | |||
| 1625 | 1625 | ||
| 1626 | DEFUN ("text-property-any", Ftext_property_any, | 1626 | DEFUN ("text-property-any", Ftext_property_any, |
| 1627 | Stext_property_any, 4, 5, 0, | 1627 | Stext_property_any, 4, 5, 0, |
| 1628 | doc: /* Check text from START to END for property PROPERTY equalling VALUE. | 1628 | doc: /* Check text from START to END for property PROPERTY equaling VALUE. |
| 1629 | If so, return the position of the first character whose property PROPERTY | 1629 | If so, return the position of the first character whose property PROPERTY |
| 1630 | is `eq' to VALUE. Otherwise return nil. | 1630 | is `eq' to VALUE. Otherwise return nil. |
| 1631 | If the optional fifth argument OBJECT is a buffer (or nil, which means | 1631 | If the optional fifth argument OBJECT is a buffer (or nil, which means |
| @@ -1661,7 +1661,7 @@ markers). If OBJECT is a string, START and END are 0-based indices into it. */ | |||
| 1661 | 1661 | ||
| 1662 | DEFUN ("text-property-not-all", Ftext_property_not_all, | 1662 | DEFUN ("text-property-not-all", Ftext_property_not_all, |
| 1663 | Stext_property_not_all, 4, 5, 0, | 1663 | Stext_property_not_all, 4, 5, 0, |
| 1664 | doc: /* Check text from START to END for property PROPERTY not equalling VALUE. | 1664 | doc: /* Check text from START to END for property PROPERTY not equaling VALUE. |
| 1665 | If so, return the position of the first character whose property PROPERTY | 1665 | If so, return the position of the first character whose property PROPERTY |
| 1666 | is not `eq' to VALUE. Otherwise, return nil. | 1666 | is not `eq' to VALUE. Otherwise, return nil. |
| 1667 | If the optional fifth argument OBJECT is a buffer (or nil, which means | 1667 | If the optional fifth argument OBJECT is a buffer (or nil, which means |
diff --git a/src/unexelf.c b/src/unexelf.c index 04c029f7e80..1715c3670ca 100644 --- a/src/unexelf.c +++ b/src/unexelf.c | |||
| @@ -1219,9 +1219,15 @@ temacs: | |||
| 1219 | nn = symp->st_shndx; | 1219 | nn = symp->st_shndx; |
| 1220 | if (nn > old_bss_index) | 1220 | if (nn > old_bss_index) |
| 1221 | nn--; | 1221 | nn--; |
| 1222 | old = ((symp->st_value - NEW_SECTION_H (symp->st_shndx).sh_addr) | 1222 | if (nn == old_bss_index) |
| 1223 | + OLD_SECTION_H (nn).sh_offset + old_base); | 1223 | memset (new, 0, symp->st_size); |
| 1224 | memcpy (new, old, symp->st_size); | 1224 | else |
| 1225 | { | ||
| 1226 | old = ((symp->st_value | ||
| 1227 | - NEW_SECTION_H (symp->st_shndx).sh_addr) | ||
| 1228 | + OLD_SECTION_H (nn).sh_offset + old_base); | ||
| 1229 | memcpy (new, old, symp->st_size); | ||
| 1230 | } | ||
| 1225 | } | 1231 | } |
| 1226 | #endif | 1232 | #endif |
| 1227 | } | 1233 | } |
| @@ -1654,6 +1654,24 @@ init_environment (char ** argv) | |||
| 1654 | } | 1654 | } |
| 1655 | } | 1655 | } |
| 1656 | 1656 | ||
| 1657 | /* When Emacs is invoked with --no-site-lisp, we must remove the | ||
| 1658 | site-lisp directories from the default value of EMACSLOADPATH. | ||
| 1659 | This assumes that the site-lisp entries are at the front, and | ||
| 1660 | that additional entries do exist. */ | ||
| 1661 | if (no_site_lisp) | ||
| 1662 | { | ||
| 1663 | for (i = 0; i < N_ENV_VARS; i++) | ||
| 1664 | { | ||
| 1665 | if (strcmp (env_vars[i].name, "EMACSLOADPATH") == 0) | ||
| 1666 | { | ||
| 1667 | char *site; | ||
| 1668 | while ((site = strstr (env_vars[i].def_value, "site-lisp"))) | ||
| 1669 | env_vars[i].def_value = strchr (site, ';') + 1; | ||
| 1670 | break; | ||
| 1671 | } | ||
| 1672 | } | ||
| 1673 | } | ||
| 1674 | |||
| 1657 | #define SET_ENV_BUF_SIZE (4 * MAX_PATH) /* to cover EMACSLOADPATH */ | 1675 | #define SET_ENV_BUF_SIZE (4 * MAX_PATH) /* to cover EMACSLOADPATH */ |
| 1658 | 1676 | ||
| 1659 | /* Treat emacs_dir specially: set it unconditionally based on our | 1677 | /* Treat emacs_dir specially: set it unconditionally based on our |
| @@ -3057,7 +3075,7 @@ generate_inode_val (const char * name) | |||
| 3057 | unsigned hash; | 3075 | unsigned hash; |
| 3058 | 3076 | ||
| 3059 | /* Get the truly canonical filename, if it exists. (Note: this | 3077 | /* Get the truly canonical filename, if it exists. (Note: this |
| 3060 | doesn't resolve aliasing due to subst commands, or recognise hard | 3078 | doesn't resolve aliasing due to subst commands, or recognize hard |
| 3061 | links. */ | 3079 | links. */ |
| 3062 | if (!w32_get_long_filename ((char *)name, fullname, MAX_PATH)) | 3080 | if (!w32_get_long_filename ((char *)name, fullname, MAX_PATH)) |
| 3063 | abort (); | 3081 | abort (); |
| @@ -5845,7 +5863,7 @@ term_ntproc (void) | |||
| 5845 | void | 5863 | void |
| 5846 | init_ntproc (void) | 5864 | init_ntproc (void) |
| 5847 | { | 5865 | { |
| 5848 | /* Initialise the socket interface now if available and requested by | 5866 | /* Initialize the socket interface now if available and requested by |
| 5849 | the user by defining PRELOAD_WINSOCK; otherwise loading will be | 5867 | the user by defining PRELOAD_WINSOCK; otherwise loading will be |
| 5850 | delayed until open-network-stream is called (w32-has-winsock can | 5868 | delayed until open-network-stream is called (w32-has-winsock can |
| 5851 | also be used to dynamically load or reload winsock). | 5869 | also be used to dynamically load or reload winsock). |
diff --git a/src/w32console.c b/src/w32console.c index 49bf56ddee9..30c71f1c276 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -748,7 +748,7 @@ syms_of_ntterm (void) | |||
| 748 | doc: /* Non-nil means make terminal frames use the full screen buffer dimensions. | 748 | doc: /* Non-nil means make terminal frames use the full screen buffer dimensions. |
| 749 | This is desirable when running Emacs over telnet. | 749 | This is desirable when running Emacs over telnet. |
| 750 | A value of nil means use the current console window dimensions; this | 750 | A value of nil means use the current console window dimensions; this |
| 751 | may be preferrable when working directly at the console with a large | 751 | may be preferable when working directly at the console with a large |
| 752 | scroll-back buffer. */); | 752 | scroll-back buffer. */); |
| 753 | w32_use_full_screen_buffer = 0; | 753 | w32_use_full_screen_buffer = 0; |
| 754 | 754 | ||
| @@ -757,4 +757,3 @@ scroll-back buffer. */); | |||
| 757 | defsubr (&Sset_cursor_size); | 757 | defsubr (&Sset_cursor_size); |
| 758 | defsubr (&Sset_message_beep); | 758 | defsubr (&Sset_message_beep); |
| 759 | } | 759 | } |
| 760 | |||
diff --git a/src/w32fns.c b/src/w32fns.c index aa4650dd7b2..20284108185 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -2262,7 +2262,7 @@ w32_msg_pump (deferred_msg * msg_buf) | |||
| 2262 | some third party shell extensions can cause it to be used in | 2262 | some third party shell extensions can cause it to be used in |
| 2263 | system dialogs, which causes a crash if it is not initialized. | 2263 | system dialogs, which causes a crash if it is not initialized. |
| 2264 | This is a known bug in Windows, which was fixed long ago, but | 2264 | This is a known bug in Windows, which was fixed long ago, but |
| 2265 | the patch for XP is not publically available until XP SP3, | 2265 | the patch for XP is not publicly available until XP SP3, |
| 2266 | and older versions will never be patched. */ | 2266 | and older versions will never be patched. */ |
| 2267 | CoInitialize (NULL); | 2267 | CoInitialize (NULL); |
| 2268 | w32_createwindow ((struct frame *) msg.wParam); | 2268 | w32_createwindow ((struct frame *) msg.wParam); |
| @@ -2417,7 +2417,7 @@ complete_deferred_msg (HWND hwnd, UINT msg, LRESULT result) | |||
| 2417 | deferred_msg * msg_buf = find_deferred_msg (hwnd, msg); | 2417 | deferred_msg * msg_buf = find_deferred_msg (hwnd, msg); |
| 2418 | 2418 | ||
| 2419 | if (msg_buf == NULL) | 2419 | if (msg_buf == NULL) |
| 2420 | /* Message may have been cancelled, so don't abort. */ | 2420 | /* Message may have been canceled, so don't abort. */ |
| 2421 | return; | 2421 | return; |
| 2422 | 2422 | ||
| 2423 | msg_buf->result = result; | 2423 | msg_buf->result = result; |
| @@ -2538,7 +2538,7 @@ post_character_message (HWND hwnd, UINT msg, | |||
| 2538 | the lisp thread to respond. | 2538 | the lisp thread to respond. |
| 2539 | 2539 | ||
| 2540 | Note that we don't want to block the input thread waiting for | 2540 | Note that we don't want to block the input thread waiting for |
| 2541 | a reponse from the lisp thread (although that would at least | 2541 | a response from the lisp thread (although that would at least |
| 2542 | solve the deadlock problem above), because we want to be able | 2542 | solve the deadlock problem above), because we want to be able |
| 2543 | to receive C-g to interrupt the lisp thread. */ | 2543 | to receive C-g to interrupt the lisp thread. */ |
| 2544 | cancel_all_deferred_msgs (); | 2544 | cancel_all_deferred_msgs (); |
| @@ -2880,7 +2880,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 2880 | key.dwControlKeyState = modifiers; | 2880 | key.dwControlKeyState = modifiers; |
| 2881 | 2881 | ||
| 2882 | add = w32_kbd_patch_key (&key); | 2882 | add = w32_kbd_patch_key (&key); |
| 2883 | /* 0 means an unrecognised keycode, negative means | 2883 | /* 0 means an unrecognized keycode, negative means |
| 2884 | dead key. Ignore both. */ | 2884 | dead key. Ignore both. */ |
| 2885 | while (--add >= 0) | 2885 | while (--add >= 0) |
| 2886 | { | 2886 | { |
| @@ -2943,7 +2943,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 2943 | break; | 2943 | break; |
| 2944 | 2944 | ||
| 2945 | case WM_IME_CHAR: | 2945 | case WM_IME_CHAR: |
| 2946 | /* If we can't get the IME result as unicode, use default processing, | 2946 | /* If we can't get the IME result as Unicode, use default processing, |
| 2947 | which will at least allow characters decodable in the system locale | 2947 | which will at least allow characters decodable in the system locale |
| 2948 | get through. */ | 2948 | get through. */ |
| 2949 | if (!get_composition_string_fn) | 2949 | if (!get_composition_string_fn) |
| @@ -3711,7 +3711,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 3711 | if (w32_system_caret_hwnd == NULL) | 3711 | if (w32_system_caret_hwnd == NULL) |
| 3712 | { | 3712 | { |
| 3713 | /* Use the default caret width, and avoid changing it | 3713 | /* Use the default caret width, and avoid changing it |
| 3714 | unneccesarily, as it confuses screen reader software. */ | 3714 | unnecessarily, as it confuses screen reader software. */ |
| 3715 | w32_system_caret_hwnd = hwnd; | 3715 | w32_system_caret_hwnd = hwnd; |
| 3716 | CreateCaret (hwnd, NULL, 0, | 3716 | CreateCaret (hwnd, NULL, 0, |
| 3717 | w32_system_caret_height); | 3717 | w32_system_caret_height); |
| @@ -3749,7 +3749,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) | |||
| 3749 | flags |= TPM_RIGHTBUTTON; | 3749 | flags |= TPM_RIGHTBUTTON; |
| 3750 | 3750 | ||
| 3751 | /* Remember we did a SetCapture on the initial mouse down event, | 3751 | /* Remember we did a SetCapture on the initial mouse down event, |
| 3752 | so for safety, we make sure the capture is cancelled now. */ | 3752 | so for safety, we make sure the capture is canceled now. */ |
| 3753 | ReleaseCapture (); | 3753 | ReleaseCapture (); |
| 3754 | button_state = 0; | 3754 | button_state = 0; |
| 3755 | 3755 | ||
| @@ -4951,7 +4951,7 @@ If TYPE is nil or omitted, get the property as a string. | |||
| 4951 | Otherwise TYPE is the name of the atom that denotes the type expected. | 4951 | Otherwise TYPE is the name of the atom that denotes the type expected. |
| 4952 | If SOURCE is non-nil, get the property on that window instead of from | 4952 | If SOURCE is non-nil, get the property on that window instead of from |
| 4953 | FRAME. The number 0 denotes the root window. | 4953 | FRAME. The number 0 denotes the root window. |
| 4954 | If DELETE_P is non-nil, delete the property after retreiving it. | 4954 | If DELETE_P is non-nil, delete the property after retrieving it. |
| 4955 | If VECTOR_RET_P is non-nil, don't return a string but a vector of values. | 4955 | If VECTOR_RET_P is non-nil, don't return a string but a vector of values. |
| 4956 | 4956 | ||
| 4957 | Value is nil if FRAME hasn't a property with name PROP or if PROP has | 4957 | Value is nil if FRAME hasn't a property with name PROP or if PROP has |
| @@ -5011,7 +5011,8 @@ no value of TYPE (always string in the MS Windows case). */) | |||
| 5011 | cursor. Duplicated from xdisp.c, but cannot use the version there | 5011 | cursor. Duplicated from xdisp.c, but cannot use the version there |
| 5012 | due to lack of atimers on w32. */ | 5012 | due to lack of atimers on w32. */ |
| 5013 | #define DEFAULT_HOURGLASS_DELAY 1 | 5013 | #define DEFAULT_HOURGLASS_DELAY 1 |
| 5014 | /* Return non-zero if houglass timer has been started or hourglass is shown. */ | 5014 | /* Return non-zero if hourglass timer has been started or hourglass is |
| 5015 | shown. */ | ||
| 5015 | /* PENDING: if W32 can use atimers (atimer.[hc]) then the common impl in | 5016 | /* PENDING: if W32 can use atimers (atimer.[hc]) then the common impl in |
| 5016 | xdisp.c could be used. */ | 5017 | xdisp.c could be used. */ |
| 5017 | 5018 | ||
| @@ -6031,7 +6032,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */) | |||
| 6031 | 6032 | ||
| 6032 | file = DECODE_FILE (build_string (filename)); | 6033 | file = DECODE_FILE (build_string (filename)); |
| 6033 | } | 6034 | } |
| 6034 | /* User cancelled the dialog without making a selection. */ | 6035 | /* User canceled the dialog without making a selection. */ |
| 6035 | else if (!CommDlgExtendedError ()) | 6036 | else if (!CommDlgExtendedError ()) |
| 6036 | file = Qnil; | 6037 | file = Qnil; |
| 6037 | /* An error occurred, fallback on reading from the mini-buffer. */ | 6038 | /* An error occurred, fallback on reading from the mini-buffer. */ |
diff --git a/src/w32font.c b/src/w32font.c index bd58e7e757b..5cc37c0e74f 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -462,7 +462,7 @@ w32font_has_char (Lisp_Object entity, int c) | |||
| 462 | Return a glyph code of FONT for character C (Unicode code point). | 462 | Return a glyph code of FONT for character C (Unicode code point). |
| 463 | If FONT doesn't have such a glyph, return FONT_INVALID_CODE. | 463 | If FONT doesn't have such a glyph, return FONT_INVALID_CODE. |
| 464 | 464 | ||
| 465 | For speed, the gdi backend uses unicode (Emacs calls encode_char | 465 | For speed, the gdi backend uses Unicode (Emacs calls encode_char |
| 466 | far too often for it to be efficient). But we still need to detect | 466 | far too often for it to be efficient). But we still need to detect |
| 467 | which characters are not supported by the font. | 467 | which characters are not supported by the font. |
| 468 | */ | 468 | */ |
| @@ -620,7 +620,7 @@ w32font_text_extents (struct font *font, unsigned *code, | |||
| 620 | total_width = size.cx; | 620 | total_width = size.cx; |
| 621 | } | 621 | } |
| 622 | 622 | ||
| 623 | /* On 95/98/ME, only some unicode functions are available, so fallback | 623 | /* On 95/98/ME, only some Unicode functions are available, so fallback |
| 624 | on doing a dummy draw to find the total width. */ | 624 | on doing a dummy draw to find the total width. */ |
| 625 | if (!total_width) | 625 | if (!total_width) |
| 626 | { | 626 | { |
| @@ -1153,7 +1153,7 @@ w32_enumfont_pattern_entity (Lisp_Object frame, | |||
| 1153 | else | 1153 | else |
| 1154 | ASET (entity, FONT_SIZE_INDEX, make_number (0)); | 1154 | ASET (entity, FONT_SIZE_INDEX, make_number (0)); |
| 1155 | 1155 | ||
| 1156 | /* Cache unicode codepoints covered by this font, as there is no other way | 1156 | /* Cache Unicode codepoints covered by this font, as there is no other way |
| 1157 | of getting this information easily. */ | 1157 | of getting this information easily. */ |
| 1158 | if (font_type & TRUETYPE_FONTTYPE) | 1158 | if (font_type & TRUETYPE_FONTTYPE) |
| 1159 | { | 1159 | { |
| @@ -1514,7 +1514,7 @@ add_font_entity_to_list (ENUMLOGFONTEX *logical_font, | |||
| 1514 | /* Skip non matching fonts. */ | 1514 | /* Skip non matching fonts. */ |
| 1515 | 1515 | ||
| 1516 | /* For uniscribe backend, consider only truetype or opentype fonts | 1516 | /* For uniscribe backend, consider only truetype or opentype fonts |
| 1517 | that have some unicode coverage. */ | 1517 | that have some Unicode coverage. */ |
| 1518 | if (match_data->opentype_only | 1518 | if (match_data->opentype_only |
| 1519 | && ((!(physical_font->ntmTm.ntmFlags & NTMFLAGS_OPENTYPE) | 1519 | && ((!(physical_font->ntmTm.ntmFlags & NTMFLAGS_OPENTYPE) |
| 1520 | && !(font_type & TRUETYPE_FONTTYPE)) | 1520 | && !(font_type & TRUETYPE_FONTTYPE)) |
| @@ -1557,7 +1557,7 @@ add_font_entity_to_list (ENUMLOGFONTEX *logical_font, | |||
| 1557 | Lisp_Object spec_charset = AREF (match_data->orig_font_spec, | 1557 | Lisp_Object spec_charset = AREF (match_data->orig_font_spec, |
| 1558 | FONT_REGISTRY_INDEX); | 1558 | FONT_REGISTRY_INDEX); |
| 1559 | 1559 | ||
| 1560 | /* iso10646-1 fonts must contain unicode mapping tables. */ | 1560 | /* iso10646-1 fonts must contain Unicode mapping tables. */ |
| 1561 | if (EQ (spec_charset, Qiso10646_1)) | 1561 | if (EQ (spec_charset, Qiso10646_1)) |
| 1562 | { | 1562 | { |
| 1563 | if (!is_unicode) | 1563 | if (!is_unicode) |
| @@ -1572,7 +1572,7 @@ add_font_entity_to_list (ENUMLOGFONTEX *logical_font, | |||
| 1572 | && !(physical_font->ntmFontSig.fsUsb[0] & 0x007F001F)) | 1572 | && !(physical_font->ntmFontSig.fsUsb[0] & 0x007F001F)) |
| 1573 | return 1; | 1573 | return 1; |
| 1574 | } | 1574 | } |
| 1575 | /* unicode-sip fonts must contain characters in unicode plane 2. | 1575 | /* unicode-sip fonts must contain characters in Unicode plane 2. |
| 1576 | so look for bit 57 (surrogates) in the Unicode subranges, plus | 1576 | so look for bit 57 (surrogates) in the Unicode subranges, plus |
| 1577 | the bits for CJK ranges that include those characters. */ | 1577 | the bits for CJK ranges that include those characters. */ |
| 1578 | else if (EQ (spec_charset, Qunicode_sip)) | 1578 | else if (EQ (spec_charset, Qunicode_sip)) |
| @@ -1597,7 +1597,7 @@ add_font_entity_to_list (ENUMLOGFONTEX *logical_font, | |||
| 1597 | ASET (entity, FONT_REGISTRY_INDEX, spec_charset); | 1597 | ASET (entity, FONT_REGISTRY_INDEX, spec_charset); |
| 1598 | } | 1598 | } |
| 1599 | /* Otherwise if using the uniscribe backend, report ANSI and DEFAULT | 1599 | /* Otherwise if using the uniscribe backend, report ANSI and DEFAULT |
| 1600 | fonts as unicode and skip other charsets. */ | 1600 | fonts as Unicode and skip other charsets. */ |
| 1601 | else if (match_data->opentype_only) | 1601 | else if (match_data->opentype_only) |
| 1602 | { | 1602 | { |
| 1603 | if (logical_font->elfLogFont.lfCharSet == ANSI_CHARSET | 1603 | if (logical_font->elfLogFont.lfCharSet == ANSI_CHARSET |
| @@ -1640,7 +1640,7 @@ x_to_w32_charset (char * lpcs) | |||
| 1640 | if (strncmp (lpcs, "*-#", 3) == 0) | 1640 | if (strncmp (lpcs, "*-#", 3) == 0) |
| 1641 | return atoi (lpcs + 3); | 1641 | return atoi (lpcs + 3); |
| 1642 | 1642 | ||
| 1643 | /* All Windows fonts qualify as unicode. */ | 1643 | /* All Windows fonts qualify as Unicode. */ |
| 1644 | if (!strncmp (lpcs, "iso10646", 8)) | 1644 | if (!strncmp (lpcs, "iso10646", 8)) |
| 1645 | return DEFAULT_CHARSET; | 1645 | return DEFAULT_CHARSET; |
| 1646 | 1646 | ||
| @@ -1925,7 +1925,7 @@ w32_registry (LONG w32_charset, DWORD font_type) | |||
| 1925 | { | 1925 | { |
| 1926 | char *charset; | 1926 | char *charset; |
| 1927 | 1927 | ||
| 1928 | /* If charset is defaulted, charset is unicode or unknown, depending on | 1928 | /* If charset is defaulted, charset is Unicode or unknown, depending on |
| 1929 | font type. */ | 1929 | font type. */ |
| 1930 | if (w32_charset == DEFAULT_CHARSET) | 1930 | if (w32_charset == DEFAULT_CHARSET) |
| 1931 | return font_type == TRUETYPE_FONTTYPE ? Qiso10646_1 : Qunknown; | 1931 | return font_type == TRUETYPE_FONTTYPE ? Qiso10646_1 : Qunknown; |
| @@ -2080,7 +2080,7 @@ fill_in_logfont (FRAME_PTR f, LOGFONT *logfont, Lisp_Object font_spec) | |||
| 2080 | { | 2080 | { |
| 2081 | Lisp_Object key, val; | 2081 | Lisp_Object key, val; |
| 2082 | key = XCAR (tmp), val = XCDR (tmp); | 2082 | key = XCAR (tmp), val = XCDR (tmp); |
| 2083 | /* Only use QCscript if charset is not provided, or is unicode | 2083 | /* Only use QCscript if charset is not provided, or is Unicode |
| 2084 | and a single script is specified. This is rather crude, | 2084 | and a single script is specified. This is rather crude, |
| 2085 | and is only used to narrow down the fonts returned where | 2085 | and is only used to narrow down the fonts returned where |
| 2086 | there is a definite match. Some scripts, such as latin, han, | 2086 | there is a definite match. Some scripts, such as latin, han, |
diff --git a/src/w32menu.c b/src/w32menu.c index 93194b68018..369b75877e8 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -1219,7 +1219,7 @@ simple_dialog_show (FRAME_PTR f, Lisp_Object contents, Lisp_Object header) | |||
| 1219 | is_simple_dialog, we don't need to worry about checking contents | 1219 | is_simple_dialog, we don't need to worry about checking contents |
| 1220 | to see what type of dialog to use. */ | 1220 | to see what type of dialog to use. */ |
| 1221 | 1221 | ||
| 1222 | /* Use unicode if possible, so any language can be displayed. */ | 1222 | /* Use Unicode if possible, so any language can be displayed. */ |
| 1223 | if (unicode_message_box) | 1223 | if (unicode_message_box) |
| 1224 | { | 1224 | { |
| 1225 | WCHAR *text, *title; | 1225 | WCHAR *text, *title; |
| @@ -1476,7 +1476,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) | |||
| 1476 | utf16_string); | 1476 | utf16_string); |
| 1477 | if (!return_value) | 1477 | if (!return_value) |
| 1478 | { | 1478 | { |
| 1479 | /* On W9x/ME, unicode menus are not supported, though AppendMenuW | 1479 | /* On W9x/ME, Unicode menus are not supported, though AppendMenuW |
| 1480 | apparently does exist at least in some cases and appears to be | 1480 | apparently does exist at least in some cases and appears to be |
| 1481 | stubbed out to do nothing. out_string is UTF-8, but since | 1481 | stubbed out to do nothing. out_string is UTF-8, but since |
| 1482 | our standard menus are in English and this is only going to | 1482 | our standard menus are in English and this is only going to |
| @@ -1486,7 +1486,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) | |||
| 1486 | AppendMenu (menu, fuFlags, | 1486 | AppendMenu (menu, fuFlags, |
| 1487 | item != NULL ? (UINT) item: (UINT) wv->call_data, | 1487 | item != NULL ? (UINT) item: (UINT) wv->call_data, |
| 1488 | out_string); | 1488 | out_string); |
| 1489 | /* Don't use unicode menus in future. */ | 1489 | /* Don't use Unicode menus in future. */ |
| 1490 | unicode_append_menu = NULL; | 1490 | unicode_append_menu = NULL; |
| 1491 | } | 1491 | } |
| 1492 | 1492 | ||
diff --git a/src/w32proc.c b/src/w32proc.c index 279816bcc3e..254a32503c4 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -122,12 +122,12 @@ new_child (void) | |||
| 122 | 122 | ||
| 123 | for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--) | 123 | for (cp = child_procs + (child_proc_count-1); cp >= child_procs; cp--) |
| 124 | if (!CHILD_ACTIVE (cp)) | 124 | if (!CHILD_ACTIVE (cp)) |
| 125 | goto Initialise; | 125 | goto Initialize; |
| 126 | if (child_proc_count == MAX_CHILDREN) | 126 | if (child_proc_count == MAX_CHILDREN) |
| 127 | return NULL; | 127 | return NULL; |
| 128 | cp = &child_procs[child_proc_count++]; | 128 | cp = &child_procs[child_proc_count++]; |
| 129 | 129 | ||
| 130 | Initialise: | 130 | Initialize: |
| 131 | memset (cp, 0, sizeof (*cp)); | 131 | memset (cp, 0, sizeof (*cp)); |
| 132 | cp->fd = -1; | 132 | cp->fd = -1; |
| 133 | cp->pid = -1; | 133 | cp->pid = -1; |
| @@ -821,7 +821,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) | |||
| 821 | 821 | ||
| 822 | The w32 GNU-based library from Cygnus doubles quotes to escape | 822 | The w32 GNU-based library from Cygnus doubles quotes to escape |
| 823 | them, while MSVC uses backslash for escaping. (Actually the MSVC | 823 | them, while MSVC uses backslash for escaping. (Actually the MSVC |
| 824 | startup code does attempt to recognise doubled quotes and accept | 824 | startup code does attempt to recognize doubled quotes and accept |
| 825 | them, but gets it wrong and ends up requiring three quotes to get a | 825 | them, but gets it wrong and ends up requiring three quotes to get a |
| 826 | single embedded quote!) So by default we decide whether to use | 826 | single embedded quote!) So by default we decide whether to use |
| 827 | quote or backslash as the escape character based on whether the | 827 | quote or backslash as the escape character based on whether the |
diff --git a/src/w32select.c b/src/w32select.c index e3225c3f996..392cb07a96d 100644 --- a/src/w32select.c +++ b/src/w32select.c | |||
| @@ -39,7 +39,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 39 | * | 39 | * |
| 40 | * When copying or cutting (sending data to the OS), the data is | 40 | * When copying or cutting (sending data to the OS), the data is |
| 41 | * announced and stored internally, but only actually rendered on | 41 | * announced and stored internally, but only actually rendered on |
| 42 | * request. The requester determines the format provided. The | 42 | * request. The requestor determines the format provided. The |
| 43 | * {next-}selection-coding-system is only used, when its corresponding | 43 | * {next-}selection-coding-system is only used, when its corresponding |
| 44 | * clipboard type matches the type requested. | 44 | * clipboard type matches the type requested. |
| 45 | * | 45 | * |
| @@ -335,7 +335,7 @@ render_all (Lisp_Object ignore) | |||
| 335 | 335 | ||
| 336 | OpenClipboard (NULL); | 336 | OpenClipboard (NULL); |
| 337 | 337 | ||
| 338 | /* There is no usefull means to report errors here, there are none | 338 | /* There is no useful means to report errors here, there are none |
| 339 | expected anyway, and even if there were errors, they wouldn't do | 339 | expected anyway, and even if there were errors, they wouldn't do |
| 340 | any harm. So we just go ahead and do what has to be done without | 340 | any harm. So we just go ahead and do what has to be done without |
| 341 | bothering with error handling. */ | 341 | bothering with error handling. */ |
| @@ -750,7 +750,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, | |||
| 750 | else | 750 | else |
| 751 | { | 751 | { |
| 752 | /* Advertise all supported formats so that whatever the | 752 | /* Advertise all supported formats so that whatever the |
| 753 | requester chooses, only one encoding step needs to be | 753 | requestor chooses, only one encoding step needs to be |
| 754 | made. This is intentionally different from what we do in | 754 | made. This is intentionally different from what we do in |
| 755 | the handler for WM_RENDERALLFORMATS. */ | 755 | the handler for WM_RENDERALLFORMATS. */ |
| 756 | SetClipboardData (CF_UNICODETEXT, NULL); | 756 | SetClipboardData (CF_UNICODETEXT, NULL); |
| @@ -1138,4 +1138,3 @@ globals_of_w32select (void) | |||
| 1138 | 1138 | ||
| 1139 | clipboard_owner = create_owner (); | 1139 | clipboard_owner = create_owner (); |
| 1140 | } | 1140 | } |
| 1141 | |||
diff --git a/src/w32term.c b/src/w32term.c index e9fa16ba325..6df218326d1 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -2665,7 +2665,7 @@ x_scroll_run (struct window *w, struct run *run) | |||
| 2665 | } | 2665 | } |
| 2666 | else | 2666 | else |
| 2667 | { | 2667 | { |
| 2668 | /* Scolling down. Make sure we don't copy over the mode line. | 2668 | /* Scrolling down. Make sure we don't copy over the mode line. |
| 2669 | at the bottom. */ | 2669 | at the bottom. */ |
| 2670 | if (to_y + run->height > bottom_y) | 2670 | if (to_y + run->height > bottom_y) |
| 2671 | height = bottom_y - to_y; | 2671 | height = bottom_y - to_y; |
| @@ -4506,7 +4506,7 @@ w32_read_socket (struct terminal *terminal, int expected, | |||
| 4506 | } | 4506 | } |
| 4507 | 4507 | ||
| 4508 | /* If window has been obscured or exposed by another window | 4508 | /* If window has been obscured or exposed by another window |
| 4509 | being maximised or minimised/restored, then recheck | 4509 | being maximized or minimized/restored, then recheck |
| 4510 | visibility of all frames. Direct changes to our own | 4510 | visibility of all frames. Direct changes to our own |
| 4511 | windows get handled by WM_SIZE. */ | 4511 | windows get handled by WM_SIZE. */ |
| 4512 | #if 0 | 4512 | #if 0 |
| @@ -5576,7 +5576,7 @@ x_raise_frame (struct frame *f) | |||
| 5576 | input focus anyway (so the window with focus will never be | 5576 | input focus anyway (so the window with focus will never be |
| 5577 | completely obscured) - if not, then just moving the mouse over it | 5577 | completely obscured) - if not, then just moving the mouse over it |
| 5578 | is sufficient to give it focus. On Windows, the user must actually | 5578 | is sufficient to give it focus. On Windows, the user must actually |
| 5579 | click on the frame (preferrably the title bar so as not to move | 5579 | click on the frame (preferably the title bar so as not to move |
| 5580 | point), which is more awkward. Also, no other Windows program | 5580 | point), which is more awkward. Also, no other Windows program |
| 5581 | raises a window to the top but leaves another window (possibly now | 5581 | raises a window to the top but leaves another window (possibly now |
| 5582 | completely obscured) with input focus. | 5582 | completely obscured) with input focus. |
| @@ -5692,10 +5692,10 @@ x_make_frame_visible (struct frame *f) | |||
| 5692 | 5692 | ||
| 5693 | /* According to a report in emacs-devel 2008-06-03, SW_SHOWNORMAL | 5693 | /* According to a report in emacs-devel 2008-06-03, SW_SHOWNORMAL |
| 5694 | causes unexpected behavior when unminimizing frames that were | 5694 | causes unexpected behavior when unminimizing frames that were |
| 5695 | previously maximised. But only SW_SHOWNORMAL works properly for | 5695 | previously maximized. But only SW_SHOWNORMAL works properly for |
| 5696 | frames that were truely hidden (using make-frame-invisible), so | 5696 | frames that were truely hidden (using make-frame-invisible), so |
| 5697 | we need it to avoid Bug#5482. It seems that async_iconified | 5697 | we need it to avoid Bug#5482. It seems that async_iconified |
| 5698 | is only set for minimised windows that are still visible, so | 5698 | is only set for minimized windows that are still visible, so |
| 5699 | use that to determine the appropriate flag to pass ShowWindow. */ | 5699 | use that to determine the appropriate flag to pass ShowWindow. */ |
| 5700 | my_show_window (f, FRAME_W32_WINDOW (f), | 5700 | my_show_window (f, FRAME_W32_WINDOW (f), |
| 5701 | f->async_iconified ? SW_RESTORE : SW_SHOWNORMAL); | 5701 | f->async_iconified ? SW_RESTORE : SW_SHOWNORMAL); |
| @@ -6164,7 +6164,7 @@ w32_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 6164 | dpyinfo->has_palette = GetDeviceCaps (hdc, RASTERCAPS) & RC_PALETTE; | 6164 | dpyinfo->has_palette = GetDeviceCaps (hdc, RASTERCAPS) & RC_PALETTE; |
| 6165 | ReleaseDC (NULL, hdc); | 6165 | ReleaseDC (NULL, hdc); |
| 6166 | 6166 | ||
| 6167 | /* initialise palette with white and black */ | 6167 | /* initialize palette with white and black */ |
| 6168 | { | 6168 | { |
| 6169 | XColor color; | 6169 | XColor color; |
| 6170 | w32_defined_color (0, "white", &color, 1); | 6170 | w32_defined_color (0, "white", &color, 1); |
diff --git a/src/w32term.h b/src/w32term.h index 02392133837..f587ee11af9 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -209,7 +209,7 @@ extern int x_display_pixel_width (struct w32_display_info *); | |||
| 209 | the information that is specific to W32 windows. */ | 209 | the information that is specific to W32 windows. */ |
| 210 | 210 | ||
| 211 | /* Put some things in x_output for compatibility. | 211 | /* Put some things in x_output for compatibility. |
| 212 | NTEMACS_TODO: Move all common things here to eliminate unneccesary | 212 | NTEMACS_TODO: Move all common things here to eliminate unnecessary |
| 213 | diffs between X and w32 code. */ | 213 | diffs between X and w32 code. */ |
| 214 | struct x_output | 214 | struct x_output |
| 215 | { | 215 | { |
| @@ -229,7 +229,7 @@ enum | |||
| 229 | { | 229 | { |
| 230 | /* Values for focus_state, used as bit mask. | 230 | /* Values for focus_state, used as bit mask. |
| 231 | EXPLICIT means we received a FocusIn for the frame and know it has | 231 | EXPLICIT means we received a FocusIn for the frame and know it has |
| 232 | the focus. IMPLICIT means we recevied an EnterNotify and the frame | 232 | the focus. IMPLICIT means we received an EnterNotify and the frame |
| 233 | may have the focus if no window manager is running. | 233 | may have the focus if no window manager is running. |
| 234 | FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ | 234 | FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ |
| 235 | FOCUS_NONE = 0, | 235 | FOCUS_NONE = 0, |
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 36197b3b28a..63da3b9e962 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -469,7 +469,7 @@ uniscribe_encode_char (struct font *font, int c) | |||
| 469 | 469 | ||
| 470 | /* Non BMP characters must be handled by the uniscribe shaping | 470 | /* Non BMP characters must be handled by the uniscribe shaping |
| 471 | engine as GDI functions (except blindly displaying lines of | 471 | engine as GDI functions (except blindly displaying lines of |
| 472 | unicode text) and the promising looking ScriptGetCMap do not | 472 | Unicode text) and the promising looking ScriptGetCMap do not |
| 473 | convert surrogate pairs to glyph indexes correctly. */ | 473 | convert surrogate pairs to glyph indexes correctly. */ |
| 474 | { | 474 | { |
| 475 | items = (SCRIPT_ITEM *) alloca (sizeof (SCRIPT_ITEM) * 2 + 1); | 475 | items = (SCRIPT_ITEM *) alloca (sizeof (SCRIPT_ITEM) * 2 + 1); |
| @@ -581,7 +581,7 @@ add_opentype_font_name_to_list (ENUMLOGFONTEX *logical_font, | |||
| 581 | && font_type != TRUETYPE_FONTTYPE) | 581 | && font_type != TRUETYPE_FONTTYPE) |
| 582 | return 1; | 582 | return 1; |
| 583 | 583 | ||
| 584 | /* Skip fonts that have no unicode coverage. */ | 584 | /* Skip fonts that have no Unicode coverage. */ |
| 585 | if (!physical_font->ntmFontSig.fsUsb[3] | 585 | if (!physical_font->ntmFontSig.fsUsb[3] |
| 586 | && !physical_font->ntmFontSig.fsUsb[2] | 586 | && !physical_font->ntmFontSig.fsUsb[2] |
| 587 | && !physical_font->ntmFontSig.fsUsb[1] | 587 | && !physical_font->ntmFontSig.fsUsb[1] |
diff --git a/src/w32xfns.c b/src/w32xfns.c index fbbf11bd65c..fc2d5904d67 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c | |||
| @@ -188,7 +188,7 @@ get_next_msg (W32Msg * lpmsg, BOOL bWait) | |||
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | nQueue--; | 190 | nQueue--; |
| 191 | /* Consolidate WM_PAINT messages to optimise redrawing. */ | 191 | /* Consolidate WM_PAINT messages to optimize redrawing. */ |
| 192 | if (lpmsg->msg.message == WM_PAINT && nQueue) | 192 | if (lpmsg->msg.message == WM_PAINT && nQueue) |
| 193 | { | 193 | { |
| 194 | int_msg * lpCur = lpHead; | 194 | int_msg * lpCur = lpHead; |
| @@ -441,4 +441,3 @@ void | |||
| 441 | x_sync (void *f) | 441 | x_sync (void *f) |
| 442 | { | 442 | { |
| 443 | } | 443 | } |
| 444 | |||
diff --git a/src/widget.c b/src/widget.c index 0582718948d..96bfd4787e9 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -476,6 +476,9 @@ update_wm_hints (EmacsFrame ew) | |||
| 476 | int base_height; | 476 | int base_height; |
| 477 | int min_rows = 0, min_cols = 0; | 477 | int min_rows = 0, min_cols = 0; |
| 478 | 478 | ||
| 479 | /* This happens when the frame is just created. */ | ||
| 480 | if (! wmshell) return; | ||
| 481 | |||
| 479 | #if 0 | 482 | #if 0 |
| 480 | check_frame_size (ew->emacs_frame.frame, &min_rows, &min_cols); | 483 | check_frame_size (ew->emacs_frame.frame, &min_rows, &min_cols); |
| 481 | #endif | 484 | #endif |
| @@ -506,6 +509,14 @@ update_wm_hints (EmacsFrame ew) | |||
| 506 | NULL); | 509 | NULL); |
| 507 | } | 510 | } |
| 508 | 511 | ||
| 512 | void | ||
| 513 | widget_update_wm_size_hints (Widget widget) | ||
| 514 | { | ||
| 515 | EmacsFrame ew = (EmacsFrame)widget; | ||
| 516 | update_wm_hints (ew); | ||
| 517 | } | ||
| 518 | |||
| 519 | |||
| 509 | #if 0 | 520 | #if 0 |
| 510 | 521 | ||
| 511 | static void | 522 | static void |
| @@ -808,7 +819,7 @@ EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeome | |||
| 808 | return result->request_mode ? XtGeometryAlmost : XtGeometryYes; | 819 | return result->request_mode ? XtGeometryAlmost : XtGeometryYes; |
| 809 | } | 820 | } |
| 810 | 821 | ||
| 811 | /* Special entrypoints */ | 822 | /* Special entry points */ |
| 812 | void | 823 | void |
| 813 | EmacsFrameSetCharSize (Widget widget, int columns, int rows) | 824 | EmacsFrameSetCharSize (Widget widget, int columns, int rows) |
| 814 | { | 825 | { |
diff --git a/src/widget.h b/src/widget.h index f64f188e158..11041d54ad0 100644 --- a/src/widget.h +++ b/src/widget.h | |||
| @@ -92,9 +92,9 @@ extern WidgetClass emacsFrameClass; | |||
| 92 | 92 | ||
| 93 | extern struct _DisplayContext* display_context; | 93 | extern struct _DisplayContext* display_context; |
| 94 | 94 | ||
| 95 | /* Special entrypoints */ | 95 | /* Special entry points */ |
| 96 | void EmacsFrameSetCharSize (Widget, int, int); | 96 | void EmacsFrameSetCharSize (Widget, int, int); |
| 97 | void widget_store_internal_border (Widget widget); | 97 | void widget_store_internal_border (Widget widget); |
| 98 | void widget_update_wm_size_hints (Widget widget); | ||
| 98 | 99 | ||
| 99 | #endif /* _EmacsFrame_h */ | 100 | #endif /* _EmacsFrame_h */ |
| 100 | |||
diff --git a/src/window.c b/src/window.c index 60d17c74de3..3b9705444f9 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -465,10 +465,8 @@ Return nil if WINDOW has no previous sibling. */) | |||
| 465 | return decode_any_window (window)->prev; | 465 | return decode_any_window (window)->prev; |
| 466 | } | 466 | } |
| 467 | 467 | ||
| 468 | DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 0, 1, 0, | 468 | DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 1, 1, 0, |
| 469 | doc: /* Return combination limit of window WINDOW. | 469 | doc: /* Return combination limit of window WINDOW. |
| 470 | If WINDOW is omitted or nil, it defaults to the selected window. | ||
| 471 | |||
| 472 | If the return value is nil, child windows of WINDOW can be recombined with | 470 | If the return value is nil, child windows of WINDOW can be recombined with |
| 473 | WINDOW's siblings. A return value of t means that child windows of | 471 | WINDOW's siblings. A return value of t means that child windows of |
| 474 | WINDOW are never \(re-)combined with WINDOW's siblings. */) | 472 | WINDOW are never \(re-)combined with WINDOW's siblings. */) |
| @@ -478,18 +476,16 @@ WINDOW are never \(re-)combined with WINDOW's siblings. */) | |||
| 478 | } | 476 | } |
| 479 | 477 | ||
| 480 | DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0, | 478 | DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0, |
| 481 | doc: /* Set combination limit of window WINDOW to STATUS; return STATUS. | 479 | doc: /* Set combination limit of window WINDOW to LIMIT; return LIMIT. |
| 482 | If WINDOW is omitted or nil, it defaults to the selected window. | 480 | If LIMIT is nil, child windows of WINDOW can be recombined with |
| 483 | 481 | WINDOW's siblings. LIMIT t means that child windows of WINDOW are | |
| 484 | If STATUS is nil, child windows of WINDOW can be recombined with | ||
| 485 | WINDOW's siblings. STATUS t means that child windows of WINDOW are | ||
| 486 | never \(re-)combined with WINDOW's siblings. Other values are reserved | 482 | never \(re-)combined with WINDOW's siblings. Other values are reserved |
| 487 | for future use. */) | 483 | for future use. */) |
| 488 | (Lisp_Object window, Lisp_Object status) | 484 | (Lisp_Object window, Lisp_Object limit) |
| 489 | { | 485 | { |
| 490 | register struct window *w = decode_any_window (window); | 486 | register struct window *w = decode_any_window (window); |
| 491 | 487 | ||
| 492 | w->combination_limit = status; | 488 | w->combination_limit = limit; |
| 493 | 489 | ||
| 494 | return w->combination_limit; | 490 | return w->combination_limit; |
| 495 | } | 491 | } |
| @@ -1056,6 +1052,7 @@ window_relative_x_coord (struct window *w, enum window_part part, int x) | |||
| 1056 | DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p, | 1052 | DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p, |
| 1057 | Scoordinates_in_window_p, 2, 2, 0, | 1053 | Scoordinates_in_window_p, 2, 2, 0, |
| 1058 | doc: /* Return non-nil if COORDINATES are in WINDOW. | 1054 | doc: /* Return non-nil if COORDINATES are in WINDOW. |
| 1055 | WINDOW must be a live window. | ||
| 1059 | COORDINATES is a cons of the form (X . Y), X and Y being distances | 1056 | COORDINATES is a cons of the form (X . Y), X and Y being distances |
| 1060 | measured in characters from the upper-left corner of the frame. | 1057 | measured in characters from the upper-left corner of the frame. |
| 1061 | \(0 . 0) denotes the character in the upper left corner of the | 1058 | \(0 . 0) denotes the character in the upper left corner of the |
| @@ -1077,7 +1074,7 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\ | |||
| 1077 | int x, y; | 1074 | int x, y; |
| 1078 | Lisp_Object lx, ly; | 1075 | Lisp_Object lx, ly; |
| 1079 | 1076 | ||
| 1080 | CHECK_WINDOW (window); | 1077 | CHECK_LIVE_WINDOW (window); |
| 1081 | w = XWINDOW (window); | 1078 | w = XWINDOW (window); |
| 1082 | f = XFRAME (w->frame); | 1079 | f = XFRAME (w->frame); |
| 1083 | CHECK_CONS (coordinates); | 1080 | CHECK_CONS (coordinates); |
| @@ -2186,7 +2183,7 @@ next_window (Lisp_Object window, Lisp_Object minibuf, Lisp_Object all_frames, in | |||
| 2186 | 2183 | ||
| 2187 | 2184 | ||
| 2188 | DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, | 2185 | DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, |
| 2189 | doc: /* Return window following WINDOW in cyclic ordering of windows. | 2186 | doc: /* Return live window after WINDOW in the cyclic ordering of windows. |
| 2190 | WINDOW must be a live window and defaults to the selected one. The | 2187 | WINDOW must be a live window and defaults to the selected one. The |
| 2191 | optional arguments MINIBUF and ALL-FRAMES specify the set of windows to | 2188 | optional arguments MINIBUF and ALL-FRAMES specify the set of windows to |
| 2192 | consider. | 2189 | consider. |
| @@ -2225,7 +2222,7 @@ windows, eventually ending up back at the window you started with. | |||
| 2225 | 2222 | ||
| 2226 | 2223 | ||
| 2227 | DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0, | 2224 | DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0, |
| 2228 | doc: /* Return window preceding WINDOW in cyclic ordering of windows. | 2225 | doc: /* Return live window before WINDOW in the cyclic ordering of windows. |
| 2229 | WINDOW must be a live window and defaults to the selected one. The | 2226 | WINDOW must be a live window and defaults to the selected one. The |
| 2230 | optional arguments MINIBUF and ALL-FRAMES specify the set of windows to | 2227 | optional arguments MINIBUF and ALL-FRAMES specify the set of windows to |
| 2231 | consider. | 2228 | consider. |
| @@ -3092,7 +3089,7 @@ This function runs `window-scroll-functions' before running | |||
| 3092 | error ("Window is dedicated to `%s'", SDATA (BVAR (XBUFFER (tem), name))); | 3089 | error ("Window is dedicated to `%s'", SDATA (BVAR (XBUFFER (tem), name))); |
| 3093 | else | 3090 | else |
| 3094 | /* WINDOW is weakly dedicated to its buffer, reset | 3091 | /* WINDOW is weakly dedicated to its buffer, reset |
| 3095 | dedicatedness. */ | 3092 | dedication. */ |
| 3096 | w->dedicated = Qnil; | 3093 | w->dedicated = Qnil; |
| 3097 | 3094 | ||
| 3098 | call1 (Qrecord_window_buffer, window); | 3095 | call1 (Qrecord_window_buffer, window); |
| @@ -5772,20 +5769,37 @@ get_leaf_windows (struct window *w, struct window **flat, int i) | |||
| 5772 | 5769 | ||
| 5773 | 5770 | ||
| 5774 | /* Return a pointer to the glyph W's physical cursor is on. Value is | 5771 | /* Return a pointer to the glyph W's physical cursor is on. Value is |
| 5775 | null if W's current matrix is invalid, so that no meaningfull glyph | 5772 | null if W's current matrix is invalid, so that no meaningful glyph |
| 5776 | can be returned. */ | 5773 | can be returned. */ |
| 5777 | struct glyph * | 5774 | struct glyph * |
| 5778 | get_phys_cursor_glyph (struct window *w) | 5775 | get_phys_cursor_glyph (struct window *w) |
| 5779 | { | 5776 | { |
| 5780 | struct glyph_row *row; | 5777 | struct glyph_row *row; |
| 5781 | struct glyph *glyph; | 5778 | struct glyph *glyph; |
| 5779 | int hpos = w->phys_cursor.hpos; | ||
| 5780 | |||
| 5781 | if (!(w->phys_cursor.vpos >= 0 | ||
| 5782 | && w->phys_cursor.vpos < w->current_matrix->nrows)) | ||
| 5783 | return NULL; | ||
| 5784 | |||
| 5785 | row = MATRIX_ROW (w->current_matrix, w->phys_cursor.vpos); | ||
| 5786 | if (!row->enabled_p) | ||
| 5787 | return NULL; | ||
| 5788 | |||
| 5789 | if (XINT (w->hscroll)) | ||
| 5790 | { | ||
| 5791 | /* When the window is hscrolled, cursor hpos can legitimately be | ||
| 5792 | out of bounds, but we draw the cursor at the corresponding | ||
| 5793 | window margin in that case. */ | ||
| 5794 | if (!row->reversed_p && hpos < 0) | ||
| 5795 | hpos = 0; | ||
| 5796 | if (row->reversed_p && hpos >= row->used[TEXT_AREA]) | ||
| 5797 | hpos = row->used[TEXT_AREA] - 1; | ||
| 5798 | } | ||
| 5782 | 5799 | ||
| 5783 | if (w->phys_cursor.vpos >= 0 | 5800 | if (row->used[TEXT_AREA] > hpos |
| 5784 | && w->phys_cursor.vpos < w->current_matrix->nrows | 5801 | && 0 <= hpos) |
| 5785 | && (row = MATRIX_ROW (w->current_matrix, w->phys_cursor.vpos), | 5802 | glyph = row->glyphs[TEXT_AREA] + hpos; |
| 5786 | row->enabled_p) | ||
| 5787 | && row->used[TEXT_AREA] > w->phys_cursor.hpos) | ||
| 5788 | glyph = row->glyphs[TEXT_AREA] + w->phys_cursor.hpos; | ||
| 5789 | else | 5803 | else |
| 5790 | glyph = NULL; | 5804 | glyph = NULL; |
| 5791 | 5805 | ||
| @@ -6287,7 +6301,7 @@ freeze_window_starts (struct frame *f, int freeze_p) | |||
| 6287 | ignore_positions non-zero means ignore non-matching scroll positions | 6301 | ignore_positions non-zero means ignore non-matching scroll positions |
| 6288 | and the like. | 6302 | and the like. |
| 6289 | 6303 | ||
| 6290 | This ignores a couple of things like the dedicatedness status of | 6304 | This ignores a couple of things like the dedication status of |
| 6291 | window, combination_limit and the like. This might have to be | 6305 | window, combination_limit and the like. This might have to be |
| 6292 | fixed. */ | 6306 | fixed. */ |
| 6293 | 6307 | ||
| @@ -6521,10 +6535,10 @@ sibling. | |||
| 6521 | 6535 | ||
| 6522 | Other values are reserved for future use. | 6536 | Other values are reserved for future use. |
| 6523 | 6537 | ||
| 6524 | The value of this variable is also assigned to the combination-limit | 6538 | The value of this variable is also assigned to the combination limit of |
| 6525 | status of the new parent window. The combination-limit status of a | 6539 | the new parent window. The combination limit of a window can be |
| 6526 | window can be retrieved via the function `window-combination-limit' and | 6540 | retrieved via the function `window-combination-limit' and altered by the |
| 6527 | altered by the function `set-window-combination-limit'. */); | 6541 | function `set-window-combination-limit'. */); |
| 6528 | Vwindow_combination_limit = Qnil; | 6542 | Vwindow_combination_limit = Qnil; |
| 6529 | 6543 | ||
| 6530 | defsubr (&Sselected_window); | 6544 | defsubr (&Sselected_window); |
diff --git a/src/window.h b/src/window.h index de0f7307a51..b4e268b1a34 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -268,7 +268,7 @@ struct window | |||
| 268 | /* List of buffers re-shown in this window. */ | 268 | /* List of buffers re-shown in this window. */ |
| 269 | Lisp_Object next_buffers; | 269 | Lisp_Object next_buffers; |
| 270 | 270 | ||
| 271 | /* An alist with parameteres. */ | 271 | /* An alist with parameters. */ |
| 272 | Lisp_Object window_parameters; | 272 | Lisp_Object window_parameters; |
| 273 | 273 | ||
| 274 | /* No Lisp data may follow below this point without changing | 274 | /* No Lisp data may follow below this point without changing |
| @@ -877,7 +877,7 @@ extern int buffer_shared; | |||
| 877 | extern void check_frame_size (struct frame *frame, int *rows, int *cols); | 877 | extern void check_frame_size (struct frame *frame, int *rows, int *cols); |
| 878 | 878 | ||
| 879 | /* Return a pointer to the glyph W's physical cursor is on. Value is | 879 | /* Return a pointer to the glyph W's physical cursor is on. Value is |
| 880 | null if W's current matrix is invalid, so that no meaningfull glyph | 880 | null if W's current matrix is invalid, so that no meaningful glyph |
| 881 | can be returned. */ | 881 | can be returned. */ |
| 882 | 882 | ||
| 883 | struct glyph *get_phys_cursor_glyph (struct window *w); | 883 | struct glyph *get_phys_cursor_glyph (struct window *w); |
diff --git a/src/xdisp.c b/src/xdisp.c index 3883a753940..4eef9e05231 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1445,7 +1445,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, | |||
| 1445 | position is CHARPOS. For the contingency that we | 1445 | position is CHARPOS. For the contingency that we |
| 1446 | didn't, and stopped at the first newline from the | 1446 | didn't, and stopped at the first newline from the |
| 1447 | display string, move back over the glyphs | 1447 | display string, move back over the glyphs |
| 1448 | prfoduced from the string, until we find the | 1448 | produced from the string, until we find the |
| 1449 | rightmost glyph not from the string. */ | 1449 | rightmost glyph not from the string. */ |
| 1450 | if (IT_CHARPOS (it3) != charpos && EQ (it3.object, string)) | 1450 | if (IT_CHARPOS (it3) != charpos && EQ (it3.object, string)) |
| 1451 | { | 1451 | { |
| @@ -1915,7 +1915,7 @@ get_glyph_string_clip_rects (struct glyph_string *s, NativeRectangle *rects, int | |||
| 1915 | environments with anti-aliased text: if the same text is | 1915 | environments with anti-aliased text: if the same text is |
| 1916 | drawn onto the same place multiple times, it gets thicker. | 1916 | drawn onto the same place multiple times, it gets thicker. |
| 1917 | If the overlap we are processing is for the erased cursor, we | 1917 | If the overlap we are processing is for the erased cursor, we |
| 1918 | take the intersection with the rectagle of the cursor. */ | 1918 | take the intersection with the rectangle of the cursor. */ |
| 1919 | if (s->for_overlaps & OVERLAPS_ERASED_CURSOR) | 1919 | if (s->for_overlaps & OVERLAPS_ERASED_CURSOR) |
| 1920 | { | 1920 | { |
| 1921 | XRectangle rc, r_save = r; | 1921 | XRectangle rc, r_save = r; |
| @@ -2849,8 +2849,14 @@ start_display (struct it *it, struct window *w, struct text_pos pos) | |||
| 2849 | || (new_x == it->last_visible_x | 2849 | || (new_x == it->last_visible_x |
| 2850 | && FRAME_WINDOW_P (it->f)))) | 2850 | && FRAME_WINDOW_P (it->f)))) |
| 2851 | { | 2851 | { |
| 2852 | if (it->current.dpvec_index >= 0 | 2852 | if ((it->current.dpvec_index >= 0 |
| 2853 | || it->current.overlay_string_index >= 0) | 2853 | || it->current.overlay_string_index >= 0) |
| 2854 | /* If we are on a newline from a display vector or | ||
| 2855 | overlay string, then we are already at the end of | ||
| 2856 | a screen line; no need to go to the next line in | ||
| 2857 | that case, as this line is not really continued. | ||
| 2858 | (If we do go to the next line, C-e will not DTRT.) */ | ||
| 2859 | && it->c != '\n') | ||
| 2854 | { | 2860 | { |
| 2855 | set_iterator_to_next (it, 1); | 2861 | set_iterator_to_next (it, 1); |
| 2856 | move_it_in_display_line_to (it, -1, -1, 0); | 2862 | move_it_in_display_line_to (it, -1, -1, 0); |
| @@ -3169,13 +3175,11 @@ compute_stop_pos (struct it *it) | |||
| 3169 | Lisp_Object object, limit, position; | 3175 | Lisp_Object object, limit, position; |
| 3170 | ptrdiff_t charpos, bytepos; | 3176 | ptrdiff_t charpos, bytepos; |
| 3171 | 3177 | ||
| 3172 | /* If nowhere else, stop at the end. */ | ||
| 3173 | it->stop_charpos = it->end_charpos; | ||
| 3174 | |||
| 3175 | if (STRINGP (it->string)) | 3178 | if (STRINGP (it->string)) |
| 3176 | { | 3179 | { |
| 3177 | /* Strings are usually short, so don't limit the search for | 3180 | /* Strings are usually short, so don't limit the search for |
| 3178 | properties. */ | 3181 | properties. */ |
| 3182 | it->stop_charpos = it->end_charpos; | ||
| 3179 | object = it->string; | 3183 | object = it->string; |
| 3180 | limit = Qnil; | 3184 | limit = Qnil; |
| 3181 | charpos = IT_STRING_CHARPOS (*it); | 3185 | charpos = IT_STRING_CHARPOS (*it); |
| @@ -3185,6 +3189,12 @@ compute_stop_pos (struct it *it) | |||
| 3185 | { | 3189 | { |
| 3186 | ptrdiff_t pos; | 3190 | ptrdiff_t pos; |
| 3187 | 3191 | ||
| 3192 | /* If end_charpos is out of range for some reason, such as a | ||
| 3193 | misbehaving display function, rationalize it (Bug#5984). */ | ||
| 3194 | if (it->end_charpos > ZV) | ||
| 3195 | it->end_charpos = ZV; | ||
| 3196 | it->stop_charpos = it->end_charpos; | ||
| 3197 | |||
| 3188 | /* If next overlay change is in front of the current stop pos | 3198 | /* If next overlay change is in front of the current stop pos |
| 3189 | (which is IT->end_charpos), stop there. Note: value of | 3199 | (which is IT->end_charpos), stop there. Note: value of |
| 3190 | next_overlay_change is point-max if no overlay change | 3200 | next_overlay_change is point-max if no overlay change |
| @@ -4086,26 +4096,37 @@ handle_invisible_prop (struct it *it) | |||
| 4086 | if (it->bidi_p && newpos < ZV) | 4096 | if (it->bidi_p && newpos < ZV) |
| 4087 | { | 4097 | { |
| 4088 | ptrdiff_t bpos = CHAR_TO_BYTE (newpos); | 4098 | ptrdiff_t bpos = CHAR_TO_BYTE (newpos); |
| 4089 | 4099 | int on_newline = FETCH_BYTE (bpos) == '\n'; | |
| 4090 | if (FETCH_BYTE (bpos) == '\n' | 4100 | int after_newline = |
| 4091 | || (newpos > BEGV && FETCH_BYTE (bpos - 1) == '\n')) | 4101 | newpos <= BEGV || FETCH_BYTE (bpos - 1) == '\n'; |
| 4102 | |||
| 4103 | /* If the invisible text ends on a newline or on a | ||
| 4104 | character after a newline, we can avoid the costly, | ||
| 4105 | character by character, bidi iteration to NEWPOS, and | ||
| 4106 | instead simply reseat the iterator there. That's | ||
| 4107 | because all bidi reordering information is tossed at | ||
| 4108 | the newline. This is a big win for modes that hide | ||
| 4109 | complete lines, like Outline, Org, etc. */ | ||
| 4110 | if (on_newline || after_newline) | ||
| 4092 | { | 4111 | { |
| 4093 | /* If the invisible text ends on a newline or the | ||
| 4094 | character after a newline, we can avoid the | ||
| 4095 | costly, character by character, bidi iteration to | ||
| 4096 | newpos, and instead simply reseat the iterator | ||
| 4097 | there. That's because all bidi reordering | ||
| 4098 | information is tossed at the newline. This is a | ||
| 4099 | big win for modes that hide complete lines, like | ||
| 4100 | Outline, Org, etc. (Implementation note: the | ||
| 4101 | call to reseat_1 is necessary, because it signals | ||
| 4102 | to the bidi iterator that it needs to reinit its | ||
| 4103 | internal information when the next element for | ||
| 4104 | display is requested. */ | ||
| 4105 | struct text_pos tpos; | 4112 | struct text_pos tpos; |
| 4113 | bidi_dir_t pdir = it->bidi_it.paragraph_dir; | ||
| 4106 | 4114 | ||
| 4107 | SET_TEXT_POS (tpos, newpos, bpos); | 4115 | SET_TEXT_POS (tpos, newpos, bpos); |
| 4108 | reseat_1 (it, tpos, 0); | 4116 | reseat_1 (it, tpos, 0); |
| 4117 | /* If we reseat on a newline, we need to prep the | ||
| 4118 | bidi iterator for advancing to the next character | ||
| 4119 | after the newline, keeping the current paragraph | ||
| 4120 | direction (so that PRODUCE_GLYPHS does TRT wrt | ||
| 4121 | prepending/appending glyphs to a glyph row). */ | ||
| 4122 | if (on_newline) | ||
| 4123 | { | ||
| 4124 | it->bidi_it.first_elt = 0; | ||
| 4125 | it->bidi_it.paragraph_dir = pdir; | ||
| 4126 | it->bidi_it.ch = '\n'; | ||
| 4127 | it->bidi_it.nchars = 1; | ||
| 4128 | it->bidi_it.ch_len = 1; | ||
| 4129 | } | ||
| 4109 | } | 4130 | } |
| 4110 | else /* Must use the slow method. */ | 4131 | else /* Must use the slow method. */ |
| 4111 | { | 4132 | { |
| @@ -4114,11 +4135,11 @@ handle_invisible_prop (struct it *it) | |||
| 4114 | non-base embedding level. Therefore, we need to | 4135 | non-base embedding level. Therefore, we need to |
| 4115 | skip invisible text using the bidi iterator, | 4136 | skip invisible text using the bidi iterator, |
| 4116 | starting at IT's current position, until we find | 4137 | starting at IT's current position, until we find |
| 4117 | ourselves outside the invisible text. Skipping | 4138 | ourselves outside of the invisible text. |
| 4118 | invisible text _after_ bidi iteration avoids | 4139 | Skipping invisible text _after_ bidi iteration |
| 4119 | affecting the visual order of the displayed text | 4140 | avoids affecting the visual order of the |
| 4120 | when invisible properties are added or | 4141 | displayed text when invisible properties are |
| 4121 | removed. */ | 4142 | added or removed. */ |
| 4122 | if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV) | 4143 | if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV) |
| 4123 | { | 4144 | { |
| 4124 | /* If we were `reseat'ed to a new paragraph, | 4145 | /* If we were `reseat'ed to a new paragraph, |
| @@ -10220,7 +10241,7 @@ current_message_1 (ptrdiff_t a1, Lisp_Object a2, ptrdiff_t a3, ptrdiff_t a4) | |||
| 10220 | } | 10241 | } |
| 10221 | 10242 | ||
| 10222 | 10243 | ||
| 10223 | /* Push the current message on Vmessage_stack for later restauration | 10244 | /* Push the current message on Vmessage_stack for later restoration |
| 10224 | by restore_message. Value is non-zero if the current message isn't | 10245 | by restore_message. Value is non-zero if the current message isn't |
| 10225 | empty. This is a relatively infrequent operation, so it's not | 10246 | empty. This is a relatively infrequent operation, so it's not |
| 10226 | worth optimizing. */ | 10247 | worth optimizing. */ |
| @@ -14116,7 +14137,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14116 | || (STRINGP (g1->object) | 14137 | || (STRINGP (g1->object) |
| 14117 | && (!NILP (Fget_char_property (make_number (g1->charpos), | 14138 | && (!NILP (Fget_char_property (make_number (g1->charpos), |
| 14118 | Qcursor, g1->object)) | 14139 | Qcursor, g1->object)) |
| 14119 | /* pevious candidate is from the same display | 14140 | /* previous candidate is from the same display |
| 14120 | string as this one, and the display string | 14141 | string as this one, and the display string |
| 14121 | came from a text property */ | 14142 | came from a text property */ |
| 14122 | || (EQ (g1->object, glyph->object) | 14143 | || (EQ (g1->object, glyph->object) |
| @@ -14346,7 +14367,7 @@ try_scrolling (Lisp_Object window, int just_this_one_p, | |||
| 14346 | { | 14367 | { |
| 14347 | int scroll_margin_y; | 14368 | int scroll_margin_y; |
| 14348 | 14369 | ||
| 14349 | /* Compute the pixel ypos of the scroll margin, then move it to | 14370 | /* Compute the pixel ypos of the scroll margin, then move IT to |
| 14350 | either that ypos or PT, whichever comes first. */ | 14371 | either that ypos or PT, whichever comes first. */ |
| 14351 | start_display (&it, w, startp); | 14372 | start_display (&it, w, startp); |
| 14352 | scroll_margin_y = it.last_visible_y - this_scroll_margin | 14373 | scroll_margin_y = it.last_visible_y - this_scroll_margin |
| @@ -14376,7 +14397,8 @@ try_scrolling (Lisp_Object window, int just_this_one_p, | |||
| 14376 | if (dy > scroll_max) | 14397 | if (dy > scroll_max) |
| 14377 | return SCROLLING_FAILED; | 14398 | return SCROLLING_FAILED; |
| 14378 | 14399 | ||
| 14379 | scroll_down_p = 1; | 14400 | if (dy > 0) |
| 14401 | scroll_down_p = 1; | ||
| 14380 | } | 14402 | } |
| 14381 | } | 14403 | } |
| 14382 | 14404 | ||
| @@ -15038,7 +15060,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15038 | int current_matrix_up_to_date_p = 0; | 15060 | int current_matrix_up_to_date_p = 0; |
| 15039 | int used_current_matrix_p = 0; | 15061 | int used_current_matrix_p = 0; |
| 15040 | /* This is less strict than current_matrix_up_to_date_p. | 15062 | /* This is less strict than current_matrix_up_to_date_p. |
| 15041 | It indictes that the buffer contents and narrowing are unchanged. */ | 15063 | It indicates that the buffer contents and narrowing are unchanged. */ |
| 15042 | int buffer_unchanged_p = 0; | 15064 | int buffer_unchanged_p = 0; |
| 15043 | int temp_scroll_step = 0; | 15065 | int temp_scroll_step = 0; |
| 15044 | ptrdiff_t count = SPECPDL_INDEX (); | 15066 | ptrdiff_t count = SPECPDL_INDEX (); |
| @@ -15560,8 +15582,8 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15560 | ? min (scroll_margin, WINDOW_TOTAL_LINES (w) / 4) | 15582 | ? min (scroll_margin, WINDOW_TOTAL_LINES (w) / 4) |
| 15561 | : 0; | 15583 | : 0; |
| 15562 | ptrdiff_t margin_pos = CHARPOS (startp); | 15584 | ptrdiff_t margin_pos = CHARPOS (startp); |
| 15563 | int scrolling_up; | ||
| 15564 | Lisp_Object aggressive; | 15585 | Lisp_Object aggressive; |
| 15586 | int scrolling_up; | ||
| 15565 | 15587 | ||
| 15566 | /* If there is a scroll margin at the top of the window, find | 15588 | /* If there is a scroll margin at the top of the window, find |
| 15567 | its character position. */ | 15589 | its character position. */ |
| @@ -15603,7 +15625,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15603 | pt_offset = float_amount * WINDOW_BOX_TEXT_HEIGHT (w); | 15625 | pt_offset = float_amount * WINDOW_BOX_TEXT_HEIGHT (w); |
| 15604 | if (pt_offset == 0 && float_amount > 0) | 15626 | if (pt_offset == 0 && float_amount > 0) |
| 15605 | pt_offset = 1; | 15627 | pt_offset = 1; |
| 15606 | if (pt_offset) | 15628 | if (pt_offset && margin > 0) |
| 15607 | margin -= 1; | 15629 | margin -= 1; |
| 15608 | } | 15630 | } |
| 15609 | /* Compute how much to move the window start backward from | 15631 | /* Compute how much to move the window start backward from |
| @@ -15723,6 +15745,25 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15723 | goto recenter; | 15745 | goto recenter; |
| 15724 | } | 15746 | } |
| 15725 | 15747 | ||
| 15748 | /* Users who set scroll-conservatively to a large number want | ||
| 15749 | point just above/below the scroll margin. If we ended up | ||
| 15750 | with point's row partially visible, move the window start to | ||
| 15751 | make that row fully visible and out of the margin. */ | ||
| 15752 | if (scroll_conservatively > SCROLL_LIMIT) | ||
| 15753 | { | ||
| 15754 | int margin = | ||
| 15755 | scroll_margin > 0 | ||
| 15756 | ? min (scroll_margin, WINDOW_TOTAL_LINES (w) / 4) | ||
| 15757 | : 0; | ||
| 15758 | int move_down = w->cursor.vpos >= WINDOW_TOTAL_LINES (w) / 2; | ||
| 15759 | |||
| 15760 | move_it_by_lines (&it, move_down ? margin + 1 : -(margin + 1)); | ||
| 15761 | clear_glyph_matrix (w->desired_matrix); | ||
| 15762 | if (1 == try_window (window, it.current.pos, | ||
| 15763 | TRY_WINDOW_CHECK_MARGINS)) | ||
| 15764 | goto done; | ||
| 15765 | } | ||
| 15766 | |||
| 15726 | /* If centering point failed to make the whole line visible, | 15767 | /* If centering point failed to make the whole line visible, |
| 15727 | put point at the top instead. That has to make the whole line | 15768 | put point at the top instead. That has to make the whole line |
| 15728 | visible, if it can be done. */ | 15769 | visible, if it can be done. */ |
| @@ -17027,7 +17068,7 @@ try_window_id (struct window *w) | |||
| 17027 | last_unchanged_at_beg_row = find_last_unchanged_at_beg_row (w); | 17068 | last_unchanged_at_beg_row = find_last_unchanged_at_beg_row (w); |
| 17028 | if (last_unchanged_at_beg_row) | 17069 | if (last_unchanged_at_beg_row) |
| 17029 | { | 17070 | { |
| 17030 | /* Avoid starting to display in the moddle of a character, a TAB | 17071 | /* Avoid starting to display in the middle of a character, a TAB |
| 17031 | for instance. This is easier than to set up the iterator | 17072 | for instance. This is easier than to set up the iterator |
| 17032 | exactly, and it's not a frequent case, so the additional | 17073 | exactly, and it's not a frequent case, so the additional |
| 17033 | effort wouldn't really pay off. */ | 17074 | effort wouldn't really pay off. */ |
| @@ -17957,9 +17998,6 @@ insert_left_trunc_glyphs (struct it *it) | |||
| 17957 | } | 17998 | } |
| 17958 | 17999 | ||
| 17959 | /* Compute the hash code for ROW. */ | 18000 | /* Compute the hash code for ROW. */ |
| 17960 | #if !XASSERTS | ||
| 17961 | static | ||
| 17962 | #endif | ||
| 17963 | unsigned | 18001 | unsigned |
| 17964 | row_hash (struct glyph_row *row) | 18002 | row_hash (struct glyph_row *row) |
| 17965 | { | 18003 | { |
| @@ -18856,7 +18894,8 @@ display_line (struct it *it) | |||
| 18856 | #define RECORD_MAX_MIN_POS(IT) \ | 18894 | #define RECORD_MAX_MIN_POS(IT) \ |
| 18857 | do \ | 18895 | do \ |
| 18858 | { \ | 18896 | { \ |
| 18859 | int composition_p = (IT)->what == IT_COMPOSITION; \ | 18897 | int composition_p = !STRINGP ((IT)->string) \ |
| 18898 | && ((IT)->what == IT_COMPOSITION); \ | ||
| 18860 | ptrdiff_t current_pos = \ | 18899 | ptrdiff_t current_pos = \ |
| 18861 | composition_p ? (IT)->cmp_it.charpos \ | 18900 | composition_p ? (IT)->cmp_it.charpos \ |
| 18862 | : IT_CHARPOS (*(IT)); \ | 18901 | : IT_CHARPOS (*(IT)); \ |
| @@ -24681,9 +24720,17 @@ x_produce_glyphs (struct it *it) | |||
| 24681 | void | 24720 | void |
| 24682 | x_write_glyphs (struct glyph *start, int len) | 24721 | x_write_glyphs (struct glyph *start, int len) |
| 24683 | { | 24722 | { |
| 24684 | int x, hpos; | 24723 | int x, hpos, chpos = updated_window->phys_cursor.hpos; |
| 24685 | 24724 | ||
| 24686 | xassert (updated_window && updated_row); | 24725 | xassert (updated_window && updated_row); |
| 24726 | /* When the window is hscrolled, cursor hpos can legitimately be out | ||
| 24727 | of bounds, but we draw the cursor at the corresponding window | ||
| 24728 | margin in that case. */ | ||
| 24729 | if (!updated_row->reversed_p && chpos < 0) | ||
| 24730 | chpos = 0; | ||
| 24731 | if (updated_row->reversed_p && chpos >= updated_row->used[TEXT_AREA]) | ||
| 24732 | chpos = updated_row->used[TEXT_AREA] - 1; | ||
| 24733 | |||
| 24687 | BLOCK_INPUT; | 24734 | BLOCK_INPUT; |
| 24688 | 24735 | ||
| 24689 | /* Write glyphs. */ | 24736 | /* Write glyphs. */ |
| @@ -24698,8 +24745,8 @@ x_write_glyphs (struct glyph *start, int len) | |||
| 24698 | if (updated_area == TEXT_AREA | 24745 | if (updated_area == TEXT_AREA |
| 24699 | && updated_window->phys_cursor_on_p | 24746 | && updated_window->phys_cursor_on_p |
| 24700 | && updated_window->phys_cursor.vpos == output_cursor.vpos | 24747 | && updated_window->phys_cursor.vpos == output_cursor.vpos |
| 24701 | && updated_window->phys_cursor.hpos >= hpos | 24748 | && chpos >= hpos |
| 24702 | && updated_window->phys_cursor.hpos < hpos + len) | 24749 | && chpos < hpos + len) |
| 24703 | updated_window->phys_cursor_on_p = 0; | 24750 | updated_window->phys_cursor_on_p = 0; |
| 24704 | 24751 | ||
| 24705 | UNBLOCK_INPUT; | 24752 | UNBLOCK_INPUT; |
| @@ -25207,8 +25254,17 @@ draw_phys_cursor_glyph (struct window *w, struct glyph_row *row, | |||
| 25207 | { | 25254 | { |
| 25208 | int on_p = w->phys_cursor_on_p; | 25255 | int on_p = w->phys_cursor_on_p; |
| 25209 | int x1; | 25256 | int x1; |
| 25210 | x1 = draw_glyphs (w, w->phys_cursor.x, row, TEXT_AREA, | 25257 | int hpos = w->phys_cursor.hpos; |
| 25211 | w->phys_cursor.hpos, w->phys_cursor.hpos + 1, | 25258 | |
| 25259 | /* When the window is hscrolled, cursor hpos can legitimately be | ||
| 25260 | out of bounds, but we draw the cursor at the corresponding | ||
| 25261 | window margin in that case. */ | ||
| 25262 | if (!row->reversed_p && hpos < 0) | ||
| 25263 | hpos = 0; | ||
| 25264 | if (row->reversed_p && hpos >= row->used[TEXT_AREA]) | ||
| 25265 | hpos = row->used[TEXT_AREA] - 1; | ||
| 25266 | |||
| 25267 | x1 = draw_glyphs (w, w->phys_cursor.x, row, TEXT_AREA, hpos, hpos + 1, | ||
| 25212 | hl, 0); | 25268 | hl, 0); |
| 25213 | w->phys_cursor_on_p = on_p; | 25269 | w->phys_cursor_on_p = on_p; |
| 25214 | 25270 | ||
| @@ -25296,6 +25352,14 @@ erase_phys_cursor (struct window *w) | |||
| 25296 | : (w->phys_cursor.hpos >= cursor_row->used[TEXT_AREA]))) | 25352 | : (w->phys_cursor.hpos >= cursor_row->used[TEXT_AREA]))) |
| 25297 | goto mark_cursor_off; | 25353 | goto mark_cursor_off; |
| 25298 | 25354 | ||
| 25355 | /* When the window is hscrolled, cursor hpos can legitimately be out | ||
| 25356 | of bounds, but we draw the cursor at the corresponding window | ||
| 25357 | margin in that case. */ | ||
| 25358 | if (!cursor_row->reversed_p && hpos < 0) | ||
| 25359 | hpos = 0; | ||
| 25360 | if (cursor_row->reversed_p && hpos >= cursor_row->used[TEXT_AREA]) | ||
| 25361 | hpos = cursor_row->used[TEXT_AREA] - 1; | ||
| 25362 | |||
| 25299 | /* If the cursor is in the mouse face area, redisplay that when | 25363 | /* If the cursor is in the mouse face area, redisplay that when |
| 25300 | we clear the cursor. */ | 25364 | we clear the cursor. */ |
| 25301 | if (! NILP (hlinfo->mouse_face_window) | 25365 | if (! NILP (hlinfo->mouse_face_window) |
| @@ -25439,8 +25503,26 @@ update_window_cursor (struct window *w, int on) | |||
| 25439 | of being deleted. */ | 25503 | of being deleted. */ |
| 25440 | if (w->current_matrix) | 25504 | if (w->current_matrix) |
| 25441 | { | 25505 | { |
| 25506 | int hpos = w->phys_cursor.hpos; | ||
| 25507 | int vpos = w->phys_cursor.vpos; | ||
| 25508 | struct glyph_row *row; | ||
| 25509 | |||
| 25510 | if (vpos >= w->current_matrix->nrows | ||
| 25511 | || hpos >= w->current_matrix->matrix_w) | ||
| 25512 | return; | ||
| 25513 | |||
| 25514 | row = MATRIX_ROW (w->current_matrix, vpos); | ||
| 25515 | |||
| 25516 | /* When the window is hscrolled, cursor hpos can legitimately be | ||
| 25517 | out of bounds, but we draw the cursor at the corresponding | ||
| 25518 | window margin in that case. */ | ||
| 25519 | if (!row->reversed_p && hpos < 0) | ||
| 25520 | hpos = 0; | ||
| 25521 | if (row->reversed_p && hpos >= row->used[TEXT_AREA]) | ||
| 25522 | hpos = row->used[TEXT_AREA] - 1; | ||
| 25523 | |||
| 25442 | BLOCK_INPUT; | 25524 | BLOCK_INPUT; |
| 25443 | display_and_set_cursor (w, on, w->phys_cursor.hpos, w->phys_cursor.vpos, | 25525 | display_and_set_cursor (w, on, hpos, vpos, |
| 25444 | w->phys_cursor.x, w->phys_cursor.y); | 25526 | w->phys_cursor.x, w->phys_cursor.y); |
| 25445 | UNBLOCK_INPUT; | 25527 | UNBLOCK_INPUT; |
| 25446 | } | 25528 | } |
| @@ -25610,9 +25692,18 @@ show_mouse_face (Mouse_HLInfo *hlinfo, enum draw_glyphs_face draw) | |||
| 25610 | if (FRAME_WINDOW_P (f) | 25692 | if (FRAME_WINDOW_P (f) |
| 25611 | && phys_cursor_on_p && !w->phys_cursor_on_p) | 25693 | && phys_cursor_on_p && !w->phys_cursor_on_p) |
| 25612 | { | 25694 | { |
| 25695 | int hpos = w->phys_cursor.hpos; | ||
| 25696 | |||
| 25697 | /* When the window is hscrolled, cursor hpos can legitimately be | ||
| 25698 | out of bounds, but we draw the cursor at the corresponding | ||
| 25699 | window margin in that case. */ | ||
| 25700 | if (!row->reversed_p && hpos < 0) | ||
| 25701 | hpos = 0; | ||
| 25702 | if (row->reversed_p && hpos >= row->used[TEXT_AREA]) | ||
| 25703 | hpos = row->used[TEXT_AREA] - 1; | ||
| 25704 | |||
| 25613 | BLOCK_INPUT; | 25705 | BLOCK_INPUT; |
| 25614 | display_and_set_cursor (w, 1, | 25706 | display_and_set_cursor (w, 1, hpos, w->phys_cursor.vpos, |
| 25615 | w->phys_cursor.hpos, w->phys_cursor.vpos, | ||
| 25616 | w->phys_cursor.x, w->phys_cursor.y); | 25707 | w->phys_cursor.x, w->phys_cursor.y); |
| 25617 | UNBLOCK_INPUT; | 25708 | UNBLOCK_INPUT; |
| 25618 | } | 25709 | } |
| @@ -25711,7 +25802,19 @@ coords_in_mouse_face_p (struct window *w, int hpos, int vpos) | |||
| 25711 | int | 25802 | int |
| 25712 | cursor_in_mouse_face_p (struct window *w) | 25803 | cursor_in_mouse_face_p (struct window *w) |
| 25713 | { | 25804 | { |
| 25714 | return coords_in_mouse_face_p (w, w->phys_cursor.hpos, w->phys_cursor.vpos); | 25805 | int hpos = w->phys_cursor.hpos; |
| 25806 | int vpos = w->phys_cursor.vpos; | ||
| 25807 | struct glyph_row *row = MATRIX_ROW (w->current_matrix, vpos); | ||
| 25808 | |||
| 25809 | /* When the window is hscrolled, cursor hpos can legitimately be out | ||
| 25810 | of bounds, but we draw the cursor at the corresponding window | ||
| 25811 | margin in that case. */ | ||
| 25812 | if (!row->reversed_p && hpos < 0) | ||
| 25813 | hpos = 0; | ||
| 25814 | if (row->reversed_p && hpos >= row->used[TEXT_AREA]) | ||
| 25815 | hpos = row->used[TEXT_AREA] - 1; | ||
| 25816 | |||
| 25817 | return coords_in_mouse_face_p (w, hpos, vpos); | ||
| 25715 | } | 25818 | } |
| 25716 | 25819 | ||
| 25717 | 25820 | ||
| @@ -28579,7 +28682,8 @@ init_xdisp (void) | |||
| 28579 | 28682 | ||
| 28580 | /* Platform-independent portion of hourglass implementation. */ | 28683 | /* Platform-independent portion of hourglass implementation. */ |
| 28581 | 28684 | ||
| 28582 | /* Return non-zero if houglass timer has been started or hourglass is shown. */ | 28685 | /* Return non-zero if hourglass timer has been started or hourglass is |
| 28686 | shown. */ | ||
| 28583 | int | 28687 | int |
| 28584 | hourglass_started (void) | 28688 | hourglass_started (void) |
| 28585 | { | 28689 | { |
diff --git a/src/xfaces.c b/src/xfaces.c index 2dc46b2fa02..5a7b39fcca5 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -66,7 +66,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 66 | attributes (1st thru 5th) are updated from the spec. | 66 | attributes (1st thru 5th) are updated from the spec. |
| 67 | 67 | ||
| 68 | On the other hand, if one of the other font-related attributes are | 68 | On the other hand, if one of the other font-related attributes are |
| 69 | specified, the correspoinding specs in this attribute is set to nil. | 69 | specified, the corresponding specs in this attribute is set to nil. |
| 70 | 70 | ||
| 71 | 15. A face name or list of face names from which to inherit attributes. | 71 | 15. A face name or list of face names from which to inherit attributes. |
| 72 | 72 | ||
| @@ -1223,7 +1223,7 @@ face_color_gray_p (struct frame *f, const char *color_name) | |||
| 1223 | int gray_p; | 1223 | int gray_p; |
| 1224 | 1224 | ||
| 1225 | if (defined_color (f, color_name, &color, 0)) | 1225 | if (defined_color (f, color_name, &color, 0)) |
| 1226 | gray_p = (/* Any color sufficiently close to black counts as grey. */ | 1226 | gray_p = (/* Any color sufficiently close to black counts as gray. */ |
| 1227 | (color.red < 5000 && color.green < 5000 && color.blue < 5000) | 1227 | (color.red < 5000 && color.green < 5000 && color.blue < 5000) |
| 1228 | || | 1228 | || |
| 1229 | ((eabs (color.red - color.green) | 1229 | ((eabs (color.red - color.green) |
diff --git a/src/xfns.c b/src/xfns.c index 88c70a9b410..9bbaea37583 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2962,7 +2962,7 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms) | |||
| 2962 | 2962 | ||
| 2963 | if (NILP (font_param)) | 2963 | if (NILP (font_param)) |
| 2964 | { | 2964 | { |
| 2965 | /* System font should take precedendce over X resources. We suggest this | 2965 | /* System font should take precedence over X resources. We suggest this |
| 2966 | regardless of font-use-system-font because .emacs may not have been | 2966 | regardless of font-use-system-font because .emacs may not have been |
| 2967 | read yet. */ | 2967 | read yet. */ |
| 2968 | const char *system_font = xsettings_get_system_font (); | 2968 | const char *system_font = xsettings_get_system_font (); |
| @@ -3166,7 +3166,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3166 | to get the color reference counts right, so initialize them! */ | 3166 | to get the color reference counts right, so initialize them! */ |
| 3167 | { | 3167 | { |
| 3168 | Lisp_Object black; | 3168 | Lisp_Object black; |
| 3169 | struct gcpro inner_gcpro1; | 3169 | struct gcpro gcpro1; |
| 3170 | 3170 | ||
| 3171 | /* Function x_decode_color can signal an error. Make | 3171 | /* Function x_decode_color can signal an error. Make |
| 3172 | sure to initialize color slots so that we won't try | 3172 | sure to initialize color slots so that we won't try |
| @@ -3179,7 +3179,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3179 | f->output_data.x->mouse_pixel = -1; | 3179 | f->output_data.x->mouse_pixel = -1; |
| 3180 | 3180 | ||
| 3181 | black = build_string ("black"); | 3181 | black = build_string ("black"); |
| 3182 | GCPRO1_VAR (black, inner_gcpro); | 3182 | GCPRO1 (black); |
| 3183 | FRAME_FOREGROUND_PIXEL (f) | 3183 | FRAME_FOREGROUND_PIXEL (f) |
| 3184 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 3184 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 3185 | FRAME_BACKGROUND_PIXEL (f) | 3185 | FRAME_BACKGROUND_PIXEL (f) |
| @@ -3192,7 +3192,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3192 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 3192 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 3193 | f->output_data.x->mouse_pixel | 3193 | f->output_data.x->mouse_pixel |
| 3194 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 3194 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 3195 | UNGCPRO_VAR (inner_gcpro); | 3195 | UNGCPRO; |
| 3196 | } | 3196 | } |
| 3197 | 3197 | ||
| 3198 | /* Specify the parent under which to make this X window. */ | 3198 | /* Specify the parent under which to make this X window. */ |
| @@ -4286,7 +4286,7 @@ If TYPE is nil or omitted, get the property as a string. | |||
| 4286 | Otherwise TYPE is the name of the atom that denotes the type expected. | 4286 | Otherwise TYPE is the name of the atom that denotes the type expected. |
| 4287 | If SOURCE is non-nil, get the property on that window instead of from | 4287 | If SOURCE is non-nil, get the property on that window instead of from |
| 4288 | FRAME. The number 0 denotes the root window. | 4288 | FRAME. The number 0 denotes the root window. |
| 4289 | If DELETE_P is non-nil, delete the property after retreiving it. | 4289 | If DELETE_P is non-nil, delete the property after retrieving it. |
| 4290 | If VECTOR_RET_P is non-nil, don't return a string but a vector of values. | 4290 | If VECTOR_RET_P is non-nil, don't return a string but a vector of values. |
| 4291 | 4291 | ||
| 4292 | Value is nil if FRAME hasn't a property with name PROP or if PROP has | 4292 | Value is nil if FRAME hasn't a property with name PROP or if PROP has |
| @@ -4620,7 +4620,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, | |||
| 4620 | to get the color reference counts right, so initialize them! */ | 4620 | to get the color reference counts right, so initialize them! */ |
| 4621 | { | 4621 | { |
| 4622 | Lisp_Object black; | 4622 | Lisp_Object black; |
| 4623 | struct gcpro inner_gcpro1; | 4623 | struct gcpro gcpro1; |
| 4624 | 4624 | ||
| 4625 | /* Function x_decode_color can signal an error. Make | 4625 | /* Function x_decode_color can signal an error. Make |
| 4626 | sure to initialize color slots so that we won't try | 4626 | sure to initialize color slots so that we won't try |
| @@ -4633,7 +4633,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, | |||
| 4633 | f->output_data.x->mouse_pixel = -1; | 4633 | f->output_data.x->mouse_pixel = -1; |
| 4634 | 4634 | ||
| 4635 | black = build_string ("black"); | 4635 | black = build_string ("black"); |
| 4636 | GCPRO1_VAR (black, inner_gcpro); | 4636 | GCPRO1 (black); |
| 4637 | FRAME_FOREGROUND_PIXEL (f) | 4637 | FRAME_FOREGROUND_PIXEL (f) |
| 4638 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 4638 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 4639 | FRAME_BACKGROUND_PIXEL (f) | 4639 | FRAME_BACKGROUND_PIXEL (f) |
| @@ -4646,7 +4646,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, | |||
| 4646 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 4646 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 4647 | f->output_data.x->mouse_pixel | 4647 | f->output_data.x->mouse_pixel |
| 4648 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); | 4648 | = x_decode_color (f, black, BLACK_PIX_DEFAULT (f)); |
| 4649 | UNGCPRO_VAR (inner_gcpro); | 4649 | UNGCPRO; |
| 4650 | } | 4650 | } |
| 4651 | 4651 | ||
| 4652 | /* Set the name; the functions to which we pass f expect the name to | 4652 | /* Set the name; the functions to which we pass f expect the name to |
| @@ -5912,7 +5912,7 @@ the tool bar buttons. */); | |||
| 5912 | x_gtk_whole_detached_tool_bar = 0; | 5912 | x_gtk_whole_detached_tool_bar = 0; |
| 5913 | 5913 | ||
| 5914 | DEFVAR_BOOL ("x-gtk-use-system-tooltips", x_gtk_use_system_tooltips, | 5914 | DEFVAR_BOOL ("x-gtk-use-system-tooltips", x_gtk_use_system_tooltips, |
| 5915 | doc: /* *If non-nil with a Gtk+ built Emacs, the Gtk+ toolip is used. | 5915 | doc: /* *If non-nil with a Gtk+ built Emacs, the Gtk+ tooltip is used. |
| 5916 | Otherwise use Emacs own tooltip implementation. | 5916 | Otherwise use Emacs own tooltip implementation. |
| 5917 | When using Gtk+ tooltips, the tooltip face is not used. */); | 5917 | When using Gtk+ tooltips, the tooltip face is not used. */); |
| 5918 | x_gtk_use_system_tooltips = 1; | 5918 | x_gtk_use_system_tooltips = 1; |
diff --git a/src/xmenu.c b/src/xmenu.c index d73051be6de..b766f142e2d 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1304,7 +1304,7 @@ free_frame_menubar (FRAME_PTR f) | |||
| 1304 | #ifdef USE_MOTIF | 1304 | #ifdef USE_MOTIF |
| 1305 | /* Removing the menu bar magically changes the shell widget's x | 1305 | /* Removing the menu bar magically changes the shell widget's x |
| 1306 | and y position of (0, 0) which, when the menu bar is turned | 1306 | and y position of (0, 0) which, when the menu bar is turned |
| 1307 | on again, leads to pull-down menuss appearing in strange | 1307 | on again, leads to pull-down menus appearing in strange |
| 1308 | positions near the upper-left corner of the display. This | 1308 | positions near the upper-left corner of the display. This |
| 1309 | happens only with some window managers like twm and ctwm, | 1309 | happens only with some window managers like twm and ctwm, |
| 1310 | but not with other like Motif's mwm or kwm, because the | 1310 | but not with other like Motif's mwm or kwm, because the |
diff --git a/src/xselect.c b/src/xselect.c index d2ab416176c..099b1670e4d 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -515,7 +515,7 @@ static struct selection_data *converted_selections; | |||
| 515 | static Atom conversion_fail_tag; | 515 | static Atom conversion_fail_tag; |
| 516 | 516 | ||
| 517 | /* Used as an unwind-protect clause so that, if a selection-converter signals | 517 | /* Used as an unwind-protect clause so that, if a selection-converter signals |
| 518 | an error, we tell the requester that we were unable to do what they wanted | 518 | an error, we tell the requestor that we were unable to do what they wanted |
| 519 | before we throw to top-level or go into the debugger or whatever. */ | 519 | before we throw to top-level or go into the debugger or whatever. */ |
| 520 | 520 | ||
| 521 | static Lisp_Object | 521 | static Lisp_Object |
| @@ -692,7 +692,7 @@ x_reply_selection_request (struct input_event *event, | |||
| 692 | bytes_remaining = cs->size; | 692 | bytes_remaining = cs->size; |
| 693 | bytes_remaining *= format_bytes; | 693 | bytes_remaining *= format_bytes; |
| 694 | 694 | ||
| 695 | /* Wait for the requester to ack by deleting the property. | 695 | /* Wait for the requestor to ack by deleting the property. |
| 696 | This can run Lisp code (process handlers) or signal. */ | 696 | This can run Lisp code (process handlers) or signal. */ |
| 697 | if (! had_errors) | 697 | if (! had_errors) |
| 698 | { | 698 | { |
| @@ -731,7 +731,7 @@ x_reply_selection_request (struct input_event *event, | |||
| 731 | 731 | ||
| 732 | if (had_errors) break; | 732 | if (had_errors) break; |
| 733 | 733 | ||
| 734 | /* Wait for the requester to ack this chunk by deleting | 734 | /* Wait for the requestor to ack this chunk by deleting |
| 735 | the property. This can run Lisp code or signal. */ | 735 | the property. This can run Lisp code or signal. */ |
| 736 | TRACE1 ("Waiting for increment ACK (deletion of %s)", | 736 | TRACE1 ("Waiting for increment ACK (deletion of %s)", |
| 737 | XGetAtomName (display, cs->property)); | 737 | XGetAtomName (display, cs->property)); |
| @@ -739,7 +739,7 @@ x_reply_selection_request (struct input_event *event, | |||
| 739 | } | 739 | } |
| 740 | 740 | ||
| 741 | /* Now write a zero-length chunk to the property to tell the | 741 | /* Now write a zero-length chunk to the property to tell the |
| 742 | requester that we're done. */ | 742 | requestor that we're done. */ |
| 743 | BLOCK_INPUT; | 743 | BLOCK_INPUT; |
| 744 | if (! waiting_for_other_props_on_window (display, window)) | 744 | if (! waiting_for_other_props_on_window (display, window)) |
| 745 | XSelectInput (display, window, 0L); | 745 | XSelectInput (display, window, 0L); |
diff --git a/src/xterm.c b/src/xterm.c index d5131c9a60c..4bc12c06b34 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2963,9 +2963,7 @@ x_clear_frame (struct frame *f) | |||
| 2963 | follow an explicit cursor_to. */ | 2963 | follow an explicit cursor_to. */ |
| 2964 | BLOCK_INPUT; | 2964 | BLOCK_INPUT; |
| 2965 | 2965 | ||
| 2966 | /* The following call is commented out because it does not seem to accomplish | 2966 | XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); |
| 2967 | anything, apart from causing flickering during window resize. */ | ||
| 2968 | /* XClearWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)); */ | ||
| 2969 | 2967 | ||
| 2970 | /* We have to clear the scroll bars. If we have changed colors or | 2968 | /* We have to clear the scroll bars. If we have changed colors or |
| 2971 | something like that, then they should be notified. */ | 2969 | something like that, then they should be notified. */ |
| @@ -3319,7 +3317,7 @@ x_scroll_run (struct window *w, struct run *run) | |||
| 3319 | } | 3317 | } |
| 3320 | else | 3318 | else |
| 3321 | { | 3319 | { |
| 3322 | /* Scolling down. Make sure we don't copy over the mode line. | 3320 | /* Scrolling down. Make sure we don't copy over the mode line. |
| 3323 | at the bottom. */ | 3321 | at the bottom. */ |
| 3324 | if (to_y + run->height > bottom_y) | 3322 | if (to_y + run->height > bottom_y) |
| 3325 | height = bottom_y - to_y; | 3323 | height = bottom_y - to_y; |
| @@ -4183,7 +4181,7 @@ static Boolean xaw3d_arrow_scroll; | |||
| 4183 | 4181 | ||
| 4184 | /* Whether the drag scrolling maintains the mouse at the top of the | 4182 | /* Whether the drag scrolling maintains the mouse at the top of the |
| 4185 | thumb. If not, resizing the thumb needs to be done more carefully | 4183 | thumb. If not, resizing the thumb needs to be done more carefully |
| 4186 | to avoid jerkyness. */ | 4184 | to avoid jerkiness. */ |
| 4187 | 4185 | ||
| 4188 | static Boolean xaw3d_pick_top; | 4186 | static Boolean xaw3d_pick_top; |
| 4189 | 4187 | ||
| @@ -6115,7 +6113,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6115 | last_user_time = event.xproperty.time; | 6113 | last_user_time = event.xproperty.time; |
| 6116 | f = x_top_window_to_frame (dpyinfo, event.xproperty.window); | 6114 | f = x_top_window_to_frame (dpyinfo, event.xproperty.window); |
| 6117 | if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) | 6115 | if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state) |
| 6118 | if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified) | 6116 | if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified |
| 6117 | && f->output_data.x->net_wm_state_hidden_seen) | ||
| 6119 | { | 6118 | { |
| 6120 | /* Gnome shell does not iconify us when C-z is pressed. It hides | 6119 | /* Gnome shell does not iconify us when C-z is pressed. It hides |
| 6121 | the frame. So if our state says we aren't hidden anymore, | 6120 | the frame. So if our state says we aren't hidden anymore, |
| @@ -6125,6 +6124,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, | |||
| 6125 | f->async_visible = 1; | 6124 | f->async_visible = 1; |
| 6126 | f->async_iconified = 0; | 6125 | f->async_iconified = 0; |
| 6127 | f->output_data.x->has_been_visible = 1; | 6126 | f->output_data.x->has_been_visible = 1; |
| 6127 | f->output_data.x->net_wm_state_hidden_seen = 0; | ||
| 6128 | inev.ie.kind = DEICONIFY_EVENT; | 6128 | inev.ie.kind = DEICONIFY_EVENT; |
| 6129 | XSETFRAME (inev.ie.frame_or_window, f); | 6129 | XSETFRAME (inev.ie.frame_or_window, f); |
| 6130 | } | 6130 | } |
| @@ -8482,7 +8482,10 @@ get_current_wm_state (struct frame *f, | |||
| 8482 | { | 8482 | { |
| 8483 | Atom a = ((Atom*)tmp_data)[i]; | 8483 | Atom a = ((Atom*)tmp_data)[i]; |
| 8484 | if (a == dpyinfo->Xatom_net_wm_state_hidden) | 8484 | if (a == dpyinfo->Xatom_net_wm_state_hidden) |
| 8485 | is_hidden = 1; | 8485 | { |
| 8486 | is_hidden = 1; | ||
| 8487 | f->output_data.x->net_wm_state_hidden_seen = 1; | ||
| 8488 | } | ||
| 8486 | else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) | 8489 | else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz) |
| 8487 | { | 8490 | { |
| 8488 | if (*size_state == FULLSCREEN_HEIGHT) | 8491 | if (*size_state == FULLSCREEN_HEIGHT) |
| @@ -8765,7 +8768,7 @@ x_wait_for_event (struct frame *f, int eventtype) | |||
| 8765 | pending_event_wait.f = f; | 8768 | pending_event_wait.f = f; |
| 8766 | pending_event_wait.eventtype = eventtype; | 8769 | pending_event_wait.eventtype = eventtype; |
| 8767 | 8770 | ||
| 8768 | /* Set timeout to 0.1 second. Hopefully not noticable. | 8771 | /* Set timeout to 0.1 second. Hopefully not noticeable. |
| 8769 | Maybe it should be configurable. */ | 8772 | Maybe it should be configurable. */ |
| 8770 | EMACS_SET_SECS_USECS (tmo, 0, 100000); | 8773 | EMACS_SET_SECS_USECS (tmo, 0, 100000); |
| 8771 | EMACS_GET_TIME (tmo_at); | 8774 | EMACS_GET_TIME (tmo_at); |
| @@ -9558,6 +9561,14 @@ x_wm_set_size_hint (struct frame *f, long flags, int user_position) | |||
| 9558 | XSizeHints size_hints; | 9561 | XSizeHints size_hints; |
| 9559 | Window window = FRAME_OUTER_WINDOW (f); | 9562 | Window window = FRAME_OUTER_WINDOW (f); |
| 9560 | 9563 | ||
| 9564 | #ifdef USE_X_TOOLKIT | ||
| 9565 | if (f->output_data.x->widget) | ||
| 9566 | { | ||
| 9567 | widget_update_wm_size_hints (f->output_data.x->widget); | ||
| 9568 | return; | ||
| 9569 | } | ||
| 9570 | #endif | ||
| 9571 | |||
| 9561 | /* Setting PMaxSize caused various problems. */ | 9572 | /* Setting PMaxSize caused various problems. */ |
| 9562 | size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */; | 9573 | size_hints.flags = PResizeInc | PMinSize /* | PMaxSize */; |
| 9563 | 9574 | ||
| @@ -9950,6 +9961,11 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 9950 | https://bugzilla.gnome.org/show_bug.cgi?id=563627. */ | 9961 | https://bugzilla.gnome.org/show_bug.cgi?id=563627. */ |
| 9951 | id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL | 9962 | id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL |
| 9952 | | G_LOG_FLAG_RECURSION, my_log_handler, NULL); | 9963 | | G_LOG_FLAG_RECURSION, my_log_handler, NULL); |
| 9964 | |||
| 9965 | /* NULL window -> events for all windows go to our function. | ||
| 9966 | Call before gtk_init so Gtk+ event filters comes after our. */ | ||
| 9967 | gdk_window_add_filter (NULL, event_handler_gdk, NULL); | ||
| 9968 | |||
| 9953 | gtk_init (&argc, &argv2); | 9969 | gtk_init (&argc, &argv2); |
| 9954 | g_log_remove_handler ("GLib", id); | 9970 | g_log_remove_handler ("GLib", id); |
| 9955 | 9971 | ||
| @@ -9959,9 +9975,6 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 9959 | 9975 | ||
| 9960 | dpy = DEFAULT_GDK_DISPLAY (); | 9976 | dpy = DEFAULT_GDK_DISPLAY (); |
| 9961 | 9977 | ||
| 9962 | /* NULL window -> events for all windows go to our function */ | ||
| 9963 | gdk_window_add_filter (NULL, event_handler_gdk, NULL); | ||
| 9964 | |||
| 9965 | #if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION <= 90 | 9978 | #if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION <= 90 |
| 9966 | /* Load our own gtkrc if it exists. */ | 9979 | /* Load our own gtkrc if it exists. */ |
| 9967 | { | 9980 | { |
diff --git a/src/xterm.h b/src/xterm.h index 92761ccee87..1242bf64d77 100644 --- a/src/xterm.h +++ b/src/xterm.h | |||
| @@ -632,6 +632,9 @@ struct x_output | |||
| 632 | x_check_expected_move. */ | 632 | x_check_expected_move. */ |
| 633 | int left_before_move; | 633 | int left_before_move; |
| 634 | int top_before_move; | 634 | int top_before_move; |
| 635 | |||
| 636 | /* Non-zero if _NET_WM_STATE_HIDDEN is set for this frame. */ | ||
| 637 | int net_wm_state_hidden_seen; | ||
| 635 | }; | 638 | }; |
| 636 | 639 | ||
| 637 | #define No_Cursor (None) | 640 | #define No_Cursor (None) |
| @@ -640,7 +643,7 @@ enum | |||
| 640 | { | 643 | { |
| 641 | /* Values for focus_state, used as bit mask. | 644 | /* Values for focus_state, used as bit mask. |
| 642 | EXPLICIT means we received a FocusIn for the frame and know it has | 645 | EXPLICIT means we received a FocusIn for the frame and know it has |
| 643 | the focus. IMPLICIT means we recevied an EnterNotify and the frame | 646 | the focus. IMPLICIT means we received an EnterNotify and the frame |
| 644 | may have the focus if no window manager is running. | 647 | may have the focus if no window manager is running. |
| 645 | FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ | 648 | FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ |
| 646 | FOCUS_NONE = 0, | 649 | FOCUS_NONE = 0, |