diff options
| author | Paul Eggert | 2012-04-09 15:54:59 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-04-09 15:54:59 -0700 |
| commit | 45e9f7da84c1bd3fc0d36d05c5708ed3b2d3a193 (patch) | |
| tree | 5bc87a8b5a3c754b8eb44a612cc6c03561d6b968 /src | |
| parent | 9d6b4d53469a9ffd67bd770fabc6fe254e35c21d (diff) | |
| parent | 05920a43fc18e696b464387e781e7cfdcea5b5af (diff) | |
| download | emacs-45e9f7da84c1bd3fc0d36d05c5708ed3b2d3a193.tar.gz emacs-45e9f7da84c1bd3fc0d36d05c5708ed3b2d3a193.zip | |
Merge from trunk.
Diffstat (limited to 'src')
55 files changed, 983 insertions, 428 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d477d0574b3..3bc8900f01f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | 2012-03-02 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2012-04-09 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): |
| @@ -788,6 +788,322 @@ | |||
| 788 | rather than rolling our own approximation. | 788 | rather than rolling our own approximation. |
| 789 | (SCROLL_BAR_VEC_SIZE): Remove; not used. | 789 | (SCROLL_BAR_VEC_SIZE): Remove; not used. |
| 790 | 790 | ||
| 791 | 2012-04-09 Glenn Morris <rgm@gnu.org> | ||
| 792 | |||
| 793 | * doc.c (Fsnarf_documentation): Check variables, functions are bound, | ||
| 794 | not just in the obarray, before snarfing them. (Bug#11036) | ||
| 795 | |||
| 796 | * Makefile.in ($(leimdir)/leim-list.el): | ||
| 797 | Pass EMACS rather than BUILT_EMACS. | ||
| 798 | |||
| 799 | 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 800 | |||
| 801 | * process.c (make_process): | ||
| 802 | * process.h: Add integer `gnutls_handshakes_tried' member to | ||
| 803 | process struct. | ||
| 804 | |||
| 805 | * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit. Add | ||
| 806 | convenience `GNUTLS_LOG2i' macro. | ||
| 807 | |||
| 808 | * gnutls.c (gnutls_log_function2i): Convenience log function. | ||
| 809 | (emacs_gnutls_read): Use new log functions, | ||
| 810 | `gnutls_handshakes_tried' process member, and | ||
| 811 | `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake | ||
| 812 | attempts per process (connection). | ||
| 813 | |||
| 814 | 2012-04-09 Chong Yidong <cyd@gnu.org> | ||
| 815 | |||
| 816 | * eval.c (Fuser_variable_p, user_variable_p_eh) | ||
| 817 | (lisp_indirect_variable): Functions deleted. | ||
| 818 | (Fdefvar): Caller changed. | ||
| 819 | |||
| 820 | * callint.c (Finteractive, Fcall_interactively): | ||
| 821 | * minibuf.c (Fread_variable): Callers changed. | ||
| 822 | |||
| 823 | 2012-04-09 Eli Zaretskii <eliz@gnu.org> | ||
| 824 | |||
| 825 | * xdisp.c (set_cursor_from_row): If the display string appears in | ||
| 826 | the buffer at position that is closer to point than the position | ||
| 827 | after the display string, display the cursor on the first glyph of | ||
| 828 | the display string. Fixes cursor display when a 'display' text | ||
| 829 | property immediately follows invisible text. (Bug#11094) | ||
| 830 | |||
| 831 | 2012-04-09 Paul Eggert <eggert@cs.ucla.edu> | ||
| 832 | |||
| 833 | composite.c: use 'double' consistently | ||
| 834 | * composite.c (get_composition_id): Use 'double' consistently | ||
| 835 | instead of converting 'float' to 'double' and vice versa; this is | ||
| 836 | easier to understand and avoids a GCC warning. | ||
| 837 | |||
| 838 | 2012-04-09 Glenn Morris <rgm@gnu.org> | ||
| 839 | |||
| 840 | * Makefile.in: Generate leim-list with bootstrap-emacs, in | ||
| 841 | preparation for dumping it with emacs. (Bug#4789) | ||
| 842 | (leimdir): New variable. | ||
| 843 | ($(leimdir)/leim-list.el): New rule. | ||
| 844 | (emacs$(EXEEXT)): Depend on leim-list.el. | ||
| 845 | |||
| 846 | * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821) | ||
| 847 | (Fget_buffer_create): Don't call Qucs_set_table_for_input. | ||
| 848 | (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input. | ||
| 849 | |||
| 850 | 2012-04-08 Andreas Schwab <schwab@linux-m68k.org> | ||
| 851 | |||
| 852 | * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure | ||
| 853 | proper alignment. | ||
| 854 | |||
| 855 | 2012-04-07 Juanma Barranquero <lekktu@gmail.com> | ||
| 856 | |||
| 857 | * xml.c (init_libxml2_functions) [WINDOWSNT]: | ||
| 858 | Remove unused local variable. | ||
| 859 | |||
| 860 | 2012-04-07 Paul Eggert <eggert@cs.ucla.edu> | ||
| 861 | |||
| 862 | Avoid unnecessary pointer scanning in garbage collection (Bug#10780). | ||
| 863 | * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro. | ||
| 864 | (mark_memory): Mark Lisp_Objects only if pointers might hide in | ||
| 865 | objects, as mark_maybe_pointer will catch them otherwise. | ||
| 866 | (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed. | ||
| 867 | * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise. | ||
| 868 | |||
| 869 | 2012-04-07 Paul Eggert <eggert@cs.ucla.edu> | ||
| 870 | |||
| 871 | Fix typo that broke non-Windows builds. | ||
| 872 | * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'. | ||
| 873 | |||
| 874 | 2012-04-07 Eli Zaretskii <eliz@gnu.org> | ||
| 875 | |||
| 876 | Support building on MS-Windows with libxml2. | ||
| 877 | |||
| 878 | * makefile.w32-in (OBJ2): Add xml.$(O). | ||
| 879 | (GLOBAL_SOURCES): Add xml.c. | ||
| 880 | ($(BLD)/xml.$(O)): New dependency list. | ||
| 881 | |||
| 882 | * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros. | ||
| 883 | (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement) | ||
| 884 | (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion) | ||
| 885 | [!WINDOWSNT]: New macros. | ||
| 886 | (init_libxml2_functions, libxml2_loaded_p): New functions. | ||
| 887 | (parse_region): Call fn_xmlCheckVersion instead of using the macro | ||
| 888 | LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros. | ||
| 889 | (xml_cleanup_parser): New function, export for fn_xmlCleanupParser. | ||
| 890 | Calls xmlCleanupParser only if libxml2 was loaded (or statically | ||
| 891 | linked in). | ||
| 892 | (Flibxml_parse_html_region, Flibxml_parse_xml_region): Call | ||
| 893 | init_libxml2_functions before calling libxml2 functions. | ||
| 894 | (syms_of_xml) <Qlibxml2_dll>: DEFSYM it. | ||
| 895 | |||
| 896 | * emacs.c: Don't include libxml/parser.h. | ||
| 897 | (shut_down_emacs): Call xml_cleanup_parser, instead of calling | ||
| 898 | xmlCleanupParser directly. | ||
| 899 | |||
| 900 | * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser. | ||
| 901 | |||
| 902 | 2012-04-07 Eli Zaretskii <eliz@gnu.org> | ||
| 903 | |||
| 904 | * indent.c (Fvertical_motion): If there is a display string at | ||
| 905 | point, use it.vpos to compute how many lines to backtrack after | ||
| 906 | move_it_to point. (Bug#11133) | ||
| 907 | |||
| 908 | 2012-04-06 Eli Zaretskii <eliz@gnu.org> | ||
| 909 | |||
| 910 | * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR): | ||
| 911 | * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments | ||
| 912 | about subtle differences between FETCH_CHAR* and STRING_CHAR* | ||
| 913 | macros related to unification of CJK characters. For the details, | ||
| 914 | see the discussion following the message here: | ||
| 915 | http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14. | ||
| 916 | |||
| 917 | 2012-04-04 Chong Yidong <cyd@gnu.org> | ||
| 918 | |||
| 919 | * keyboard.c (Vdelayed_warnings_list): Doc fix. | ||
| 920 | |||
| 921 | 2012-04-01 Eli Zaretskii <eliz@gnu.org> | ||
| 922 | |||
| 923 | * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA | ||
| 924 | instead of alloca. (Bug#11138) | ||
| 925 | |||
| 926 | 2012-04-01 Andreas Schwab <schwab@linux-m68k.org> | ||
| 927 | |||
| 928 | * w32menu.c (is_simple_dialog): Properly check lisp types. | ||
| 929 | (Bug#11141) | ||
| 930 | |||
| 931 | 2012-03-31 Eli Zaretskii <eliz@gnu.org> | ||
| 932 | |||
| 933 | * xdisp.c (move_it_by_lines): When DVPOS is positive, and the | ||
| 934 | position we get to after a call to move_it_to fails the | ||
| 935 | IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position | ||
| 936 | only if we wind up in a string from display property. (Bug#11063) | ||
| 937 | |||
| 938 | * window.c (Fdelete_other_windows_internal): Invalidate the row | ||
| 939 | and column information about mouse highlight, so that redisplay | ||
| 940 | restores it after reallocating the glyph matrices. (Bug#7464) | ||
| 941 | |||
| 942 | * xdisp.c (set_cursor_from_row): If `cursor' property on a display | ||
| 943 | string comes from a `display' text property, use the buffer | ||
| 944 | position of that property as if we actually saw that position in | ||
| 945 | the row's glyphs. | ||
| 946 | (move_it_by_lines): Remove the assertion that | ||
| 947 | "it->current_x == 0 && it->hpos == 0" which can be legitimately | ||
| 948 | violated when there's a before-string at the beginning of a line. | ||
| 949 | (Bug#11063) | ||
| 950 | |||
| 951 | 2012-03-30 Eli Zaretskii <eliz@gnu.org> | ||
| 952 | |||
| 953 | * xdisp.c (append_space_for_newline): If the default face was | ||
| 954 | remapped, use the remapped face for the appended newline. | ||
| 955 | (extend_face_to_end_of_line): Use the remapped default face for | ||
| 956 | extending the face to the end of the line. | ||
| 957 | (display_line): Call extend_face_to_end_of_line when the default | ||
| 958 | face was remapped. (Bug#11068) | ||
| 959 | |||
| 960 | 2012-03-29 Eli Zaretskii <eliz@gnu.org> | ||
| 961 | |||
| 962 | * s/ms-w32.h: Discourage from defining HAVE_GETCWD. | ||
| 963 | |||
| 964 | 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 965 | |||
| 966 | * keyboard.c (safe_run_hooks_error): Don't unquote strings. | ||
| 967 | |||
| 968 | 2012-03-27 Glenn Morris <rgm@gnu.org> | ||
| 969 | |||
| 970 | * search.c (Fword_search_backward_lax, Fword_search_forward_lax): | ||
| 971 | Doc fixes. | ||
| 972 | |||
| 973 | 2012-03-26 Kenichi Handa <handa@m17n.org> | ||
| 974 | |||
| 975 | * dispextern.h (struct glyph): Fix previous change. Change the | ||
| 976 | bit length of glyphless.ch to 25 (Bug#11082). | ||
| 977 | |||
| 978 | 2012-03-26 Chong Yidong <cyd@gnu.org> | ||
| 979 | |||
| 980 | * keyboard.c (Vselection_inhibit_update_commands): New variable. | ||
| 981 | (command_loop_1): Use it; inhibit selection update for | ||
| 982 | handle-select-window too (Bug#8996). | ||
| 983 | |||
| 984 | 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr> | ||
| 985 | |||
| 986 | * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code. | ||
| 987 | |||
| 988 | 2012-03-25 Kenichi Handa <handa@m17n.org> | ||
| 989 | |||
| 990 | * dispextern.h (struct glyph): Change the bit length of | ||
| 991 | glyphless.ch to 22 to make the member glyphless fit in 32 bits. | ||
| 992 | |||
| 993 | 2012-03-24 Eli Zaretskii <eliz@gnu.org> | ||
| 994 | |||
| 995 | * s/ms-w32.h (tzname): Include time.h before redirecting to | ||
| 996 | _tzname. Fixes the MSVC build. (Bug#9960) | ||
| 997 | |||
| 998 | 2012-03-24 Andreas Schwab <schwab@linux-m68k.org> | ||
| 999 | |||
| 1000 | * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6 | ||
| 1001 | characters. | ||
| 1002 | |||
| 1003 | * xterm.c (XTread_socket): Only modify handling_signal if | ||
| 1004 | !SYNC_INPUT. (Bug#11080) | ||
| 1005 | |||
| 1006 | 2012-03-23 Eli Zaretskii <eliz@gnu.org> | ||
| 1007 | |||
| 1008 | * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of | ||
| 1009 | FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes | ||
| 1010 | when fetching a multibyte character consumes more bytes than | ||
| 1011 | CHAR_BYTES returns, due to unification of CJK characters in | ||
| 1012 | string_char. (Bug#11073) | ||
| 1013 | |||
| 1014 | 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change) | ||
| 1015 | |||
| 1016 | * process.c (wait_reading_process_output): Handle pty disconnect | ||
| 1017 | by refraining from sending oneself a SIGCHLD (bug#10933). | ||
| 1018 | |||
| 1019 | 2012-03-22 Chong Yidong <cyd@gnu.org> | ||
| 1020 | |||
| 1021 | * dispextern.h (struct it): New member string_from_prefix_prop_p. | ||
| 1022 | |||
| 1023 | * xdisp.c (push_prefix_prop): Rename from push_display_prop. | ||
| 1024 | Mark string as coming from a prefix property. | ||
| 1025 | (handle_face_prop): Use default face for prefix strings (Bug#4281). | ||
| 1026 | (pop_it, reseat_1): Save and restore string_from_prefix_prop_p. | ||
| 1027 | |||
| 1028 | 2012-03-21 Chong Yidong <cyd@gnu.org> | ||
| 1029 | |||
| 1030 | * xfaces.c (Vface_remapping_alist): Doc fix. | ||
| 1031 | |||
| 1032 | 2012-03-20 Eli Zaretskii <eliz@gnu.org> | ||
| 1033 | |||
| 1034 | * w32proc.c (Fw32_set_console_codepage) | ||
| 1035 | (Fw32_set_console_output_codepage, Fw32_get_codepage_charset): | ||
| 1036 | Doc fixes. | ||
| 1037 | |||
| 1038 | 2012-03-20 Chong Yidong <cyd@gnu.org> | ||
| 1039 | |||
| 1040 | * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc | ||
| 1041 | to reflect default non-nil value of redisplay-dont-pause. | ||
| 1042 | |||
| 1043 | 2012-03-19 Kenichi Handa <handa@m17n.org> | ||
| 1044 | |||
| 1045 | * ftfont.c (ftfont_drive_otf): Mask bits of character code to make | ||
| 1046 | it fit in a valid range (Bug#11003). | ||
| 1047 | |||
| 1048 | 2012-03-18 Eli Zaretskii <eliz@gnu.org> | ||
| 1049 | |||
| 1050 | * xdisp.c (cursor_row_p): Even if the glyph row ends in a string | ||
| 1051 | that is not from display property, accept the row as a "cursor | ||
| 1052 | row" if one of the string's character has a non-nil `cursor' | ||
| 1053 | property. Fixes cursor positioning when there are newlines in | ||
| 1054 | overlay strings, e.g. in icomplete.el. (Bug#11035) | ||
| 1055 | |||
| 1056 | 2012-03-12 Paul Eggert <eggert@cs.ucla.edu> | ||
| 1057 | |||
| 1058 | * buffer.c (compare_overlays): Don't assume args differ (Bug#6830). | ||
| 1059 | |||
| 1060 | 2012-03-12 Chong Yidong <cyd@gnu.org> | ||
| 1061 | |||
| 1062 | * eval.c (inhibit_lisp_code): Rename from | ||
| 1063 | inhibit_window_configuration_change_hook; move from window.c. | ||
| 1064 | |||
| 1065 | * xfns.c (unwind_create_frame_1, Fx_create_frame): | ||
| 1066 | * window.c (run_window_configuration_change_hook) | ||
| 1067 | (syms_of_window): Callers changed. | ||
| 1068 | |||
| 1069 | 2012-03-11 Chong Yidong <cyd@gnu.org> | ||
| 1070 | |||
| 1071 | * keymap.c (Fkey_description): Doc fix (Bug#9700). | ||
| 1072 | |||
| 1073 | * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452). | ||
| 1074 | |||
| 1075 | 2012-03-10 Chong Yidong <cyd@gnu.org> | ||
| 1076 | |||
| 1077 | * frame.c (other_visible_frames): Don't assume the selected frame | ||
| 1078 | is visible (Bug#10955). | ||
| 1079 | |||
| 1080 | 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 1081 | |||
| 1082 | * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830). | ||
| 1083 | |||
| 1084 | 2012-03-08 Jan Djärv <jan.h.d@swipnet.se> | ||
| 1085 | |||
| 1086 | * gtkutil.c (x_wm_set_size_hint): Use one row in call to | ||
| 1087 | FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than | ||
| 1088 | zero (Bug#10954). | ||
| 1089 | |||
| 1090 | 2012-03-03 Glenn Morris <rgm@gnu.org> | ||
| 1091 | |||
| 1092 | * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes. | ||
| 1093 | |||
| 1094 | 2012-03-02 Eli Zaretskii <eliz@gnu.org> | ||
| 1095 | |||
| 1096 | * xdisp.c (try_window_reusing_current_matrix): Don't move cursor | ||
| 1097 | position past the first glyph_row that ends at ZV. (Bug#10902) | ||
| 1098 | (redisplay_window, next_element_from_string): Fix typos in | ||
| 1099 | comments. | ||
| 1100 | (redisplay_window): Pass to move_it_vertically the margin in | ||
| 1101 | pixels, not in screen lines. | ||
| 1102 | |||
| 1103 | 2012-03-02 Glenn Morris <rgm@gnu.org> | ||
| 1104 | |||
| 1105 | * buffer.c (buffer-list-update-hook): Doc fix. | ||
| 1106 | |||
| 791 | 2012-02-29 Eli Zaretskii <eliz@gnu.org> | 1107 | 2012-02-29 Eli Zaretskii <eliz@gnu.org> |
| 792 | 1108 | ||
| 793 | * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call | 1109 | * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call |
| @@ -968,8 +1284,8 @@ | |||
| 968 | 1284 | ||
| 969 | 2012-02-04 Eli Zaretskii <eliz@gnu.org> | 1285 | 2012-02-04 Eli Zaretskii <eliz@gnu.org> |
| 970 | 1286 | ||
| 971 | * w32.c (get_emacs_configuration_options): Include | 1287 | * w32.c (get_emacs_configuration_options): |
| 972 | --enable-checking, if specified, in the return value. | 1288 | Include --enable-checking, if specified, in the return value. |
| 973 | 1289 | ||
| 974 | 2012-02-04 Martin Rudalics <rudalics@gmx.at> | 1290 | 2012-02-04 Martin Rudalics <rudalics@gmx.at> |
| 975 | 1291 | ||
| @@ -1075,8 +1391,8 @@ | |||
| 1075 | 2012-01-19 Martin Rudalics <rudalics@gmx.at> | 1391 | 2012-01-19 Martin Rudalics <rudalics@gmx.at> |
| 1076 | 1392 | ||
| 1077 | * window.c (save_window_save, Fcurrent_window_configuration) | 1393 | * window.c (save_window_save, Fcurrent_window_configuration) |
| 1078 | (Vwindow_persistent_parameters): Do not use Qstate. Rewrite | 1394 | (Vwindow_persistent_parameters): Do not use Qstate. |
| 1079 | doc-strings. | 1395 | Rewrite doc-strings. |
| 1080 | 1396 | ||
| 1081 | 2012-01-19 Kenichi Handa <handa@m17n.org> | 1397 | 2012-01-19 Kenichi Handa <handa@m17n.org> |
| 1082 | 1398 | ||
| @@ -1250,9 +1566,9 @@ | |||
| 1250 | * nsselect.m (CUT_BUFFER_SUPPORT): Remove define. | 1566 | * nsselect.m (CUT_BUFFER_SUPPORT): Remove define. |
| 1251 | (symbol_to_nsstring): Fix indentation. | 1567 | (symbol_to_nsstring): Fix indentation. |
| 1252 | (ns_symbol_to_pb): New function. | 1568 | (ns_symbol_to_pb): New function. |
| 1253 | (Fns_get_selection_internal): Renamed from Fns_get_cut_buffer_internal. | 1569 | (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal. |
| 1254 | (Fns_rotate_cut_buffers_internal): Removed. | 1570 | (Fns_rotate_cut_buffers_internal): Remove. |
| 1255 | (Fns_store_selection_internal): Renamed from | 1571 | (Fns_store_selection_internal): Rename from |
| 1256 | Fns_store_cut_buffer_internal. | 1572 | Fns_store_cut_buffer_internal. |
| 1257 | (ns_get_foreign_selection, Fx_own_selection_internal) | 1573 | (ns_get_foreign_selection, Fx_own_selection_internal) |
| 1258 | (Fx_disown_selection_internal, Fx_selection_exists_p) | 1574 | (Fx_disown_selection_internal, Fx_selection_exists_p) |
| @@ -1393,7 +1709,7 @@ | |||
| 1393 | (coding_set_destination): Return how many bytes | 1709 | (coding_set_destination): Return how many bytes |
| 1394 | coding->destination was relocated. | 1710 | coding->destination was relocated. |
| 1395 | (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET) | 1711 | (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET) |
| 1396 | (CODING_CHAR_CHARSET_P): Adjusted for the avove changes. | 1712 | (CODING_CHAR_CHARSET_P): Adjust for the avove changes. |
| 1397 | 1713 | ||
| 1398 | 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change) | 1714 | 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change) |
| 1399 | 1715 | ||
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11 index 2e5404779b1..97d5a65281a 100644 --- a/src/ChangeLog.11 +++ b/src/ChangeLog.11 | |||
| @@ -9627,7 +9627,7 @@ | |||
| 9627 | * frame.c (Vdefault_frame_scroll_bars): Put non-GTK X scroll-bars | 9627 | * frame.c (Vdefault_frame_scroll_bars): Put non-GTK X scroll-bars |
| 9628 | on left. | 9628 | on left. |
| 9629 | 9629 | ||
| 9630 | 2010-03-13 Andreas Politz <politza@fh-trier.de> (tiny change) | 9630 | 2010-03-13 Andreas Politz <politza@fh-trier.de> |
| 9631 | 9631 | ||
| 9632 | * editfns.c (Fformat): Account for string precision when computing | 9632 | * editfns.c (Fformat): Account for string precision when computing |
| 9633 | field width (Bug#5710). | 9633 | field width (Bug#5710). |
diff --git a/src/Makefile.in b/src/Makefile.in index 035ea277454..a90fd5841e4 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -49,6 +49,7 @@ lispsource = $(srcdir)/../lisp | |||
| 49 | lib = ../lib | 49 | lib = ../lib |
| 50 | libsrc = ../lib-src | 50 | libsrc = ../lib-src |
| 51 | etc = ../etc | 51 | etc = ../etc |
| 52 | leimdir = ../leim | ||
| 52 | oldXMenudir = ../oldXMenu | 53 | oldXMenudir = ../oldXMenu |
| 53 | lwlibdir = ../lwlib | 54 | lwlibdir = ../lwlib |
| 54 | lispdir = ../lisp | 55 | lispdir = ../lisp |
| @@ -393,13 +394,16 @@ LIBES = $(LIBS) $(LIBX_BASE) $(LIBX_OTHER) $(LIBSOUND) \ | |||
| 393 | 394 | ||
| 394 | all: emacs$(EXEEXT) $(OTHER_FILES) | 395 | all: emacs$(EXEEXT) $(OTHER_FILES) |
| 395 | 396 | ||
| 397 | $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT) | ||
| 398 | cd $(leimdir) && $(MAKE) $(MFLAGS) leim-list.el EMACS=$(bootstrap_exe) | ||
| 399 | |||
| 396 | ## Does anyone ever pay attention to the load-path-shadows output here? | 400 | ## Does anyone ever pay attention to the load-path-shadows output here? |
| 397 | ## The dumped Emacs is as functional and more efficient than | 401 | ## The dumped Emacs is as functional and more efficient than |
| 398 | ## bootstrap-emacs, so we replace the latter with the former. | 402 | ## bootstrap-emacs, so we replace the latter with the former. |
| 399 | ## Strictly speaking, emacs does not depend directly on all of $lisp, | 403 | ## Strictly speaking, emacs does not depend directly on all of $lisp, |
| 400 | ## since not all pieces are used on all platforms. But DOC depends | 404 | ## since not all pieces are used on all platforms. But DOC depends |
| 401 | ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here. | 405 | ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here. |
| 402 | emacs$(EXEEXT): temacs$(EXEEXT) $(etc)/DOC $(lisp) | 406 | emacs$(EXEEXT): temacs$(EXEEXT) $(etc)/DOC $(lisp) $(leimdir)/leim-list.el |
| 403 | if test "$(CANNOT_DUMP)" = "yes"; then \ | 407 | if test "$(CANNOT_DUMP)" = "yes"; then \ |
| 404 | ln -f temacs$(EXEEXT) emacs$(EXEEXT); \ | 408 | ln -f temacs$(EXEEXT) emacs$(EXEEXT); \ |
| 405 | EMACSLOADPATH=$(lispsource) ./emacs -batch \ | 409 | EMACSLOADPATH=$(lispsource) ./emacs -batch \ |
diff --git a/src/alloc.c b/src/alloc.c index 6e4cfa07fa0..27118c91c9c 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2012 | 2 | |
| 3 | Free Software Foundation, Inc. | 3 | Copyright (C) 1985-1986, 1988, 1993-1995, 1997-2012 |
| 4 | Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -4251,23 +4252,38 @@ mark_maybe_pointer (void *p) | |||
| 4251 | } | 4252 | } |
| 4252 | 4253 | ||
| 4253 | 4254 | ||
| 4254 | /* Alignment of Lisp_Object and pointer values. Use offsetof, as it | 4255 | /* Alignment of pointer values. Use offsetof, as it sometimes returns |
| 4255 | sometimes returns a smaller alignment than GCC's __alignof__ and | 4256 | a smaller alignment than GCC's __alignof__ and mark_memory might |
| 4256 | mark_memory might miss objects if __alignof__ were used. For | 4257 | miss objects if __alignof__ were used. */ |
| 4257 | example, on x86 with WIDE_EMACS_INT, __alignof__ (Lisp_Object) is 8 | ||
| 4258 | but GC_LISP_OBJECT_ALIGNMENT should be 4. */ | ||
| 4259 | #ifndef GC_LISP_OBJECT_ALIGNMENT | ||
| 4260 | # define GC_LISP_OBJECT_ALIGNMENT offsetof (struct {char a; Lisp_Object b;}, b) | ||
| 4261 | #endif | ||
| 4262 | #define GC_POINTER_ALIGNMENT offsetof (struct {char a; void *b;}, b) | 4258 | #define GC_POINTER_ALIGNMENT offsetof (struct {char a; void *b;}, b) |
| 4263 | 4259 | ||
| 4260 | /* Define POINTERS_MIGHT_HIDE_IN_OBJECTS to 1 if marking via C pointers does | ||
| 4261 | not suffice, which is the typical case. A host where a Lisp_Object is | ||
| 4262 | wider than a pointer might allocate a Lisp_Object in non-adjacent halves. | ||
| 4263 | If USE_LSB_TAG, the bottom half is not a valid pointer, but it should | ||
| 4264 | suffice to widen it to to a Lisp_Object and check it that way. */ | ||
| 4265 | #if defined USE_LSB_TAG || UINTPTR_MAX >> VALBITS != 0 | ||
| 4266 | # if !defined USE_LSB_TAG && UINTPTR_MAX >> VALBITS >> GCTYPEBITS != 0 | ||
| 4267 | /* If tag bits straddle pointer-word boundaries, neither mark_maybe_pointer | ||
| 4268 | nor mark_maybe_object can follow the pointers. This should not occur on | ||
| 4269 | any practical porting target. */ | ||
| 4270 | # error "MSB type bits straddle pointer-word boundaries" | ||
| 4271 | # endif | ||
| 4272 | /* Marking via C pointers does not suffice, because Lisp_Objects contain | ||
| 4273 | pointer words that hold pointers ORed with type bits. */ | ||
| 4274 | # define POINTERS_MIGHT_HIDE_IN_OBJECTS 1 | ||
| 4275 | #else | ||
| 4276 | /* Marking via C pointers suffices, because Lisp_Objects contain pointer | ||
| 4277 | words that hold unmodified pointers. */ | ||
| 4278 | # define POINTERS_MIGHT_HIDE_IN_OBJECTS 0 | ||
| 4279 | #endif | ||
| 4280 | |||
| 4264 | /* Mark Lisp objects referenced from the address range START+OFFSET..END | 4281 | /* Mark Lisp objects referenced from the address range START+OFFSET..END |
| 4265 | or END+OFFSET..START. */ | 4282 | or END+OFFSET..START. */ |
| 4266 | 4283 | ||
| 4267 | static void | 4284 | static void |
| 4268 | mark_memory (void *start, void *end) | 4285 | mark_memory (void *start, void *end) |
| 4269 | { | 4286 | { |
| 4270 | Lisp_Object *p; | ||
| 4271 | void **pp; | 4287 | void **pp; |
| 4272 | int i; | 4288 | int i; |
| 4273 | 4289 | ||
| @@ -4284,11 +4300,6 @@ mark_memory (void *start, void *end) | |||
| 4284 | end = tem; | 4300 | end = tem; |
| 4285 | } | 4301 | } |
| 4286 | 4302 | ||
| 4287 | /* Mark Lisp_Objects. */ | ||
| 4288 | for (p = start; (void *) p < end; p++) | ||
| 4289 | for (i = 0; i < sizeof *p; i += GC_LISP_OBJECT_ALIGNMENT) | ||
| 4290 | mark_maybe_object (*(Lisp_Object *) ((char *) p + i)); | ||
| 4291 | |||
| 4292 | /* Mark Lisp data pointed to. This is necessary because, in some | 4303 | /* Mark Lisp data pointed to. This is necessary because, in some |
| 4293 | situations, the C compiler optimizes Lisp objects away, so that | 4304 | situations, the C compiler optimizes Lisp objects away, so that |
| 4294 | only a pointer to them remains. Example: | 4305 | only a pointer to them remains. Example: |
| @@ -4310,17 +4321,10 @@ mark_memory (void *start, void *end) | |||
| 4310 | for (pp = start; (void *) pp < end; pp++) | 4321 | for (pp = start; (void *) pp < end; pp++) |
| 4311 | for (i = 0; i < sizeof *pp; i += GC_POINTER_ALIGNMENT) | 4322 | for (i = 0; i < sizeof *pp; i += GC_POINTER_ALIGNMENT) |
| 4312 | { | 4323 | { |
| 4313 | void *w = *(void **) ((char *) pp + i); | 4324 | void *p = *(void **) ((char *) pp + i); |
| 4314 | mark_maybe_pointer (w); | 4325 | mark_maybe_pointer (p); |
| 4315 | 4326 | if (POINTERS_MIGHT_HIDE_IN_OBJECTS) | |
| 4316 | #ifdef USE_LSB_TAG | 4327 | mark_maybe_object (widen_to_Lisp_Object (p)); |
| 4317 | /* A host where a Lisp_Object is wider than a pointer might | ||
| 4318 | allocate a Lisp_Object in non-adjacent halves. If | ||
| 4319 | USE_LSB_TAG, the bottom half is not a valid pointer, so | ||
| 4320 | widen it to to a Lisp_Object and check it that way. */ | ||
| 4321 | if (sizeof w < sizeof (Lisp_Object)) | ||
| 4322 | mark_maybe_object (widen_to_Lisp_Object (w)); | ||
| 4323 | #endif | ||
| 4324 | } | 4328 | } |
| 4325 | } | 4329 | } |
| 4326 | 4330 | ||
| @@ -5011,11 +5015,12 @@ Garbage collection happens automatically if you cons more than | |||
| 5011 | `gc-cons-threshold' bytes of Lisp data since previous garbage collection. | 5015 | `gc-cons-threshold' bytes of Lisp data since previous garbage collection. |
| 5012 | `garbage-collect' normally returns a list with info on amount of space in use: | 5016 | `garbage-collect' normally returns a list with info on amount of space in use: |
| 5013 | ((USED-CONSES . FREE-CONSES) (USED-SYMS . FREE-SYMS) | 5017 | ((USED-CONSES . FREE-CONSES) (USED-SYMS . FREE-SYMS) |
| 5014 | (USED-MARKERS . FREE-MARKERS) USED-STRING-CHARS USED-VECTOR-SLOTS | 5018 | (USED-MISCS . FREE-MISCS) USED-STRING-CHARS USED-VECTOR-SLOTS |
| 5015 | (USED-FLOATS . FREE-FLOATS) (USED-INTERVALS . FREE-INTERVALS) | 5019 | (USED-FLOATS . FREE-FLOATS) (USED-INTERVALS . FREE-INTERVALS) |
| 5016 | (USED-STRINGS . FREE-STRINGS)) | 5020 | (USED-STRINGS . FREE-STRINGS)) |
| 5017 | However, if there was overflow in pure space, `garbage-collect' | 5021 | However, if there was overflow in pure space, `garbage-collect' |
| 5018 | returns nil, because real GC can't be done. */) | 5022 | returns nil, because real GC can't be done. |
| 5023 | See Info node `(elisp)Garbage Collection'. */) | ||
| 5019 | (void) | 5024 | (void) |
| 5020 | { | 5025 | { |
| 5021 | register struct specbinding *bind; | 5026 | register struct specbinding *bind; |
| @@ -6409,7 +6414,7 @@ void | |||
| 6409 | syms_of_alloc (void) | 6414 | syms_of_alloc (void) |
| 6410 | { | 6415 | { |
| 6411 | DEFVAR_INT ("gc-cons-threshold", gc_cons_threshold, | 6416 | DEFVAR_INT ("gc-cons-threshold", gc_cons_threshold, |
| 6412 | doc: /* *Number of bytes of consing between garbage collections. | 6417 | doc: /* Number of bytes of consing between garbage collections. |
| 6413 | Garbage collection can happen automatically once this many bytes have been | 6418 | Garbage collection can happen automatically once this many bytes have been |
| 6414 | allocated since the last garbage collection. All data types count. | 6419 | allocated since the last garbage collection. All data types count. |
| 6415 | 6420 | ||
| @@ -6420,7 +6425,7 @@ prevent garbage collection during a part of the program. | |||
| 6420 | See also `gc-cons-percentage'. */); | 6425 | See also `gc-cons-percentage'. */); |
| 6421 | 6426 | ||
| 6422 | DEFVAR_LISP ("gc-cons-percentage", Vgc_cons_percentage, | 6427 | DEFVAR_LISP ("gc-cons-percentage", Vgc_cons_percentage, |
| 6423 | doc: /* *Portion of the heap used for allocation. | 6428 | doc: /* Portion of the heap used for allocation. |
| 6424 | Garbage collection can happen automatically once this portion of the heap | 6429 | Garbage collection can happen automatically once this portion of the heap |
| 6425 | has been allocated since the last garbage collection. | 6430 | has been allocated since the last garbage collection. |
| 6426 | If this portion is smaller than `gc-cons-threshold', this is ignored. */); | 6431 | If this portion is smaller than `gc-cons-threshold', this is ignored. */); |
| @@ -6445,7 +6450,9 @@ If this portion is smaller than `gc-cons-threshold', this is ignored. */); | |||
| 6445 | doc: /* Number of string characters that have been consed so far. */); | 6450 | doc: /* Number of string characters that have been consed so far. */); |
| 6446 | 6451 | ||
| 6447 | DEFVAR_INT ("misc-objects-consed", misc_objects_consed, | 6452 | DEFVAR_INT ("misc-objects-consed", misc_objects_consed, |
| 6448 | doc: /* Number of miscellaneous objects that have been consed so far. */); | 6453 | doc: /* Number of miscellaneous objects that have been consed so far. |
| 6454 | These include markers and overlays, plus certain objects not visible | ||
| 6455 | to users. */); | ||
| 6449 | 6456 | ||
| 6450 | DEFVAR_INT ("intervals-consed", intervals_consed, | 6457 | DEFVAR_INT ("intervals-consed", intervals_consed, |
| 6451 | doc: /* Number of intervals that have been consed so far. */); | 6458 | doc: /* Number of intervals that have been consed so far. */); |
diff --git a/src/bidi.c b/src/bidi.c index 99936d93e4f..6c9dcd2a2b9 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -932,6 +932,7 @@ bidi_fetch_char (ptrdiff_t bytepos, ptrdiff_t charpos, ptrdiff_t *disp_pos, | |||
| 932 | ptrdiff_t endpos | 932 | ptrdiff_t endpos |
| 933 | = (string->s || STRINGP (string->lstring)) ? string->schars : ZV; | 933 | = (string->s || STRINGP (string->lstring)) ? string->schars : ZV; |
| 934 | struct text_pos pos; | 934 | struct text_pos pos; |
| 935 | int len; | ||
| 935 | 936 | ||
| 936 | /* If we got past the last known position of display string, compute | 937 | /* If we got past the last known position of display string, compute |
| 937 | the position of the next one. That position could be at CHARPOS. */ | 938 | the position of the next one. That position could be at CHARPOS. */ |
| @@ -1003,7 +1004,6 @@ bidi_fetch_char (ptrdiff_t bytepos, ptrdiff_t charpos, ptrdiff_t *disp_pos, | |||
| 1003 | normal_char: | 1004 | normal_char: |
| 1004 | if (string->s) | 1005 | if (string->s) |
| 1005 | { | 1006 | { |
| 1006 | int len; | ||
| 1007 | 1007 | ||
| 1008 | if (!string->unibyte) | 1008 | if (!string->unibyte) |
| 1009 | { | 1009 | { |
| @@ -1018,8 +1018,6 @@ bidi_fetch_char (ptrdiff_t bytepos, ptrdiff_t charpos, ptrdiff_t *disp_pos, | |||
| 1018 | } | 1018 | } |
| 1019 | else if (STRINGP (string->lstring)) | 1019 | else if (STRINGP (string->lstring)) |
| 1020 | { | 1020 | { |
| 1021 | int len; | ||
| 1022 | |||
| 1023 | if (!string->unibyte) | 1021 | if (!string->unibyte) |
| 1024 | { | 1022 | { |
| 1025 | ch = STRING_CHAR_AND_LENGTH (SDATA (string->lstring) + bytepos, | 1023 | ch = STRING_CHAR_AND_LENGTH (SDATA (string->lstring) + bytepos, |
| @@ -1034,8 +1032,8 @@ bidi_fetch_char (ptrdiff_t bytepos, ptrdiff_t charpos, ptrdiff_t *disp_pos, | |||
| 1034 | } | 1032 | } |
| 1035 | else | 1033 | else |
| 1036 | { | 1034 | { |
| 1037 | ch = FETCH_MULTIBYTE_CHAR (bytepos); | 1035 | ch = STRING_CHAR_AND_LENGTH (BYTE_POS_ADDR (bytepos), len); |
| 1038 | *ch_len = CHAR_BYTES (ch); | 1036 | *ch_len = len; |
| 1039 | } | 1037 | } |
| 1040 | *nchars = 1; | 1038 | *nchars = 1; |
| 1041 | } | 1039 | } |
diff --git a/src/buffer.c b/src/buffer.c index acee3c45158..8cb68317bed 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Buffer manipulation primitives for GNU Emacs. | 1 | /* Buffer manipulation primitives for GNU Emacs. |
| 2 | 2 | ||
| 3 | Copyright (C) 1985-1989, 1993-1995, 1997-2012 Free Software Foundation, Inc. | 3 | Copyright (C) 1985-1989, 1993-1995, 1997-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -128,7 +128,6 @@ static Lisp_Object Qchange_major_mode_hook; | |||
| 128 | Lisp_Object Qfirst_change_hook; | 128 | Lisp_Object Qfirst_change_hook; |
| 129 | Lisp_Object Qbefore_change_functions; | 129 | Lisp_Object Qbefore_change_functions; |
| 130 | Lisp_Object Qafter_change_functions; | 130 | Lisp_Object Qafter_change_functions; |
| 131 | static Lisp_Object Qucs_set_table_for_input; | ||
| 132 | 131 | ||
| 133 | static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; | 132 | static Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local; |
| 134 | static Lisp_Object Qpermanent_local_hook; | 133 | static Lisp_Object Qpermanent_local_hook; |
| @@ -402,13 +401,6 @@ even if it is dead. The return value is never nil. */) | |||
| 402 | if (!NILP (Vrun_hooks)) | 401 | if (!NILP (Vrun_hooks)) |
| 403 | call1 (Vrun_hooks, Qbuffer_list_update_hook); | 402 | call1 (Vrun_hooks, Qbuffer_list_update_hook); |
| 404 | 403 | ||
| 405 | /* An error in calling the function here (should someone redefine it) | ||
| 406 | can lead to infinite regress until you run out of stack. rms | ||
| 407 | says that's not worth protecting against. */ | ||
| 408 | if (!NILP (Ffboundp (Qucs_set_table_for_input))) | ||
| 409 | /* buffer is on buffer-alist, so no gcpro. */ | ||
| 410 | call1 (Qucs_set_table_for_input, buffer); | ||
| 411 | |||
| 412 | return buffer; | 404 | return buffer; |
| 413 | } | 405 | } |
| 414 | 406 | ||
| @@ -1717,7 +1709,7 @@ record_buffer (Lisp_Object buffer) | |||
| 1717 | /* Move BUFFER to the end of the buffer (a)lists. Do nothing if the | 1709 | /* Move BUFFER to the end of the buffer (a)lists. Do nothing if the |
| 1718 | buffer is killed. For the selected frame's buffer list this moves | 1710 | buffer is killed. For the selected frame's buffer list this moves |
| 1719 | BUFFER to its end even if it was never shown in that frame. If | 1711 | BUFFER to its end even if it was never shown in that frame. If |
| 1720 | this happens we have a feature, hence `unrecord-buffer' should be | 1712 | this happens we have a feature, hence `bury-buffer-internal' should be |
| 1721 | called only when BUFFER was shown in the selected frame. */ | 1713 | called only when BUFFER was shown in the selected frame. */ |
| 1722 | 1714 | ||
| 1723 | DEFUN ("bury-buffer-internal", Fbury_buffer_internal, Sbury_buffer_internal, | 1715 | DEFUN ("bury-buffer-internal", Fbury_buffer_internal, Sbury_buffer_internal, |
| @@ -2863,6 +2855,12 @@ compare_overlays (const void *v1, const void *v2) | |||
| 2863 | return s1->beg < s2->beg ? -1 : 1; | 2855 | return s1->beg < s2->beg ? -1 : 1; |
| 2864 | if (s1->end != s2->end) | 2856 | if (s1->end != s2->end) |
| 2865 | return s2->end < s1->end ? -1 : 1; | 2857 | return s2->end < s1->end ? -1 : 1; |
| 2858 | /* Avoid the non-determinism of qsort by choosing an arbitrary ordering | ||
| 2859 | between "equal" overlays. The result can still change between | ||
| 2860 | invocations of Emacs, but it won't change in the middle of | ||
| 2861 | `find_field' (bug#6830). */ | ||
| 2862 | if (XHASH (s1->overlay) != XHASH (s2->overlay)) | ||
| 2863 | return XHASH (s1->overlay) < XHASH (s2->overlay) ? -1 : 1; | ||
| 2866 | return 0; | 2864 | return 0; |
| 2867 | } | 2865 | } |
| 2868 | 2866 | ||
| @@ -5036,8 +5034,6 @@ init_buffer_once (void) | |||
| 5036 | Qkill_buffer_hook = intern_c_string ("kill-buffer-hook"); | 5034 | Qkill_buffer_hook = intern_c_string ("kill-buffer-hook"); |
| 5037 | Fput (Qkill_buffer_hook, Qpermanent_local, Qt); | 5035 | Fput (Qkill_buffer_hook, Qpermanent_local, Qt); |
| 5038 | 5036 | ||
| 5039 | Qucs_set_table_for_input = intern_c_string ("ucs-set-table-for-input"); | ||
| 5040 | |||
| 5041 | /* super-magic invisible buffer */ | 5037 | /* super-magic invisible buffer */ |
| 5042 | Vprin1_to_string_buffer = Fget_buffer_create (make_pure_c_string (" prin1")); | 5038 | Vprin1_to_string_buffer = Fget_buffer_create (make_pure_c_string (" prin1")); |
| 5043 | Vbuffer_alist = Qnil; | 5039 | Vbuffer_alist = Qnil; |
| @@ -5193,9 +5189,6 @@ syms_of_buffer (void) | |||
| 5193 | DEFSYM (Qafter_change_functions, "after-change-functions"); | 5189 | DEFSYM (Qafter_change_functions, "after-change-functions"); |
| 5194 | DEFSYM (Qkill_buffer_query_functions, "kill-buffer-query-functions"); | 5190 | DEFSYM (Qkill_buffer_query_functions, "kill-buffer-query-functions"); |
| 5195 | 5191 | ||
| 5196 | /* The next one is initialized in init_buffer_once. */ | ||
| 5197 | staticpro (&Qucs_set_table_for_input); | ||
| 5198 | |||
| 5199 | Fput (Qprotected_field, Qerror_conditions, | 5192 | Fput (Qprotected_field, Qerror_conditions, |
| 5200 | pure_cons (Qprotected_field, pure_cons (Qerror, Qnil))); | 5193 | pure_cons (Qprotected_field, pure_cons (Qerror, Qnil))); |
| 5201 | Fput (Qprotected_field, Qerror_message, | 5194 | Fput (Qprotected_field, Qerror_message, |
| @@ -5237,7 +5230,7 @@ This is the same as (default-value 'ctl-arrow). */); | |||
| 5237 | 5230 | ||
| 5238 | DEFVAR_BUFFER_DEFAULTS ("default-enable-multibyte-characters", | 5231 | DEFVAR_BUFFER_DEFAULTS ("default-enable-multibyte-characters", |
| 5239 | enable_multibyte_characters, | 5232 | enable_multibyte_characters, |
| 5240 | doc: /* *Default value of `enable-multibyte-characters' for buffers not overriding it. | 5233 | doc: /* Default value of `enable-multibyte-characters' for buffers not overriding it. |
| 5241 | This is the same as (default-value 'enable-multibyte-characters). */); | 5234 | This is the same as (default-value 'enable-multibyte-characters). */); |
| 5242 | 5235 | ||
| 5243 | DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-coding-system", | 5236 | DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-coding-system", |
| @@ -5399,7 +5392,7 @@ A string is printed verbatim in the mode line except for %-constructs: | |||
| 5399 | Decimal digits after the % specify field width to which to pad. */); | 5392 | Decimal digits after the % specify field width to which to pad. */); |
| 5400 | 5393 | ||
| 5401 | DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode, | 5394 | DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode, |
| 5402 | doc: /* *Value of `major-mode' for new buffers. */); | 5395 | doc: /* Value of `major-mode' for new buffers. */); |
| 5403 | 5396 | ||
| 5404 | DEFVAR_PER_BUFFER ("major-mode", &BVAR (current_buffer, major_mode), | 5397 | DEFVAR_PER_BUFFER ("major-mode", &BVAR (current_buffer, major_mode), |
| 5405 | make_number (Lisp_Symbol), | 5398 | make_number (Lisp_Symbol), |
| @@ -5430,25 +5423,25 @@ Use the command `abbrev-mode' to change this variable. */); | |||
| 5430 | 5423 | ||
| 5431 | DEFVAR_PER_BUFFER ("case-fold-search", &BVAR (current_buffer, case_fold_search), | 5424 | DEFVAR_PER_BUFFER ("case-fold-search", &BVAR (current_buffer, case_fold_search), |
| 5432 | Qnil, | 5425 | Qnil, |
| 5433 | doc: /* *Non-nil if searches and matches should ignore case. */); | 5426 | doc: /* Non-nil if searches and matches should ignore case. */); |
| 5434 | 5427 | ||
| 5435 | DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column), | 5428 | DEFVAR_PER_BUFFER ("fill-column", &BVAR (current_buffer, fill_column), |
| 5436 | make_number (LISP_INT_TAG), | 5429 | make_number (LISP_INT_TAG), |
| 5437 | doc: /* *Column beyond which automatic line-wrapping should happen. | 5430 | doc: /* Column beyond which automatic line-wrapping should happen. |
| 5438 | Interactively, you can set the buffer local value using \\[set-fill-column]. */); | 5431 | Interactively, you can set the buffer local value using \\[set-fill-column]. */); |
| 5439 | 5432 | ||
| 5440 | DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin), | 5433 | DEFVAR_PER_BUFFER ("left-margin", &BVAR (current_buffer, left_margin), |
| 5441 | make_number (LISP_INT_TAG), | 5434 | make_number (LISP_INT_TAG), |
| 5442 | doc: /* *Column for the default `indent-line-function' to indent to. | 5435 | doc: /* Column for the default `indent-line-function' to indent to. |
| 5443 | Linefeed indents to this column in Fundamental mode. */); | 5436 | Linefeed indents to this column in Fundamental mode. */); |
| 5444 | 5437 | ||
| 5445 | DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width), | 5438 | DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width), |
| 5446 | make_number (LISP_INT_TAG), | 5439 | make_number (LISP_INT_TAG), |
| 5447 | doc: /* *Distance between tab stops (for display of tab characters), in columns. | 5440 | doc: /* Distance between tab stops (for display of tab characters), in columns. |
| 5448 | This should be an integer greater than zero. */); | 5441 | This should be an integer greater than zero. */); |
| 5449 | 5442 | ||
| 5450 | DEFVAR_PER_BUFFER ("ctl-arrow", &BVAR (current_buffer, ctl_arrow), Qnil, | 5443 | DEFVAR_PER_BUFFER ("ctl-arrow", &BVAR (current_buffer, ctl_arrow), Qnil, |
| 5451 | doc: /* *Non-nil means display control chars with uparrow. | 5444 | doc: /* Non-nil means display control chars with uparrow. |
| 5452 | A value of nil means use backslash and octal digits. | 5445 | A value of nil means use backslash and octal digits. |
| 5453 | This variable does not apply to characters whose display is specified | 5446 | This variable does not apply to characters whose display is specified |
| 5454 | in the current display table (if there is one). */); | 5447 | in the current display table (if there is one). */); |
| @@ -5489,7 +5482,7 @@ This variable is never applied to a way of decoding a file while reading it. */ | |||
| 5489 | 5482 | ||
| 5490 | DEFVAR_PER_BUFFER ("bidi-paragraph-direction", | 5483 | DEFVAR_PER_BUFFER ("bidi-paragraph-direction", |
| 5491 | &BVAR (current_buffer, bidi_paragraph_direction), Qnil, | 5484 | &BVAR (current_buffer, bidi_paragraph_direction), Qnil, |
| 5492 | doc: /* *If non-nil, forces directionality of text paragraphs in the buffer. | 5485 | doc: /* If non-nil, forces directionality of text paragraphs in the buffer. |
| 5493 | 5486 | ||
| 5494 | If this is nil (the default), the direction of each paragraph is | 5487 | If this is nil (the default), the direction of each paragraph is |
| 5495 | determined by the first strong directional character of its text. | 5488 | determined by the first strong directional character of its text. |
| @@ -5500,7 +5493,7 @@ This variable has no effect unless the buffer's value of | |||
| 5500 | \`bidi-display-reordering' is non-nil. */); | 5493 | \`bidi-display-reordering' is non-nil. */); |
| 5501 | 5494 | ||
| 5502 | DEFVAR_PER_BUFFER ("truncate-lines", &BVAR (current_buffer, truncate_lines), Qnil, | 5495 | DEFVAR_PER_BUFFER ("truncate-lines", &BVAR (current_buffer, truncate_lines), Qnil, |
| 5503 | doc: /* *Non-nil means do not display continuation lines. | 5496 | doc: /* Non-nil means do not display continuation lines. |
| 5504 | Instead, give each line of text just one screen line. | 5497 | Instead, give each line of text just one screen line. |
| 5505 | 5498 | ||
| 5506 | Note that this is overridden by the variable | 5499 | Note that this is overridden by the variable |
| @@ -5510,7 +5503,7 @@ and this buffer is not full-frame width. | |||
| 5510 | Minibuffers set this variable to nil. */); | 5503 | Minibuffers set this variable to nil. */); |
| 5511 | 5504 | ||
| 5512 | DEFVAR_PER_BUFFER ("word-wrap", &BVAR (current_buffer, word_wrap), Qnil, | 5505 | DEFVAR_PER_BUFFER ("word-wrap", &BVAR (current_buffer, word_wrap), Qnil, |
| 5513 | doc: /* *Non-nil means to use word-wrapping for continuation lines. | 5506 | doc: /* Non-nil means to use word-wrapping for continuation lines. |
| 5514 | When word-wrapping is on, continuation lines are wrapped at the space | 5507 | When word-wrapping is on, continuation lines are wrapped at the space |
| 5515 | or tab character nearest to the right window edge. | 5508 | or tab character nearest to the right window edge. |
| 5516 | If nil, continuation lines are wrapped at the right screen edge. | 5509 | If nil, continuation lines are wrapped at the right screen edge. |
| @@ -5631,39 +5624,39 @@ See also the functions `display-table-slot' and `set-display-table-slot'. */); | |||
| 5631 | 5624 | ||
| 5632 | DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols), | 5625 | DEFVAR_PER_BUFFER ("left-margin-width", &BVAR (current_buffer, left_margin_cols), |
| 5633 | Qnil, | 5626 | Qnil, |
| 5634 | doc: /* *Width of left marginal area for display of a buffer. | 5627 | doc: /* Width of left marginal area for display of a buffer. |
| 5635 | A value of nil means no marginal area. */); | 5628 | A value of nil means no marginal area. */); |
| 5636 | 5629 | ||
| 5637 | DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols), | 5630 | DEFVAR_PER_BUFFER ("right-margin-width", &BVAR (current_buffer, right_margin_cols), |
| 5638 | Qnil, | 5631 | Qnil, |
| 5639 | doc: /* *Width of right marginal area for display of a buffer. | 5632 | doc: /* Width of right marginal area for display of a buffer. |
| 5640 | A value of nil means no marginal area. */); | 5633 | A value of nil means no marginal area. */); |
| 5641 | 5634 | ||
| 5642 | DEFVAR_PER_BUFFER ("left-fringe-width", &BVAR (current_buffer, left_fringe_width), | 5635 | DEFVAR_PER_BUFFER ("left-fringe-width", &BVAR (current_buffer, left_fringe_width), |
| 5643 | Qnil, | 5636 | Qnil, |
| 5644 | doc: /* *Width of this buffer's left fringe (in pixels). | 5637 | doc: /* Width of this buffer's left fringe (in pixels). |
| 5645 | A value of 0 means no left fringe is shown in this buffer's window. | 5638 | A value of 0 means no left fringe is shown in this buffer's window. |
| 5646 | A value of nil means to use the left fringe width from the window's frame. */); | 5639 | A value of nil means to use the left fringe width from the window's frame. */); |
| 5647 | 5640 | ||
| 5648 | DEFVAR_PER_BUFFER ("right-fringe-width", &BVAR (current_buffer, right_fringe_width), | 5641 | DEFVAR_PER_BUFFER ("right-fringe-width", &BVAR (current_buffer, right_fringe_width), |
| 5649 | Qnil, | 5642 | Qnil, |
| 5650 | doc: /* *Width of this buffer's right fringe (in pixels). | 5643 | doc: /* Width of this buffer's right fringe (in pixels). |
| 5651 | A value of 0 means no right fringe is shown in this buffer's window. | 5644 | A value of 0 means no right fringe is shown in this buffer's window. |
| 5652 | A value of nil means to use the right fringe width from the window's frame. */); | 5645 | A value of nil means to use the right fringe width from the window's frame. */); |
| 5653 | 5646 | ||
| 5654 | DEFVAR_PER_BUFFER ("fringes-outside-margins", &BVAR (current_buffer, fringes_outside_margins), | 5647 | DEFVAR_PER_BUFFER ("fringes-outside-margins", &BVAR (current_buffer, fringes_outside_margins), |
| 5655 | Qnil, | 5648 | Qnil, |
| 5656 | doc: /* *Non-nil means to display fringes outside display margins. | 5649 | doc: /* Non-nil means to display fringes outside display margins. |
| 5657 | A value of nil means to display fringes between margins and buffer text. */); | 5650 | A value of nil means to display fringes between margins and buffer text. */); |
| 5658 | 5651 | ||
| 5659 | DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width), | 5652 | DEFVAR_PER_BUFFER ("scroll-bar-width", &BVAR (current_buffer, scroll_bar_width), |
| 5660 | Qnil, | 5653 | Qnil, |
| 5661 | doc: /* *Width of this buffer's scroll bars in pixels. | 5654 | doc: /* Width of this buffer's scroll bars in pixels. |
| 5662 | A value of nil means to use the scroll bar width from the window's frame. */); | 5655 | A value of nil means to use the scroll bar width from the window's frame. */); |
| 5663 | 5656 | ||
| 5664 | DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type), | 5657 | DEFVAR_PER_BUFFER ("vertical-scroll-bar", &BVAR (current_buffer, vertical_scroll_bar_type), |
| 5665 | Qnil, | 5658 | Qnil, |
| 5666 | doc: /* *Position of this buffer's vertical scroll bar. | 5659 | doc: /* Position of this buffer's vertical scroll bar. |
| 5667 | The value takes effect whenever you tell a window to display this buffer; | 5660 | The value takes effect whenever you tell a window to display this buffer; |
| 5668 | for instance, with `set-window-buffer' or when `display-buffer' displays it. | 5661 | for instance, with `set-window-buffer' or when `display-buffer' displays it. |
| 5669 | 5662 | ||
| @@ -5673,13 +5666,13 @@ A value of t (the default) means do whatever the window's frame specifies. */); | |||
| 5673 | 5666 | ||
| 5674 | DEFVAR_PER_BUFFER ("indicate-empty-lines", | 5667 | DEFVAR_PER_BUFFER ("indicate-empty-lines", |
| 5675 | &BVAR (current_buffer, indicate_empty_lines), Qnil, | 5668 | &BVAR (current_buffer, indicate_empty_lines), Qnil, |
| 5676 | doc: /* *Visually indicate empty lines after the buffer end. | 5669 | doc: /* Visually indicate empty lines after the buffer end. |
| 5677 | If non-nil, a bitmap is displayed in the left fringe of a window on | 5670 | If non-nil, a bitmap is displayed in the left fringe of a window on |
| 5678 | window-systems. */); | 5671 | window-systems. */); |
| 5679 | 5672 | ||
| 5680 | DEFVAR_PER_BUFFER ("indicate-buffer-boundaries", | 5673 | DEFVAR_PER_BUFFER ("indicate-buffer-boundaries", |
| 5681 | &BVAR (current_buffer, indicate_buffer_boundaries), Qnil, | 5674 | &BVAR (current_buffer, indicate_buffer_boundaries), Qnil, |
| 5682 | doc: /* *Visually indicate buffer boundaries and scrolling. | 5675 | doc: /* Visually indicate buffer boundaries and scrolling. |
| 5683 | If non-nil, the first and last line of the buffer are marked in the fringe | 5676 | If non-nil, the first and last line of the buffer are marked in the fringe |
| 5684 | of a window on window-systems with angle bitmaps, or if the window can be | 5677 | of a window on window-systems with angle bitmaps, or if the window can be |
| 5685 | scrolled, the top and bottom line of the window are marked with up and down | 5678 | scrolled, the top and bottom line of the window are marked with up and down |
| @@ -5704,7 +5697,7 @@ fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). */); | |||
| 5704 | 5697 | ||
| 5705 | DEFVAR_PER_BUFFER ("fringe-indicator-alist", | 5698 | DEFVAR_PER_BUFFER ("fringe-indicator-alist", |
| 5706 | &BVAR (current_buffer, fringe_indicator_alist), Qnil, | 5699 | &BVAR (current_buffer, fringe_indicator_alist), Qnil, |
| 5707 | doc: /* *Mapping from logical to physical fringe indicator bitmaps. | 5700 | doc: /* Mapping from logical to physical fringe indicator bitmaps. |
| 5708 | The value is an alist where each element (INDICATOR . BITMAPS) | 5701 | The value is an alist where each element (INDICATOR . BITMAPS) |
| 5709 | specifies the fringe bitmaps used to display a specific logical | 5702 | specifies the fringe bitmaps used to display a specific logical |
| 5710 | fringe indicator. | 5703 | fringe indicator. |
| @@ -5723,7 +5716,7 @@ symbol which is used in both left and right fringes. */); | |||
| 5723 | 5716 | ||
| 5724 | DEFVAR_PER_BUFFER ("fringe-cursor-alist", | 5717 | DEFVAR_PER_BUFFER ("fringe-cursor-alist", |
| 5725 | &BVAR (current_buffer, fringe_cursor_alist), Qnil, | 5718 | &BVAR (current_buffer, fringe_cursor_alist), Qnil, |
| 5726 | doc: /* *Mapping from logical to physical fringe cursor bitmaps. | 5719 | doc: /* Mapping from logical to physical fringe cursor bitmaps. |
| 5727 | The value is an alist where each element (CURSOR . BITMAP) | 5720 | The value is an alist where each element (CURSOR . BITMAP) |
| 5728 | specifies the fringe bitmaps used to display a specific logical | 5721 | specifies the fringe bitmaps used to display a specific logical |
| 5729 | cursor type in the fringe. | 5722 | cursor type in the fringe. |
| @@ -5887,7 +5880,7 @@ set when a file is visited. */); | |||
| 5887 | 5880 | ||
| 5888 | DEFVAR_PER_BUFFER ("buffer-auto-save-file-format", | 5881 | DEFVAR_PER_BUFFER ("buffer-auto-save-file-format", |
| 5889 | &BVAR (current_buffer, auto_save_file_format), Qnil, | 5882 | &BVAR (current_buffer, auto_save_file_format), Qnil, |
| 5890 | doc: /* *Format in which to write auto-save files. | 5883 | doc: /* Format in which to write auto-save files. |
| 5891 | Should be a list of symbols naming formats that are defined in `format-alist'. | 5884 | Should be a list of symbols naming formats that are defined in `format-alist'. |
| 5892 | If it is t, which is the default, auto-save files are written in the | 5885 | If it is t, which is the default, auto-save files are written in the |
| 5893 | same format as a regular save would use. */); | 5886 | same format as a regular save would use. */); |
| @@ -5937,7 +5930,7 @@ Lisp programs may give this variable certain special values: | |||
| 5937 | Vtransient_mark_mode = Qnil; | 5930 | Vtransient_mark_mode = Qnil; |
| 5938 | 5931 | ||
| 5939 | DEFVAR_LISP ("inhibit-read-only", Vinhibit_read_only, | 5932 | DEFVAR_LISP ("inhibit-read-only", Vinhibit_read_only, |
| 5940 | doc: /* *Non-nil means disregard read-only status of buffers or characters. | 5933 | doc: /* Non-nil means disregard read-only status of buffers or characters. |
| 5941 | If the value is t, disregard `buffer-read-only' and all `read-only' | 5934 | If the value is t, disregard `buffer-read-only' and all `read-only' |
| 5942 | text properties. If the value is a list, disregard `buffer-read-only' | 5935 | text properties. If the value is a list, disregard `buffer-read-only' |
| 5943 | and disregard a `read-only' text property if the property value | 5936 | and disregard a `read-only' text property if the property value |
| @@ -5972,7 +5965,7 @@ to the default frame line height. A value of nil means add no extra space. */) | |||
| 5972 | 5965 | ||
| 5973 | DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", | 5966 | DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", |
| 5974 | &BVAR (current_buffer, cursor_in_non_selected_windows), Qnil, | 5967 | &BVAR (current_buffer, cursor_in_non_selected_windows), Qnil, |
| 5975 | doc: /* *Non-nil means show a cursor in non-selected windows. | 5968 | doc: /* Non-nil means show a cursor in non-selected windows. |
| 5976 | If nil, only shows a cursor in the selected window. | 5969 | If nil, only shows a cursor in the selected window. |
| 5977 | If t, displays a cursor related to the usual cursor type | 5970 | If t, displays a cursor related to the usual cursor type |
| 5978 | \(a solid box becomes hollow, a bar becomes a narrower bar). | 5971 | \(a solid box becomes hollow, a bar becomes a narrower bar). |
| @@ -5995,7 +5988,7 @@ The function `kill-all-local-variables' runs this before doing anything else. * | |||
| 5995 | doc: /* Hook run when the buffer list changes. | 5988 | doc: /* Hook run when the buffer list changes. |
| 5996 | Functions running this hook are `get-buffer-create', | 5989 | Functions running this hook are `get-buffer-create', |
| 5997 | `make-indirect-buffer', `rename-buffer', `kill-buffer', | 5990 | `make-indirect-buffer', `rename-buffer', `kill-buffer', |
| 5998 | `record-buffer' and `unrecord-buffer'. */); | 5991 | and `bury-buffer-internal'. */); |
| 5999 | Vbuffer_list_update_hook = Qnil; | 5992 | Vbuffer_list_update_hook = Qnil; |
| 6000 | DEFSYM (Qbuffer_list_update_hook, "buffer-list-update-hook"); | 5993 | DEFSYM (Qbuffer_list_update_hook, "buffer-list-update-hook"); |
| 6001 | 5994 | ||
diff --git a/src/buffer.h b/src/buffer.h index c75a09c5579..97d891f044b 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -343,7 +343,8 @@ while (0) | |||
| 343 | - (ptr - (current_buffer)->text->beg <= GPT_BYTE - BEG_BYTE ? 0 : GAP_SIZE) \ | 343 | - (ptr - (current_buffer)->text->beg <= GPT_BYTE - BEG_BYTE ? 0 : GAP_SIZE) \ |
| 344 | + BEG_BYTE) | 344 | + BEG_BYTE) |
| 345 | 345 | ||
| 346 | /* Return character at byte position POS. */ | 346 | /* Return character at byte position POS. See the caveat WARNING for |
| 347 | FETCH_MULTIBYTE_CHAR below. */ | ||
| 347 | 348 | ||
| 348 | #define FETCH_CHAR(pos) \ | 349 | #define FETCH_CHAR(pos) \ |
| 349 | (!NILP (BVAR (current_buffer, enable_multibyte_characters)) \ | 350 | (!NILP (BVAR (current_buffer, enable_multibyte_characters)) \ |
| @@ -359,7 +360,17 @@ extern unsigned char *_fetch_multibyte_char_p; | |||
| 359 | 360 | ||
| 360 | /* Return character code of multi-byte form at byte position POS. If POS | 361 | /* Return character code of multi-byte form at byte position POS. If POS |
| 361 | doesn't point the head of valid multi-byte form, only the byte at | 362 | doesn't point the head of valid multi-byte form, only the byte at |
| 362 | POS is returned. No range checking. */ | 363 | POS is returned. No range checking. |
| 364 | |||
| 365 | WARNING: The character returned by this macro could be "unified" | ||
| 366 | inside STRING_CHAR, if the original character in the buffer belongs | ||
| 367 | to one of the Private Use Areas (PUAs) of codepoints that Emacs | ||
| 368 | uses to support non-unified CJK characters. If that happens, | ||
| 369 | CHAR_BYTES will return a value that is different from the length of | ||
| 370 | the original multibyte sequence stored in the buffer. Therefore, | ||
| 371 | do _not_ use FETCH_MULTIBYTE_CHAR if you need to advance through | ||
| 372 | the buffer to the next character after fetching this one. Instead, | ||
| 373 | use either FETCH_CHAR_ADVANCE or STRING_CHAR_AND_LENGTH. */ | ||
| 363 | 374 | ||
| 364 | #define FETCH_MULTIBYTE_CHAR(pos) \ | 375 | #define FETCH_MULTIBYTE_CHAR(pos) \ |
| 365 | (_fetch_multibyte_char_p = (((pos) >= GPT_BYTE ? GAP_SIZE : 0) \ | 376 | (_fetch_multibyte_char_p = (((pos) >= GPT_BYTE ? GAP_SIZE : 0) \ |
diff --git a/src/callint.c b/src/callint.c index 78daa8f8fce..506698a4e4e 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -97,7 +97,7 @@ r -- Region: point and mark as 2 numeric args, smallest first. Does no I/O. | |||
| 97 | s -- Any string. Does not inherit the current input method. | 97 | s -- Any string. Does not inherit the current input method. |
| 98 | S -- Any symbol. | 98 | S -- Any symbol. |
| 99 | U -- Mouse up event discarded by a previous k or K argument. | 99 | U -- Mouse up event discarded by a previous k or K argument. |
| 100 | v -- Variable name: symbol that is user-variable-p. | 100 | v -- Variable name: symbol that is `custom-variable-p'. |
| 101 | x -- Lisp expression read but not evaluated. | 101 | x -- Lisp expression read but not evaluated. |
| 102 | X -- Lisp expression read and evaluated. | 102 | X -- Lisp expression read and evaluated. |
| 103 | z -- Coding system. | 103 | z -- Coding system. |
| @@ -748,7 +748,7 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 748 | break; | 748 | break; |
| 749 | 749 | ||
| 750 | case 'v': /* Variable name: symbol that is | 750 | case 'v': /* Variable name: symbol that is |
| 751 | user-variable-p. */ | 751 | custom-variable-p. */ |
| 752 | args[i] = Fread_variable (callint_message, Qnil); | 752 | args[i] = Fread_variable (callint_message, Qnil); |
| 753 | visargs[i] = last_minibuf_string; | 753 | visargs[i] = last_minibuf_string; |
| 754 | break; | 754 | break; |
| @@ -945,7 +945,7 @@ may be set by the debugger as a reminder for itself. */); | |||
| 945 | Vcommand_debug_status = Qnil; | 945 | Vcommand_debug_status = Qnil; |
| 946 | 946 | ||
| 947 | DEFVAR_LISP ("mark-even-if-inactive", Vmark_even_if_inactive, | 947 | DEFVAR_LISP ("mark-even-if-inactive", Vmark_even_if_inactive, |
| 948 | doc: /* *Non-nil means you can use the mark even when inactive. | 948 | doc: /* Non-nil means you can use the mark even when inactive. |
| 949 | This option makes a difference in Transient Mark mode. | 949 | This option makes a difference in Transient Mark mode. |
| 950 | When the option is non-nil, deactivation of the mark | 950 | When the option is non-nil, deactivation of the mark |
| 951 | turns off region highlighting, but commands that use the mark | 951 | turns off region highlighting, but commands that use the mark |
diff --git a/src/callproc.c b/src/callproc.c index e17e082a0d4..1dd56749e16 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1646,16 +1646,16 @@ syms_of_callproc (void) | |||
| 1646 | staticpro (&Vtemp_file_name_pattern); | 1646 | staticpro (&Vtemp_file_name_pattern); |
| 1647 | 1647 | ||
| 1648 | DEFVAR_LISP ("shell-file-name", Vshell_file_name, | 1648 | DEFVAR_LISP ("shell-file-name", Vshell_file_name, |
| 1649 | doc: /* *File name to load inferior shells from. | 1649 | doc: /* File name to load inferior shells from. |
| 1650 | Initialized from the SHELL environment variable, or to a system-dependent | 1650 | Initialized from the SHELL environment variable, or to a system-dependent |
| 1651 | default if SHELL is not set. */); | 1651 | default if SHELL is not set. */); |
| 1652 | 1652 | ||
| 1653 | DEFVAR_LISP ("exec-path", Vexec_path, | 1653 | DEFVAR_LISP ("exec-path", Vexec_path, |
| 1654 | doc: /* *List of directories to search programs to run in subprocesses. | 1654 | doc: /* List of directories to search programs to run in subprocesses. |
| 1655 | Each element is a string (directory name) or nil (try default directory). */); | 1655 | Each element is a string (directory name) or nil (try default directory). */); |
| 1656 | 1656 | ||
| 1657 | DEFVAR_LISP ("exec-suffixes", Vexec_suffixes, | 1657 | DEFVAR_LISP ("exec-suffixes", Vexec_suffixes, |
| 1658 | doc: /* *List of suffixes to try to find executable file names. | 1658 | doc: /* List of suffixes to try to find executable file names. |
| 1659 | Each element is a string. */); | 1659 | Each element is a string. */); |
| 1660 | Vexec_suffixes = Qnil; | 1660 | Vexec_suffixes = Qnil; |
| 1661 | 1661 | ||
diff --git a/src/character.h b/src/character.h index cc76ab213fc..d2a7a11fa56 100644 --- a/src/character.h +++ b/src/character.h | |||
| @@ -292,7 +292,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 292 | } while (0) | 292 | } while (0) |
| 293 | 293 | ||
| 294 | /* Return the character code of character whose multibyte form is at | 294 | /* Return the character code of character whose multibyte form is at |
| 295 | P. */ | 295 | P. Note that this macro unifies CJK characters whose codepoints |
| 296 | are in the Private Use Areas (PUAs), so it might return a different | ||
| 297 | codepoint from the one actually stored at P. */ | ||
| 296 | 298 | ||
| 297 | #define STRING_CHAR(p) \ | 299 | #define STRING_CHAR(p) \ |
| 298 | (!((p)[0] & 0x80) \ | 300 | (!((p)[0] & 0x80) \ |
| @@ -309,7 +311,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 309 | 311 | ||
| 310 | 312 | ||
| 311 | /* Like STRING_CHAR, but set ACTUAL_LEN to the length of multibyte | 313 | /* Like STRING_CHAR, but set ACTUAL_LEN to the length of multibyte |
| 312 | form. */ | 314 | form. |
| 315 | |||
| 316 | Note: This macro returns the actual length of the character's | ||
| 317 | multibyte sequence as it is stored in a buffer or string. The | ||
| 318 | character it returns might have a different codepoint that has a | ||
| 319 | different multibyte sequence of a different legth, due to possible | ||
| 320 | unification of CJK characters inside string_char. Therefore do NOT | ||
| 321 | assume that the length returned by this macro is identical to the | ||
| 322 | length of the multibyte sequence of the character it returns. */ | ||
| 313 | 323 | ||
| 314 | #define STRING_CHAR_AND_LENGTH(p, actual_len) \ | 324 | #define STRING_CHAR_AND_LENGTH(p, actual_len) \ |
| 315 | (!((p)[0] & 0x80) \ | 325 | (!((p)[0] & 0x80) \ |
diff --git a/src/charset.c b/src/charset.c index 688247de1b0..6ecc8d2c4d1 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -2395,7 +2395,7 @@ syms_of_charset (void) | |||
| 2395 | defsubr (&Ssort_charsets); | 2395 | defsubr (&Ssort_charsets); |
| 2396 | 2396 | ||
| 2397 | DEFVAR_LISP ("charset-map-path", Vcharset_map_path, | 2397 | DEFVAR_LISP ("charset-map-path", Vcharset_map_path, |
| 2398 | doc: /* *List of directories to search for charset map files. */); | 2398 | doc: /* List of directories to search for charset map files. */); |
| 2399 | Vcharset_map_path = Qnil; | 2399 | Vcharset_map_path = Qnil; |
| 2400 | 2400 | ||
| 2401 | DEFVAR_BOOL ("inhibit-load-charset-map", inhibit_load_charset_map, | 2401 | DEFVAR_BOOL ("inhibit-load-charset-map", inhibit_load_charset_map, |
diff --git a/src/composite.c b/src/composite.c index 0d1ab266309..50aca156ba4 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -355,7 +355,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, | |||
| 355 | else | 355 | else |
| 356 | { | 356 | { |
| 357 | /* Rule-base composition. */ | 357 | /* Rule-base composition. */ |
| 358 | float leftmost = 0.0, rightmost; | 358 | double leftmost = 0.0, rightmost; |
| 359 | 359 | ||
| 360 | ch = XINT (key_contents[0]); | 360 | ch = XINT (key_contents[0]); |
| 361 | rightmost = ch != '\t' ? CHAR_WIDTH (ch) : 1; | 361 | rightmost = ch != '\t' ? CHAR_WIDTH (ch) : 1; |
| @@ -364,7 +364,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars, | |||
| 364 | { | 364 | { |
| 365 | int rule, gref, nref; | 365 | int rule, gref, nref; |
| 366 | int this_width; | 366 | int this_width; |
| 367 | float this_left; | 367 | double this_left; |
| 368 | 368 | ||
| 369 | rule = XINT (key_contents[i]); | 369 | rule = XINT (key_contents[i]); |
| 370 | ch = XINT (key_contents[i + 1]); | 370 | ch = XINT (key_contents[i + 1]); |
diff --git a/src/dispextern.h b/src/dispextern.h index 82ad1d265a5..93611403649 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -454,7 +454,7 @@ struct glyph | |||
| 454 | /* Length of acronym or hexadecimal code string (at most 8). */ | 454 | /* Length of acronym or hexadecimal code string (at most 8). */ |
| 455 | unsigned len : 4; | 455 | unsigned len : 4; |
| 456 | /* Character to display. Actually we need only 22 bits. */ | 456 | /* Character to display. Actually we need only 22 bits. */ |
| 457 | unsigned ch : 26; | 457 | unsigned ch : 25; |
| 458 | } glyphless; | 458 | } glyphless; |
| 459 | 459 | ||
| 460 | /* Used to compare all bit-fields above in one step. */ | 460 | /* Used to compare all bit-fields above in one step. */ |
| @@ -2152,6 +2152,10 @@ struct it | |||
| 2152 | Don't handle some `display' properties in these strings. */ | 2152 | Don't handle some `display' properties in these strings. */ |
| 2153 | unsigned string_from_display_prop_p : 1; | 2153 | unsigned string_from_display_prop_p : 1; |
| 2154 | 2154 | ||
| 2155 | /* 1 means `string' comes from a `line-prefix' or `wrap-prefix' | ||
| 2156 | property. */ | ||
| 2157 | unsigned string_from_prefix_prop_p : 1; | ||
| 2158 | |||
| 2155 | /* 1 means we are iterating an object that came from a value of a | 2159 | /* 1 means we are iterating an object that came from a value of a |
| 2156 | `display' property. */ | 2160 | `display' property. */ |
| 2157 | unsigned from_disp_prop_p : 1; | 2161 | unsigned from_disp_prop_p : 1; |
| @@ -2272,6 +2276,7 @@ struct it | |||
| 2272 | bidi_dir_t paragraph_embedding; | 2276 | bidi_dir_t paragraph_embedding; |
| 2273 | unsigned multibyte_p : 1; | 2277 | unsigned multibyte_p : 1; |
| 2274 | unsigned string_from_display_prop_p : 1; | 2278 | unsigned string_from_display_prop_p : 1; |
| 2279 | unsigned string_from_prefix_prop_p : 1; | ||
| 2275 | unsigned display_ellipsis_p : 1; | 2280 | unsigned display_ellipsis_p : 1; |
| 2276 | unsigned avoid_cursor_p : 1; | 2281 | unsigned avoid_cursor_p : 1; |
| 2277 | unsigned bidi_p:1; | 2282 | unsigned bidi_p:1; |
diff --git a/src/dispnew.c b/src/dispnew.c index f25e69e89a7..41e6e5b8df6 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -6077,10 +6077,14 @@ sit_for (Lisp_Object timeout, int reading, int do_display) | |||
| 6077 | 6077 | ||
| 6078 | 6078 | ||
| 6079 | DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 1, 0, | 6079 | DEFUN ("redisplay", Fredisplay, Sredisplay, 0, 1, 0, |
| 6080 | doc: /* Perform redisplay if no input is available. | 6080 | doc: /* Perform redisplay. |
| 6081 | If optional arg FORCE is non-nil or `redisplay-dont-pause' is non-nil, | 6081 | Optional arg FORCE, if non-nil, prevents redisplay from being |
| 6082 | perform a full redisplay even if input is available. | 6082 | preempted by arriving input, even if `redisplay-dont-pause' is nil. |
| 6083 | Return t if redisplay was performed, nil otherwise. */) | 6083 | If `redisplay-dont-pause' is non-nil (the default), redisplay is never |
| 6084 | preempted by arriving input, so FORCE does nothing. | ||
| 6085 | |||
| 6086 | Return t if redisplay was performed, nil if redisplay was preempted | ||
| 6087 | immediately by pending input. */) | ||
| 6084 | (Lisp_Object force) | 6088 | (Lisp_Object force) |
| 6085 | { | 6089 | { |
| 6086 | ptrdiff_t count; | 6090 | ptrdiff_t count; |
| @@ -6530,21 +6534,21 @@ syms_of_display (void) | |||
| 6530 | DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause"); | 6534 | DEFSYM (Qredisplay_dont_pause, "redisplay-dont-pause"); |
| 6531 | 6535 | ||
| 6532 | DEFVAR_INT ("baud-rate", baud_rate, | 6536 | DEFVAR_INT ("baud-rate", baud_rate, |
| 6533 | doc: /* *The output baud rate of the terminal. | 6537 | doc: /* The output baud rate of the terminal. |
| 6534 | On most systems, changing this value will affect the amount of padding | 6538 | On most systems, changing this value will affect the amount of padding |
| 6535 | and the other strategic decisions made during redisplay. */); | 6539 | and the other strategic decisions made during redisplay. */); |
| 6536 | 6540 | ||
| 6537 | DEFVAR_BOOL ("inverse-video", inverse_video, | 6541 | DEFVAR_BOOL ("inverse-video", inverse_video, |
| 6538 | doc: /* *Non-nil means invert the entire frame display. | 6542 | doc: /* Non-nil means invert the entire frame display. |
| 6539 | This means everything is in inverse video which otherwise would not be. */); | 6543 | This means everything is in inverse video which otherwise would not be. */); |
| 6540 | 6544 | ||
| 6541 | DEFVAR_BOOL ("visible-bell", visible_bell, | 6545 | DEFVAR_BOOL ("visible-bell", visible_bell, |
| 6542 | doc: /* *Non-nil means try to flash the frame to represent a bell. | 6546 | doc: /* Non-nil means try to flash the frame to represent a bell. |
| 6543 | 6547 | ||
| 6544 | See also `ring-bell-function'. */); | 6548 | See also `ring-bell-function'. */); |
| 6545 | 6549 | ||
| 6546 | DEFVAR_BOOL ("no-redraw-on-reenter", no_redraw_on_reenter, | 6550 | DEFVAR_BOOL ("no-redraw-on-reenter", no_redraw_on_reenter, |
| 6547 | doc: /* *Non-nil means no need to redraw entire frame after suspending. | 6551 | doc: /* Non-nil means no need to redraw entire frame after suspending. |
| 6548 | A non-nil value is useful if the terminal can automatically preserve | 6552 | A non-nil value is useful if the terminal can automatically preserve |
| 6549 | Emacs's frame display when you reenter Emacs. | 6553 | Emacs's frame display when you reenter Emacs. |
| 6550 | It is up to you to set this variable if your terminal can do that. */); | 6554 | It is up to you to set this variable if your terminal can do that. */); |
| @@ -6599,14 +6603,15 @@ See `buffer-display-table' for more information. */); | |||
| 6599 | Vstandard_display_table = Qnil; | 6603 | Vstandard_display_table = Qnil; |
| 6600 | 6604 | ||
| 6601 | DEFVAR_BOOL ("redisplay-dont-pause", redisplay_dont_pause, | 6605 | DEFVAR_BOOL ("redisplay-dont-pause", redisplay_dont_pause, |
| 6602 | doc: /* *Non-nil means display update isn't paused when input is detected. */); | 6606 | doc: /* Non-nil means display update isn't paused when input is detected. */); |
| 6603 | redisplay_dont_pause = 1; | 6607 | redisplay_dont_pause = 1; |
| 6604 | 6608 | ||
| 6605 | #if PERIODIC_PREEMPTION_CHECKING | 6609 | #if PERIODIC_PREEMPTION_CHECKING |
| 6606 | DEFVAR_LISP ("redisplay-preemption-period", Vredisplay_preemption_period, | 6610 | DEFVAR_LISP ("redisplay-preemption-period", Vredisplay_preemption_period, |
| 6607 | doc: /* *The period in seconds between checking for input during redisplay. | 6611 | doc: /* Period in seconds between checking for input during redisplay. |
| 6608 | If input is detected, redisplay is pre-empted, and the input is processed. | 6612 | This has an effect only if `redisplay-dont-pause' is nil; in that |
| 6609 | If nil, never pre-empt redisplay. */); | 6613 | case, arriving input preempts redisplay until the input is processed. |
| 6614 | If the value is nil, redisplay is never preempted. */); | ||
| 6610 | Vredisplay_preemption_period = make_float (0.10); | 6615 | Vredisplay_preemption_period = make_float (0.10); |
| 6611 | #endif | 6616 | #endif |
| 6612 | 6617 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Record indices of function doc strings stored in a file. | 1 | /* Record indices of function doc strings stored in a file. |
| 2 | Copyright (C) 1985-1986, 1993-1995, 1997-2012 | 2 | |
| 3 | Free Software Foundation, Inc. | 3 | Copyright (C) 1985-1986, 1993-1995, 1997-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -675,15 +675,18 @@ the same file name is found in the `doc-directory'. */) | |||
| 675 | /* Install file-position as variable-documentation property | 675 | /* Install file-position as variable-documentation property |
| 676 | and make it negative for a user-variable | 676 | and make it negative for a user-variable |
| 677 | (doc starts with a `*'). */ | 677 | (doc starts with a `*'). */ |
| 678 | Fput (sym, Qvariable_documentation, | 678 | if (!NILP (Fboundp (sym))) |
| 679 | make_number ((pos + end + 1 - buf) | 679 | Fput (sym, Qvariable_documentation, |
| 680 | * (end[1] == '*' ? -1 : 1))); | 680 | make_number ((pos + end + 1 - buf) |
| 681 | * (end[1] == '*' ? -1 : 1))); | ||
| 681 | } | 682 | } |
| 682 | 683 | ||
| 683 | /* Attach a docstring to a function? */ | 684 | /* Attach a docstring to a function? */ |
| 684 | else if (p[1] == 'F') | 685 | else if (p[1] == 'F') |
| 685 | store_function_docstring (sym, pos + end + 1 - buf); | 686 | { |
| 686 | 687 | if (!NILP (Ffboundp (sym))) | |
| 688 | store_function_docstring (sym, pos + end + 1 - buf); | ||
| 689 | } | ||
| 687 | else if (p[1] == 'S') | 690 | else if (p[1] == 'S') |
| 688 | ; /* Just a source file name boundary marker. Ignore it. */ | 691 | ; /* Just a source file name boundary marker. Ignore it. */ |
| 689 | 692 | ||
diff --git a/src/dosfns.c b/src/dosfns.c index 8ef672fb8bb..d4b96e9df90 100644 --- a/src/dosfns.c +++ b/src/dosfns.c | |||
| @@ -710,7 +710,7 @@ Implicitly modified when the TZ variable is changed. */); | |||
| 710 | #endif | 710 | #endif |
| 711 | 711 | ||
| 712 | DEFVAR_LISP ("dos-display-scancodes", Vdos_display_scancodes, | 712 | DEFVAR_LISP ("dos-display-scancodes", Vdos_display_scancodes, |
| 713 | doc: /* *Controls whether DOS raw keyboard events are displayed as you type. | 713 | doc: /* Whether DOS raw keyboard events are displayed as you type. |
| 714 | When non-nil, the keyboard scan-codes are displayed at the bottom right | 714 | When non-nil, the keyboard scan-codes are displayed at the bottom right |
| 715 | corner of the display (typically at the end of the mode line). | 715 | corner of the display (typically at the end of the mode line). |
| 716 | The output format is: scan code:char code*modifiers. */); | 716 | The output format is: scan code:char code*modifiers. */); |
| @@ -718,17 +718,17 @@ The output format is: scan code:char code*modifiers. */); | |||
| 718 | Vdos_display_scancodes = Qnil; | 718 | Vdos_display_scancodes = Qnil; |
| 719 | 719 | ||
| 720 | DEFVAR_INT ("dos-hyper-key", dos_hyper_key, | 720 | DEFVAR_INT ("dos-hyper-key", dos_hyper_key, |
| 721 | doc: /* *If set to 1, use right ALT key as hyper key. | 721 | doc: /* If set to 1, use right ALT key as hyper key. |
| 722 | If set to 2, use right CTRL key as hyper key. */); | 722 | If set to 2, use right CTRL key as hyper key. */); |
| 723 | dos_hyper_key = 0; | 723 | dos_hyper_key = 0; |
| 724 | 724 | ||
| 725 | DEFVAR_INT ("dos-super-key", dos_super_key, | 725 | DEFVAR_INT ("dos-super-key", dos_super_key, |
| 726 | doc: /* *If set to 1, use right ALT key as super key. | 726 | doc: /* If set to 1, use right ALT key as super key. |
| 727 | If set to 2, use right CTRL key as super key. */); | 727 | If set to 2, use right CTRL key as super key. */); |
| 728 | dos_super_key = 0; | 728 | dos_super_key = 0; |
| 729 | 729 | ||
| 730 | DEFVAR_INT ("dos-keypad-mode", dos_keypad_mode, | 730 | DEFVAR_INT ("dos-keypad-mode", dos_keypad_mode, |
| 731 | doc: /* *Controls what key code is returned by a key in the numeric keypad. | 731 | doc: /* Controls what key code is returned by a key in the numeric keypad. |
| 732 | The `numlock ON' action is only taken if no modifier keys are pressed. | 732 | The `numlock ON' action is only taken if no modifier keys are pressed. |
| 733 | The value is an integer constructed by adding the following bits together: | 733 | The value is an integer constructed by adding the following bits together: |
| 734 | 734 | ||
diff --git a/src/editfns.c b/src/editfns.c index afd4ed48333..7e7f82c5992 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -658,10 +658,11 @@ is after LIMIT, then LIMIT will be returned instead. */) | |||
| 658 | 658 | ||
| 659 | DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, | 659 | DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0, |
| 660 | doc: /* Return the position closest to NEW-POS that is in the same field as OLD-POS. | 660 | doc: /* Return the position closest to NEW-POS that is in the same field as OLD-POS. |
| 661 | |||
| 662 | A field is a region of text with the same `field' property. | 661 | A field is a region of text with the same `field' property. |
| 663 | If NEW-POS is nil, then the current point is used instead, and set to the | 662 | |
| 664 | constrained position if that is different. | 663 | If NEW-POS is nil, then use the current point instead, and move point |
| 664 | to the resulting constrained position, in addition to returning that | ||
| 665 | position. | ||
| 665 | 666 | ||
| 666 | If OLD-POS is at the boundary of two fields, then the allowable | 667 | If OLD-POS is at the boundary of two fields, then the allowable |
| 667 | positions for NEW-POS depends on the value of the optional argument | 668 | positions for NEW-POS depends on the value of the optional argument |
diff --git a/src/emacs.c b/src/emacs.c index 29bc44191ab..d3e8e4466e3 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -82,10 +82,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 82 | #include <sys/personality.h> | 82 | #include <sys/personality.h> |
| 83 | #endif | 83 | #endif |
| 84 | 84 | ||
| 85 | #ifdef HAVE_LIBXML2 | ||
| 86 | #include <libxml/parser.h> | ||
| 87 | #endif | ||
| 88 | |||
| 89 | #ifndef O_RDWR | 85 | #ifndef O_RDWR |
| 90 | #define O_RDWR 2 | 86 | #define O_RDWR 2 |
| 91 | #endif | 87 | #endif |
| @@ -2129,7 +2125,7 @@ shut_down_emacs (int sig, int no_x, Lisp_Object stuff) | |||
| 2129 | #endif | 2125 | #endif |
| 2130 | 2126 | ||
| 2131 | #ifdef HAVE_LIBXML2 | 2127 | #ifdef HAVE_LIBXML2 |
| 2132 | xmlCleanupParser (); | 2128 | xml_cleanup_parser (); |
| 2133 | #endif | 2129 | #endif |
| 2134 | } | 2130 | } |
| 2135 | 2131 | ||
diff --git a/src/eval.c b/src/eval.c index 7f3bf6a866f..d266d995c4b 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -124,6 +124,12 @@ Lisp_Object Vsignaling_function; | |||
| 124 | 124 | ||
| 125 | int handling_signal; | 125 | int handling_signal; |
| 126 | 126 | ||
| 127 | /* If non-nil, Lisp code must not be run since some part of Emacs is | ||
| 128 | in an inconsistent state. Currently, x-create-frame uses this to | ||
| 129 | avoid triggering window-configuration-change-hook while the new | ||
| 130 | frame is half-initialized. */ | ||
| 131 | Lisp_Object inhibit_lisp_code; | ||
| 132 | |||
| 127 | static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); | 133 | static Lisp_Object funcall_lambda (Lisp_Object, ptrdiff_t, Lisp_Object *); |
| 128 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; | 134 | static void unwind_to_catch (struct catchtag *, Lisp_Object) NO_RETURN; |
| 129 | static int interactive_p (int); | 135 | static int interactive_p (int); |
| @@ -774,8 +780,6 @@ The optional argument DOCSTRING is a documentation string for the | |||
| 774 | variable. | 780 | variable. |
| 775 | 781 | ||
| 776 | To define a user option, use `defcustom' instead of `defvar'. | 782 | To define a user option, use `defcustom' instead of `defvar'. |
| 777 | The function `user-variable-p' also identifies a variable as a user | ||
| 778 | option if its DOCSTRING starts with *, but this behavior is obsolete. | ||
| 779 | usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) | 783 | usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) |
| 780 | (Lisp_Object args) | 784 | (Lisp_Object args) |
| 781 | { | 785 | { |
| @@ -889,71 +893,6 @@ usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */) | |||
| 889 | return sym; | 893 | return sym; |
| 890 | } | 894 | } |
| 891 | 895 | ||
| 892 | /* Error handler used in Fuser_variable_p. */ | ||
| 893 | static Lisp_Object | ||
| 894 | user_variable_p_eh (Lisp_Object ignore) | ||
| 895 | { | ||
| 896 | return Qnil; | ||
| 897 | } | ||
| 898 | |||
| 899 | static Lisp_Object | ||
| 900 | lisp_indirect_variable (Lisp_Object sym) | ||
| 901 | { | ||
| 902 | struct Lisp_Symbol *s = indirect_variable (XSYMBOL (sym)); | ||
| 903 | XSETSYMBOL (sym, s); | ||
| 904 | return sym; | ||
| 905 | } | ||
| 906 | |||
| 907 | DEFUN ("user-variable-p", Fuser_variable_p, Suser_variable_p, 1, 1, 0, | ||
| 908 | doc: /* Return t if VARIABLE is intended to be set and modified by users. | ||
| 909 | \(The alternative is a variable used internally in a Lisp program.) | ||
| 910 | |||
| 911 | This function returns t if (i) the first character of its | ||
| 912 | documentation is `*', or (ii) it is customizable (its property list | ||
| 913 | contains a non-nil value of `standard-value' or `custom-autoload'), or | ||
| 914 | \(iii) it is an alias for a user variable. | ||
| 915 | |||
| 916 | But condition (i) is considered obsolete, so for most purposes this is | ||
| 917 | equivalent to `custom-variable-p'. */) | ||
| 918 | (Lisp_Object variable) | ||
| 919 | { | ||
| 920 | Lisp_Object documentation; | ||
| 921 | |||
| 922 | if (!SYMBOLP (variable)) | ||
| 923 | return Qnil; | ||
| 924 | |||
| 925 | /* If indirect and there's an alias loop, don't check anything else. */ | ||
| 926 | if (XSYMBOL (variable)->redirect == SYMBOL_VARALIAS | ||
| 927 | && NILP (internal_condition_case_1 (lisp_indirect_variable, variable, | ||
| 928 | Qt, user_variable_p_eh))) | ||
| 929 | return Qnil; | ||
| 930 | |||
| 931 | while (1) | ||
| 932 | { | ||
| 933 | documentation = Fget (variable, Qvariable_documentation); | ||
| 934 | if (INTEGERP (documentation) && XINT (documentation) < 0) | ||
| 935 | return Qt; | ||
| 936 | if (STRINGP (documentation) | ||
| 937 | && ((unsigned char) SREF (documentation, 0) == '*')) | ||
| 938 | return Qt; | ||
| 939 | /* If it is (STRING . INTEGER), a negative integer means a user variable. */ | ||
| 940 | if (CONSP (documentation) | ||
| 941 | && STRINGP (XCAR (documentation)) | ||
| 942 | && INTEGERP (XCDR (documentation)) | ||
| 943 | && XINT (XCDR (documentation)) < 0) | ||
| 944 | return Qt; | ||
| 945 | /* Customizable? See `custom-variable-p'. */ | ||
| 946 | if ((!NILP (Fget (variable, intern ("standard-value")))) | ||
| 947 | || (!NILP (Fget (variable, intern ("custom-autoload"))))) | ||
| 948 | return Qt; | ||
| 949 | |||
| 950 | if (!(XSYMBOL (variable)->redirect == SYMBOL_VARALIAS)) | ||
| 951 | return Qnil; | ||
| 952 | |||
| 953 | /* An indirect variable? Let's follow the chain. */ | ||
| 954 | XSETSYMBOL (variable, SYMBOL_ALIAS (XSYMBOL (variable))); | ||
| 955 | } | ||
| 956 | } | ||
| 957 | 896 | ||
| 958 | DEFUN ("let*", FletX, SletX, 1, UNEVALLED, 0, | 897 | DEFUN ("let*", FletX, SletX, 1, UNEVALLED, 0, |
| 959 | doc: /* Bind variables according to VARLIST then eval BODY. | 898 | doc: /* Bind variables according to VARLIST then eval BODY. |
| @@ -3592,7 +3531,7 @@ void | |||
| 3592 | syms_of_eval (void) | 3531 | syms_of_eval (void) |
| 3593 | { | 3532 | { |
| 3594 | DEFVAR_INT ("max-specpdl-size", max_specpdl_size, | 3533 | DEFVAR_INT ("max-specpdl-size", max_specpdl_size, |
| 3595 | doc: /* *Limit on number of Lisp variable bindings and `unwind-protect's. | 3534 | doc: /* Limit on number of Lisp variable bindings and `unwind-protect's. |
| 3596 | If Lisp code tries to increase the total number past this amount, | 3535 | If Lisp code tries to increase the total number past this amount, |
| 3597 | an error is signaled. | 3536 | an error is signaled. |
| 3598 | You can safely use a value considerably larger than the default value, | 3537 | You can safely use a value considerably larger than the default value, |
| @@ -3600,7 +3539,7 @@ if that proves inconveniently small. However, if you increase it too far, | |||
| 3600 | Emacs could run out of memory trying to make the stack bigger. */); | 3539 | Emacs could run out of memory trying to make the stack bigger. */); |
| 3601 | 3540 | ||
| 3602 | DEFVAR_INT ("max-lisp-eval-depth", max_lisp_eval_depth, | 3541 | DEFVAR_INT ("max-lisp-eval-depth", max_lisp_eval_depth, |
| 3603 | doc: /* *Limit on depth in `eval', `apply' and `funcall' before error. | 3542 | doc: /* Limit on depth in `eval', `apply' and `funcall' before error. |
| 3604 | 3543 | ||
| 3605 | This limit serves to catch infinite recursions for you before they cause | 3544 | This limit serves to catch infinite recursions for you before they cause |
| 3606 | actual stack overflow in C, which would be fatal for Emacs. | 3545 | actual stack overflow in C, which would be fatal for Emacs. |
| @@ -3644,7 +3583,7 @@ before making `inhibit-quit' nil. */); | |||
| 3644 | DEFSYM (Qdebug, "debug"); | 3583 | DEFSYM (Qdebug, "debug"); |
| 3645 | 3584 | ||
| 3646 | DEFVAR_LISP ("debug-on-error", Vdebug_on_error, | 3585 | DEFVAR_LISP ("debug-on-error", Vdebug_on_error, |
| 3647 | doc: /* *Non-nil means enter debugger if an error is signaled. | 3586 | doc: /* Non-nil means enter debugger if an error is signaled. |
| 3648 | Does not apply to errors handled by `condition-case' or those | 3587 | Does not apply to errors handled by `condition-case' or those |
| 3649 | matched by `debug-ignored-errors'. | 3588 | matched by `debug-ignored-errors'. |
| 3650 | If the value is a list, an error only means to enter the debugger | 3589 | If the value is a list, an error only means to enter the debugger |
| @@ -3656,7 +3595,7 @@ See also the variable `debug-on-quit'. */); | |||
| 3656 | Vdebug_on_error = Qnil; | 3595 | Vdebug_on_error = Qnil; |
| 3657 | 3596 | ||
| 3658 | DEFVAR_LISP ("debug-ignored-errors", Vdebug_ignored_errors, | 3597 | DEFVAR_LISP ("debug-ignored-errors", Vdebug_ignored_errors, |
| 3659 | doc: /* *List of errors for which the debugger should not be called. | 3598 | doc: /* List of errors for which the debugger should not be called. |
| 3660 | Each element may be a condition-name or a regexp that matches error messages. | 3599 | Each element may be a condition-name or a regexp that matches error messages. |
| 3661 | If any element applies to a given error, that error skips the debugger | 3600 | If any element applies to a given error, that error skips the debugger |
| 3662 | and just returns to top level. | 3601 | and just returns to top level. |
| @@ -3665,7 +3604,7 @@ It does not apply to errors handled by `condition-case'. */); | |||
| 3665 | Vdebug_ignored_errors = Qnil; | 3604 | Vdebug_ignored_errors = Qnil; |
| 3666 | 3605 | ||
| 3667 | DEFVAR_BOOL ("debug-on-quit", debug_on_quit, | 3606 | DEFVAR_BOOL ("debug-on-quit", debug_on_quit, |
| 3668 | doc: /* *Non-nil means enter debugger if quit is signaled (C-g, for example). | 3607 | doc: /* Non-nil means enter debugger if quit is signaled (C-g, for example). |
| 3669 | Does not apply if quit is handled by a `condition-case'. */); | 3608 | Does not apply if quit is handled by a `condition-case'. */); |
| 3670 | debug_on_quit = 0; | 3609 | debug_on_quit = 0; |
| 3671 | 3610 | ||
| @@ -3694,7 +3633,7 @@ The Edebug package uses this to regain control. */); | |||
| 3694 | Vsignal_hook_function = Qnil; | 3633 | Vsignal_hook_function = Qnil; |
| 3695 | 3634 | ||
| 3696 | DEFVAR_LISP ("debug-on-signal", Vdebug_on_signal, | 3635 | DEFVAR_LISP ("debug-on-signal", Vdebug_on_signal, |
| 3697 | doc: /* *Non-nil means call the debugger regardless of condition handlers. | 3636 | doc: /* Non-nil means call the debugger regardless of condition handlers. |
| 3698 | Note that `debug-on-error', `debug-on-quit' and friends | 3637 | Note that `debug-on-error', `debug-on-quit' and friends |
| 3699 | still determine whether to handle the particular condition. */); | 3638 | still determine whether to handle the particular condition. */); |
| 3700 | Vdebug_on_signal = Qnil; | 3639 | Vdebug_on_signal = Qnil; |
| @@ -3734,6 +3673,8 @@ alist of active lexical bindings. */); | |||
| 3734 | staticpro (&Vsignaling_function); | 3673 | staticpro (&Vsignaling_function); |
| 3735 | Vsignaling_function = Qnil; | 3674 | Vsignaling_function = Qnil; |
| 3736 | 3675 | ||
| 3676 | inhibit_lisp_code = Qnil; | ||
| 3677 | |||
| 3737 | defsubr (&Sor); | 3678 | defsubr (&Sor); |
| 3738 | defsubr (&Sand); | 3679 | defsubr (&Sand); |
| 3739 | defsubr (&Sif); | 3680 | defsubr (&Sif); |
| @@ -3749,7 +3690,6 @@ alist of active lexical bindings. */); | |||
| 3749 | defsubr (&Sdefvar); | 3690 | defsubr (&Sdefvar); |
| 3750 | defsubr (&Sdefvaralias); | 3691 | defsubr (&Sdefvaralias); |
| 3751 | defsubr (&Sdefconst); | 3692 | defsubr (&Sdefconst); |
| 3752 | defsubr (&Suser_variable_p); | ||
| 3753 | defsubr (&Slet); | 3693 | defsubr (&Slet); |
| 3754 | defsubr (&SletX); | 3694 | defsubr (&SletX); |
| 3755 | defsubr (&Swhile); | 3695 | defsubr (&Swhile); |
diff --git a/src/fileio.c b/src/fileio.c index 3cd44df012b..c5442d560fd 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -5618,7 +5618,7 @@ syms_of_fileio (void) | |||
| 5618 | DEFSYM (Qexcl, "excl"); | 5618 | DEFSYM (Qexcl, "excl"); |
| 5619 | 5619 | ||
| 5620 | DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system, | 5620 | DEFVAR_LISP ("file-name-coding-system", Vfile_name_coding_system, |
| 5621 | doc: /* *Coding system for encoding file names. | 5621 | doc: /* Coding system for encoding file names. |
| 5622 | If it is nil, `default-file-name-coding-system' (which see) is used. */); | 5622 | If it is nil, `default-file-name-coding-system' (which see) is used. */); |
| 5623 | Vfile_name_coding_system = Qnil; | 5623 | Vfile_name_coding_system = Qnil; |
| 5624 | 5624 | ||
| @@ -5772,7 +5772,7 @@ file is usually more useful if it contains the deleted text. */); | |||
| 5772 | 5772 | ||
| 5773 | #ifdef HAVE_FSYNC | 5773 | #ifdef HAVE_FSYNC |
| 5774 | DEFVAR_BOOL ("write-region-inhibit-fsync", write_region_inhibit_fsync, | 5774 | DEFVAR_BOOL ("write-region-inhibit-fsync", write_region_inhibit_fsync, |
| 5775 | doc: /* *Non-nil means don't call fsync in `write-region'. | 5775 | doc: /* Non-nil means don't call fsync in `write-region'. |
| 5776 | This variable affects calls to `write-region' as well as save commands. | 5776 | This variable affects calls to `write-region' as well as save commands. |
| 5777 | A non-nil value may result in data loss! */); | 5777 | A non-nil value may result in data loss! */); |
| 5778 | write_region_inhibit_fsync = 0; | 5778 | write_region_inhibit_fsync = 0; |
| @@ -4937,7 +4937,7 @@ Used by `featurep' and `require', and altered by `provide'. */); | |||
| 4937 | #endif /* HAVE_LANGINFO_CODESET */ | 4937 | #endif /* HAVE_LANGINFO_CODESET */ |
| 4938 | 4938 | ||
| 4939 | DEFVAR_BOOL ("use-dialog-box", use_dialog_box, | 4939 | DEFVAR_BOOL ("use-dialog-box", use_dialog_box, |
| 4940 | doc: /* *Non-nil means mouse commands use dialog boxes to ask questions. | 4940 | doc: /* Non-nil means mouse commands use dialog boxes to ask questions. |
| 4941 | This applies to `y-or-n-p' and `yes-or-no-p' questions asked by commands | 4941 | This applies to `y-or-n-p' and `yes-or-no-p' questions asked by commands |
| 4942 | invoked by mouse clicks and mouse menu items. | 4942 | invoked by mouse clicks and mouse menu items. |
| 4943 | 4943 | ||
| @@ -4946,7 +4946,7 @@ non-nil. */); | |||
| 4946 | use_dialog_box = 1; | 4946 | use_dialog_box = 1; |
| 4947 | 4947 | ||
| 4948 | DEFVAR_BOOL ("use-file-dialog", use_file_dialog, | 4948 | DEFVAR_BOOL ("use-file-dialog", use_file_dialog, |
| 4949 | doc: /* *Non-nil means mouse commands use a file dialog to ask for files. | 4949 | doc: /* Non-nil means mouse commands use a file dialog to ask for files. |
| 4950 | This applies to commands from menus and tool bar buttons even when | 4950 | This applies to commands from menus and tool bar buttons even when |
| 4951 | they are initiated from the keyboard. If `use-dialog-box' is nil, | 4951 | they are initiated from the keyboard. If `use-dialog-box' is nil, |
| 4952 | that disables the use of a file dialog, regardless of the value of | 4952 | that disables the use of a file dialog, regardless of the value of |
diff --git a/src/fontset.c b/src/fontset.c index 7057167cfd4..b2c7249625e 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -2229,7 +2229,7 @@ alternate fontnames (if any) are tried instead. */); | |||
| 2229 | 2229 | ||
| 2230 | DEFVAR_LISP ("vertical-centering-font-regexp", | 2230 | DEFVAR_LISP ("vertical-centering-font-regexp", |
| 2231 | Vvertical_centering_font_regexp, | 2231 | Vvertical_centering_font_regexp, |
| 2232 | doc: /* *Regexp matching font names that require vertical centering on display. | 2232 | doc: /* Regexp matching font names that require vertical centering on display. |
| 2233 | When a character is displayed with such fonts, the character is displayed | 2233 | When a character is displayed with such fonts, the character is displayed |
| 2234 | at the vertical center of lines. */); | 2234 | at the vertical center of lines. */); |
| 2235 | Vvertical_centering_font_regexp = Qnil; | 2235 | Vvertical_centering_font_regexp = Qnil; |
diff --git a/src/frame.c b/src/frame.c index 8b285437288..e962251f420 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1118,41 +1118,32 @@ Otherwise, include all frames. */) | |||
| 1118 | static int | 1118 | static int |
| 1119 | other_visible_frames (FRAME_PTR f) | 1119 | other_visible_frames (FRAME_PTR f) |
| 1120 | { | 1120 | { |
| 1121 | /* We know the selected frame is visible, | 1121 | Lisp_Object frames; |
| 1122 | so if F is some other frame, it can't be the sole visible one. */ | ||
| 1123 | if (f == SELECTED_FRAME ()) | ||
| 1124 | { | ||
| 1125 | Lisp_Object frames; | ||
| 1126 | int count = 0; | ||
| 1127 | 1122 | ||
| 1128 | for (frames = Vframe_list; | 1123 | for (frames = Vframe_list; CONSP (frames); frames = XCDR (frames)) |
| 1129 | CONSP (frames); | 1124 | { |
| 1130 | frames = XCDR (frames)) | 1125 | Lisp_Object this = XCAR (frames); |
| 1131 | { | 1126 | if (f == XFRAME (this)) |
| 1132 | Lisp_Object this; | 1127 | continue; |
| 1133 | 1128 | ||
| 1134 | this = XCAR (frames); | 1129 | /* Verify that we can still talk to the frame's X window, |
| 1135 | /* Verify that the frame's window still exists | 1130 | and note any recent change in visibility. */ |
| 1136 | and we can still talk to it. And note any recent change | ||
| 1137 | in visibility. */ | ||
| 1138 | #ifdef HAVE_WINDOW_SYSTEM | 1131 | #ifdef HAVE_WINDOW_SYSTEM |
| 1139 | if (FRAME_WINDOW_P (XFRAME (this))) | 1132 | if (FRAME_WINDOW_P (XFRAME (this))) |
| 1140 | { | 1133 | { |
| 1141 | x_sync (XFRAME (this)); | 1134 | x_sync (XFRAME (this)); |
| 1142 | FRAME_SAMPLE_VISIBILITY (XFRAME (this)); | 1135 | FRAME_SAMPLE_VISIBILITY (XFRAME (this)); |
| 1143 | } | 1136 | } |
| 1144 | #endif | 1137 | #endif |
| 1145 | 1138 | ||
| 1146 | if (FRAME_VISIBLE_P (XFRAME (this)) | 1139 | if (FRAME_VISIBLE_P (XFRAME (this)) |
| 1147 | || FRAME_ICONIFIED_P (XFRAME (this)) | 1140 | || FRAME_ICONIFIED_P (XFRAME (this)) |
| 1148 | /* Allow deleting the terminal frame when at least | 1141 | /* Allow deleting the terminal frame when at least one X |
| 1149 | one X frame exists! */ | 1142 | frame exists. */ |
| 1150 | || (FRAME_WINDOW_P (XFRAME (this)) && !FRAME_WINDOW_P (f))) | 1143 | || (FRAME_WINDOW_P (XFRAME (this)) && !FRAME_WINDOW_P (f))) |
| 1151 | count++; | 1144 | return 1; |
| 1152 | } | ||
| 1153 | return count > 1; | ||
| 1154 | } | 1145 | } |
| 1155 | return 1; | 1146 | return 0; |
| 1156 | } | 1147 | } |
| 1157 | 1148 | ||
| 1158 | /* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME | 1149 | /* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME |
diff --git a/src/fringe.c b/src/fringe.c index 4bc2f8806f3..c591d391e9f 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -1756,7 +1756,7 @@ syms_of_fringe (void) | |||
| 1756 | defsubr (&Sset_fringe_bitmap_face); | 1756 | defsubr (&Sset_fringe_bitmap_face); |
| 1757 | 1757 | ||
| 1758 | DEFVAR_LISP ("overflow-newline-into-fringe", Voverflow_newline_into_fringe, | 1758 | DEFVAR_LISP ("overflow-newline-into-fringe", Voverflow_newline_into_fringe, |
| 1759 | doc: /* *Non-nil means that newline may flow into the right fringe. | 1759 | doc: /* Non-nil means that newline may flow into the right fringe. |
| 1760 | This means that display lines which are exactly as wide as the window | 1760 | This means that display lines which are exactly as wide as the window |
| 1761 | (not counting the final newline) will only occupy one screen line, by | 1761 | (not counting the final newline) will only occupy one screen line, by |
| 1762 | showing (or hiding) the final newline in the right fringe; when point | 1762 | showing (or hiding) the final newline in the right fringe; when point |
diff --git a/src/ftfont.c b/src/ftfont.c index 3c0b09b7f74..5545b4b4ae2 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -1856,7 +1856,7 @@ ftfont_drive_otf (MFLTFont *font, | |||
| 1856 | setup_otf_gstring (len); | 1856 | setup_otf_gstring (len); |
| 1857 | for (i = 0; i < len; i++) | 1857 | for (i = 0; i < len; i++) |
| 1858 | { | 1858 | { |
| 1859 | otf_gstring.glyphs[i].c = in->glyphs[from + i].c; | 1859 | otf_gstring.glyphs[i].c = in->glyphs[from + i].c & 0x11FFFF; |
| 1860 | otf_gstring.glyphs[i].glyph_id = in->glyphs[from + i].code; | 1860 | otf_gstring.glyphs[i].glyph_id = in->glyphs[from + i].code; |
| 1861 | } | 1861 | } |
| 1862 | 1862 | ||
diff --git a/src/gnutls.c b/src/gnutls.c index 99fc5c10e2b..8dbf01cedc9 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -247,18 +247,27 @@ init_gnutls_functions (Lisp_Object libraries) | |||
| 247 | #endif /* !WINDOWSNT */ | 247 | #endif /* !WINDOWSNT */ |
| 248 | 248 | ||
| 249 | 249 | ||
| 250 | /* Function to log a simple message. */ | ||
| 250 | static void | 251 | static void |
| 251 | gnutls_log_function (int level, const char* string) | 252 | gnutls_log_function (int level, const char* string) |
| 252 | { | 253 | { |
| 253 | message ("gnutls.c: [%d] %s", level, string); | 254 | message ("gnutls.c: [%d] %s", level, string); |
| 254 | } | 255 | } |
| 255 | 256 | ||
| 257 | /* Function to log a message and a string. */ | ||
| 256 | static void | 258 | static void |
| 257 | gnutls_log_function2 (int level, const char* string, const char* extra) | 259 | gnutls_log_function2 (int level, const char* string, const char* extra) |
| 258 | { | 260 | { |
| 259 | message ("gnutls.c: [%d] %s %s", level, string, extra); | 261 | message ("gnutls.c: [%d] %s %s", level, string, extra); |
| 260 | } | 262 | } |
| 261 | 263 | ||
| 264 | /* Function to log a message and an integer. */ | ||
| 265 | static void | ||
| 266 | gnutls_log_function2i (int level, const char* string, int extra) | ||
| 267 | { | ||
| 268 | message ("gnutls.c: [%d] %s %d", level, string, extra); | ||
| 269 | } | ||
| 270 | |||
| 262 | static int | 271 | static int |
| 263 | emacs_gnutls_handshake (struct Lisp_Process *proc) | 272 | emacs_gnutls_handshake (struct Lisp_Process *proc) |
| 264 | { | 273 | { |
| @@ -399,10 +408,25 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, ptrdiff_t nbyte) | |||
| 399 | ssize_t rtnval; | 408 | ssize_t rtnval; |
| 400 | gnutls_session_t state = proc->gnutls_state; | 409 | gnutls_session_t state = proc->gnutls_state; |
| 401 | 410 | ||
| 411 | int log_level = proc->gnutls_log_level; | ||
| 412 | |||
| 402 | if (proc->gnutls_initstage != GNUTLS_STAGE_READY) | 413 | if (proc->gnutls_initstage != GNUTLS_STAGE_READY) |
| 403 | { | 414 | { |
| 404 | emacs_gnutls_handshake (proc); | 415 | /* If the handshake count is under the limit, try the handshake |
| 405 | return -1; | 416 | again and increment the handshake count. This count is kept |
| 417 | per process (connection), not globally. */ | ||
| 418 | if (proc->gnutls_handshakes_tried < GNUTLS_EMACS_HANDSHAKES_LIMIT) | ||
| 419 | { | ||
| 420 | proc->gnutls_handshakes_tried++; | ||
| 421 | emacs_gnutls_handshake (proc); | ||
| 422 | GNUTLS_LOG2i (5, log_level, "Retried handshake", | ||
| 423 | proc->gnutls_handshakes_tried); | ||
| 424 | return -1; | ||
| 425 | } | ||
| 426 | |||
| 427 | GNUTLS_LOG (2, log_level, "Giving up on handshake; resetting retries"); | ||
| 428 | proc->gnutls_handshakes_tried = 0; | ||
| 429 | return 0; | ||
| 406 | } | 430 | } |
| 407 | rtnval = fn_gnutls_record_recv (state, buf, nbyte); | 431 | rtnval = fn_gnutls_record_recv (state, buf, nbyte); |
| 408 | if (rtnval >= 0) | 432 | if (rtnval >= 0) |
diff --git a/src/gnutls.h b/src/gnutls.h index b6afba25355..2b13908a748 100644 --- a/src/gnutls.h +++ b/src/gnutls.h | |||
| @@ -23,6 +23,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 23 | #include <gnutls/gnutls.h> | 23 | #include <gnutls/gnutls.h> |
| 24 | #include <gnutls/x509.h> | 24 | #include <gnutls/x509.h> |
| 25 | 25 | ||
| 26 | /* This limits the attempts to handshake per process (connection). */ | ||
| 27 | #define GNUTLS_EMACS_HANDSHAKES_LIMIT 100 | ||
| 28 | |||
| 26 | typedef enum | 29 | typedef enum |
| 27 | { | 30 | { |
| 28 | /* Initialization stages. */ | 31 | /* Initialization stages. */ |
| @@ -53,6 +56,8 @@ typedef enum | |||
| 53 | 56 | ||
| 54 | #define GNUTLS_LOG2(level, max, string, extra) do { if (level <= max) { gnutls_log_function2 (level, "(Emacs) " string, extra); } } while (0) | 57 | #define GNUTLS_LOG2(level, max, string, extra) do { if (level <= max) { gnutls_log_function2 (level, "(Emacs) " string, extra); } } while (0) |
| 55 | 58 | ||
| 59 | #define GNUTLS_LOG2i(level, max, string, extra) do { if (level <= max) { gnutls_log_function2i (level, "(Emacs) " string, extra); } } while (0) | ||
| 60 | |||
| 56 | extern ptrdiff_t | 61 | extern ptrdiff_t |
| 57 | emacs_gnutls_write (struct Lisp_Process *proc, const char *buf, ptrdiff_t nbyte); | 62 | emacs_gnutls_write (struct Lisp_Process *proc, const char *buf, ptrdiff_t nbyte); |
| 58 | extern ptrdiff_t | 63 | extern ptrdiff_t |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 433cd8aa412..d39a0eedf41 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1304,10 +1304,13 @@ x_wm_set_size_hint (FRAME_PTR f, long int flags, int user_position) | |||
| 1304 | 1304 | ||
| 1305 | hint_flags |= GDK_HINT_BASE_SIZE; | 1305 | hint_flags |= GDK_HINT_BASE_SIZE; |
| 1306 | base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0) + FRAME_TOOLBAR_WIDTH (f); | 1306 | base_width = FRAME_TEXT_COLS_TO_PIXEL_WIDTH (f, 0) + FRAME_TOOLBAR_WIDTH (f); |
| 1307 | base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 0) | 1307 | /* Use one row here so base_height does not become zero. |
| 1308 | Gtk+ and/or Unity on Ubuntu 12.04 can't handle it. */ | ||
| 1309 | base_height = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, 1) | ||
| 1308 | + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); | 1310 | + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f); |
| 1309 | 1311 | ||
| 1310 | check_frame_size (f, &min_rows, &min_cols); | 1312 | check_frame_size (f, &min_rows, &min_cols); |
| 1313 | if (min_rows > 0) --min_rows; /* We used one row in base_height = ... 1); */ | ||
| 1311 | 1314 | ||
| 1312 | size_hints.base_width = base_width; | 1315 | size_hints.base_width = base_width; |
| 1313 | size_hints.base_height = base_height; | 1316 | size_hints.base_height = base_height; |
diff --git a/src/indent.c b/src/indent.c index b1c86c3ab13..22b0bb2c668 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -2021,6 +2021,7 @@ whether or not it is currently displayed in some window. */) | |||
| 2021 | ptrdiff_t it_start, it_overshoot_count = 0; | 2021 | ptrdiff_t it_start, it_overshoot_count = 0; |
| 2022 | int first_x; | 2022 | int first_x; |
| 2023 | int overshoot_handled = 0; | 2023 | int overshoot_handled = 0; |
| 2024 | int disp_string_at_start_p = 0; | ||
| 2024 | 2025 | ||
| 2025 | itdata = bidi_shelve_cache (); | 2026 | itdata = bidi_shelve_cache (); |
| 2026 | SET_TEXT_POS (pt, PT, PT_BYTE); | 2027 | SET_TEXT_POS (pt, PT, PT_BYTE); |
| @@ -2035,6 +2036,8 @@ whether or not it is currently displayed in some window. */) | |||
| 2035 | { | 2036 | { |
| 2036 | const char *s = SSDATA (it.string); | 2037 | const char *s = SSDATA (it.string); |
| 2037 | const char *e = s + SBYTES (it.string); | 2038 | const char *e = s + SBYTES (it.string); |
| 2039 | |||
| 2040 | disp_string_at_start_p = it.string_from_display_prop_p; | ||
| 2038 | while (s < e) | 2041 | while (s < e) |
| 2039 | { | 2042 | { |
| 2040 | if (*s++ == '\n') | 2043 | if (*s++ == '\n') |
| @@ -2062,7 +2065,8 @@ whether or not it is currently displayed in some window. */) | |||
| 2062 | /* IT may move too far if truncate-lines is on and PT lies | 2065 | /* IT may move too far if truncate-lines is on and PT lies |
| 2063 | beyond the right margin. IT may also move too far if the | 2066 | beyond the right margin. IT may also move too far if the |
| 2064 | starting point is on a Lisp string that has embedded | 2067 | starting point is on a Lisp string that has embedded |
| 2065 | newlines. In these cases, backtrack. */ | 2068 | newlines, or spans several screen lines. In these cases, |
| 2069 | backtrack. */ | ||
| 2066 | if (IT_CHARPOS (it) > it_start) | 2070 | if (IT_CHARPOS (it) > it_start) |
| 2067 | { | 2071 | { |
| 2068 | /* We need to backtrack also if the Lisp string contains no | 2072 | /* We need to backtrack also if the Lisp string contains no |
| @@ -2073,6 +2077,14 @@ whether or not it is currently displayed in some window. */) | |||
| 2073 | && it.method == GET_FROM_BUFFER | 2077 | && it.method == GET_FROM_BUFFER |
| 2074 | && it.c == '\n') | 2078 | && it.c == '\n') |
| 2075 | it_overshoot_count = 1; | 2079 | it_overshoot_count = 1; |
| 2080 | else if (disp_string_at_start_p && it.vpos > 0) | ||
| 2081 | { | ||
| 2082 | /* This is the case of a display string that spans | ||
| 2083 | several screen lines. In that case, we end up at the | ||
| 2084 | end of the string, and it.vpos tells us how many | ||
| 2085 | screen lines we need to backtrack. */ | ||
| 2086 | it_overshoot_count = it.vpos; | ||
| 2087 | } | ||
| 2076 | if (it_overshoot_count > 0) | 2088 | if (it_overshoot_count > 0) |
| 2077 | move_it_by_lines (&it, -it_overshoot_count); | 2089 | move_it_by_lines (&it, -it_overshoot_count); |
| 2078 | 2090 | ||
| @@ -2151,7 +2163,7 @@ void | |||
| 2151 | syms_of_indent (void) | 2163 | syms_of_indent (void) |
| 2152 | { | 2164 | { |
| 2153 | DEFVAR_BOOL ("indent-tabs-mode", indent_tabs_mode, | 2165 | DEFVAR_BOOL ("indent-tabs-mode", indent_tabs_mode, |
| 2154 | doc: /* *Indentation can insert tabs if this is non-nil. */); | 2166 | doc: /* Indentation can insert tabs if this is non-nil. */); |
| 2155 | indent_tabs_mode = 1; | 2167 | indent_tabs_mode = 1; |
| 2156 | 2168 | ||
| 2157 | defsubr (&Scurrent_indentation); | 2169 | defsubr (&Scurrent_indentation); |
diff --git a/src/keyboard.c b/src/keyboard.c index eb9152f2c6c..bad91ea3f72 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -241,6 +241,7 @@ Lisp_Object internal_last_event_frame; | |||
| 241 | Time last_event_timestamp; | 241 | Time last_event_timestamp; |
| 242 | 242 | ||
| 243 | static Lisp_Object Qx_set_selection, Qhandle_switch_frame; | 243 | static Lisp_Object Qx_set_selection, Qhandle_switch_frame; |
| 244 | static Lisp_Object Qhandle_select_window; | ||
| 244 | Lisp_Object QPRIMARY; | 245 | Lisp_Object QPRIMARY; |
| 245 | 246 | ||
| 246 | static Lisp_Object Qself_insert_command; | 247 | static Lisp_Object Qself_insert_command; |
| @@ -1645,7 +1646,8 @@ command_loop_1 (void) | |||
| 1645 | ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) | 1646 | ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) |
| 1646 | : (!NILP (Vselect_active_regions) | 1647 | : (!NILP (Vselect_active_regions) |
| 1647 | && !NILP (Vtransient_mark_mode))) | 1648 | && !NILP (Vtransient_mark_mode))) |
| 1648 | && !EQ (Vthis_command, Qhandle_switch_frame)) | 1649 | && NILP (Fmemq (Vthis_command, |
| 1650 | Vselection_inhibit_update_commands))) | ||
| 1649 | { | 1651 | { |
| 1650 | ptrdiff_t beg = | 1652 | ptrdiff_t beg = |
| 1651 | XINT (Fmarker_position (BVAR (current_buffer, mark))); | 1653 | XINT (Fmarker_position (BVAR (current_buffer, mark))); |
| @@ -1877,7 +1879,7 @@ safe_run_hooks_error (Lisp_Object error_data) | |||
| 1877 | = CONSP (Vinhibit_quit) ? XCAR (Vinhibit_quit) : Vinhibit_quit; | 1879 | = CONSP (Vinhibit_quit) ? XCAR (Vinhibit_quit) : Vinhibit_quit; |
| 1878 | Lisp_Object fun = CONSP (Vinhibit_quit) ? XCDR (Vinhibit_quit) : Qnil; | 1880 | Lisp_Object fun = CONSP (Vinhibit_quit) ? XCDR (Vinhibit_quit) : Qnil; |
| 1879 | Lisp_Object args[4]; | 1881 | Lisp_Object args[4]; |
| 1880 | args[0] = build_string ("Error in %s (%s): %s"); | 1882 | args[0] = build_string ("Error in %s (%s): %S"); |
| 1881 | args[1] = hook; | 1883 | args[1] = hook; |
| 1882 | args[2] = fun; | 1884 | args[2] = fun; |
| 1883 | args[3] = error_data; | 1885 | args[3] = error_data; |
| @@ -11654,6 +11656,7 @@ syms_of_keyboard (void) | |||
| 11654 | DEFSYM (Qx_set_selection, "x-set-selection"); | 11656 | DEFSYM (Qx_set_selection, "x-set-selection"); |
| 11655 | DEFSYM (QPRIMARY, "PRIMARY"); | 11657 | DEFSYM (QPRIMARY, "PRIMARY"); |
| 11656 | DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); | 11658 | DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); |
| 11659 | DEFSYM (Qhandle_select_window, "handle-select-window"); | ||
| 11657 | 11660 | ||
| 11658 | DEFSYM (Qinput_method_function, "input-method-function"); | 11661 | DEFSYM (Qinput_method_function, "input-method-function"); |
| 11659 | DEFSYM (Qinput_method_exit_on_first_char, "input-method-exit-on-first-char"); | 11662 | DEFSYM (Qinput_method_exit_on_first_char, "input-method-exit-on-first-char"); |
| @@ -12170,7 +12173,7 @@ whenever `deferred-action-list' is non-nil. */); | |||
| 12170 | Vdeferred_action_function = Qnil; | 12173 | Vdeferred_action_function = Qnil; |
| 12171 | 12174 | ||
| 12172 | DEFVAR_LISP ("delayed-warnings-list", Vdelayed_warnings_list, | 12175 | DEFVAR_LISP ("delayed-warnings-list", Vdelayed_warnings_list, |
| 12173 | doc: /* List of warnings to be displayed as soon as possible. | 12176 | doc: /* List of warnings to be displayed after this command. |
| 12174 | Each element must be a list (TYPE MESSAGE [LEVEL [BUFFER-NAME]]), | 12177 | Each element must be a list (TYPE MESSAGE [LEVEL [BUFFER-NAME]]), |
| 12175 | as per the args of `display-warning' (which see). | 12178 | as per the args of `display-warning' (which see). |
| 12176 | If this variable is non-nil, `delayed-warnings-hook' will be run | 12179 | If this variable is non-nil, `delayed-warnings-hook' will be run |
| @@ -12290,6 +12293,16 @@ text in the region before modifying the buffer. The next | |||
| 12290 | `deactivate-mark' call uses this to set the window selection. */); | 12293 | `deactivate-mark' call uses this to set the window selection. */); |
| 12291 | Vsaved_region_selection = Qnil; | 12294 | Vsaved_region_selection = Qnil; |
| 12292 | 12295 | ||
| 12296 | DEFVAR_LISP ("selection-inhibit-update-commands", | ||
| 12297 | Vselection_inhibit_update_commands, | ||
| 12298 | doc: /* List of commands which should not update the selection. | ||
| 12299 | Normally, if `select-active-regions' is non-nil and the mark remains | ||
| 12300 | active after a command (i.e. the mark was not deactivated), the Emacs | ||
| 12301 | command loop sets the selection to the text in the region. However, | ||
| 12302 | if the command is in this list, the selection is not updated. */); | ||
| 12303 | Vselection_inhibit_update_commands | ||
| 12304 | = list2 (Qhandle_switch_frame, Qhandle_select_window); | ||
| 12305 | |||
| 12293 | DEFVAR_LISP ("debug-on-event", | 12306 | DEFVAR_LISP ("debug-on-event", |
| 12294 | Vdebug_on_event, | 12307 | Vdebug_on_event, |
| 12295 | doc: /* Enter debugger on this event. When Emacs | 12308 | doc: /* Enter debugger on this event. When Emacs |
diff --git a/src/keymap.c b/src/keymap.c index 328e6d8ed23..e8f2f88bb26 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2053,8 +2053,9 @@ static Lisp_Object Qsingle_key_description, Qkey_description; | |||
| 2053 | DEFUN ("key-description", Fkey_description, Skey_description, 1, 2, 0, | 2053 | DEFUN ("key-description", Fkey_description, Skey_description, 1, 2, 0, |
| 2054 | doc: /* Return a pretty description of key-sequence KEYS. | 2054 | doc: /* Return a pretty description of key-sequence KEYS. |
| 2055 | Optional arg PREFIX is the sequence of keys leading up to KEYS. | 2055 | Optional arg PREFIX is the sequence of keys leading up to KEYS. |
| 2056 | Control characters turn into "C-foo" sequences, meta into "M-foo", | 2056 | For example, [?\C-x ?l] is converted into the string \"C-x l\". |
| 2057 | spaces are put between sequence elements, etc. */) | 2057 | |
| 2058 | The `kbd' macro is an approximate inverse of this. */) | ||
| 2058 | (Lisp_Object keys, Lisp_Object prefix) | 2059 | (Lisp_Object keys, Lisp_Object prefix) |
| 2059 | { | 2060 | { |
| 2060 | ptrdiff_t len = 0; | 2061 | ptrdiff_t len = 0; |
diff --git a/src/lisp.h b/src/lisp.h index 47570ebee74..864346d85c2 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1139,6 +1139,8 @@ struct Lisp_Symbol | |||
| 1139 | special (with `defvar' etc), and shouldn't be lexically bound. */ | 1139 | special (with `defvar' etc), and shouldn't be lexically bound. */ |
| 1140 | unsigned declared_special : 1; | 1140 | unsigned declared_special : 1; |
| 1141 | 1141 | ||
| 1142 | unsigned spacer : 23; | ||
| 1143 | |||
| 1142 | /* The symbol's name, as a Lisp string. | 1144 | /* The symbol's name, as a Lisp string. |
| 1143 | The name "xname" is used to intentionally break code referring to | 1145 | The name "xname" is used to intentionally break code referring to |
| 1144 | the old field "name" of type pointer to struct Lisp_String. */ | 1146 | the old field "name" of type pointer to struct Lisp_String. */ |
| @@ -2970,6 +2972,7 @@ extern Lisp_Object Qinhibit_quit, Qclosure; | |||
| 2970 | extern Lisp_Object Qand_rest; | 2972 | extern Lisp_Object Qand_rest; |
| 2971 | extern Lisp_Object Vautoload_queue; | 2973 | extern Lisp_Object Vautoload_queue; |
| 2972 | extern Lisp_Object Vsignaling_function; | 2974 | extern Lisp_Object Vsignaling_function; |
| 2975 | extern Lisp_Object inhibit_lisp_code; | ||
| 2973 | extern int handling_signal; | 2976 | extern int handling_signal; |
| 2974 | #if BYTE_MARK_STACK | 2977 | #if BYTE_MARK_STACK |
| 2975 | extern struct catchtag *catchlist; | 2978 | extern struct catchtag *catchlist; |
| @@ -3580,6 +3583,7 @@ EXFUN (Fmsdos_downcase_filename, 1); | |||
| 3580 | #ifdef HAVE_LIBXML2 | 3583 | #ifdef HAVE_LIBXML2 |
| 3581 | /* Defined in xml.c */ | 3584 | /* Defined in xml.c */ |
| 3582 | extern void syms_of_xml (void); | 3585 | extern void syms_of_xml (void); |
| 3586 | extern void xml_cleanup_parser (void); | ||
| 3583 | #endif | 3587 | #endif |
| 3584 | 3588 | ||
| 3585 | #ifdef HAVE_MENUS | 3589 | #ifdef HAVE_MENUS |
diff --git a/src/lread.c b/src/lread.c index dfcb3eeab5e..48849cccd2b 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -4448,7 +4448,7 @@ were read in. */); | |||
| 4448 | Vread_circle = Qt; | 4448 | Vread_circle = Qt; |
| 4449 | 4449 | ||
| 4450 | DEFVAR_LISP ("load-path", Vload_path, | 4450 | DEFVAR_LISP ("load-path", Vload_path, |
| 4451 | doc: /* *List of directories to search for files to load. | 4451 | doc: /* List of directories to search for files to load. |
| 4452 | Each element is a string (directory name) or nil (try default directory). | 4452 | Each element is a string (directory name) or nil (try default directory). |
| 4453 | Initialized based on EMACSLOADPATH environment variable, if any, | 4453 | Initialized based on EMACSLOADPATH environment variable, if any, |
| 4454 | otherwise to default specified by file `epaths.h' when Emacs was built. */); | 4454 | otherwise to default specified by file `epaths.h' when Emacs was built. */); |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index d7ca325e223..303445bc2d6 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -128,6 +128,7 @@ OBJ2 = $(BLD)/sysdep.$(O) \ | |||
| 128 | $(BLD)/image.$(O) \ | 128 | $(BLD)/image.$(O) \ |
| 129 | $(BLD)/terminal.$(O) \ | 129 | $(BLD)/terminal.$(O) \ |
| 130 | $(BLD)/menu.$(O) \ | 130 | $(BLD)/menu.$(O) \ |
| 131 | $(BLD)/xml.$(O) \ | ||
| 131 | $(BLD)/w32term.$(O) \ | 132 | $(BLD)/w32term.$(O) \ |
| 132 | $(BLD)/w32xfns.$(O) \ | 133 | $(BLD)/w32xfns.$(O) \ |
| 133 | $(BLD)/w32fns.$(O) \ | 134 | $(BLD)/w32fns.$(O) \ |
| @@ -225,7 +226,7 @@ GLOBAL_SOURCES = dosfns.c msdos.c \ | |||
| 225 | process.c callproc.c unexw32.c \ | 226 | process.c callproc.c unexw32.c \ |
| 226 | region-cache.c sound.c atimer.c \ | 227 | region-cache.c sound.c atimer.c \ |
| 227 | doprnt.c intervals.c textprop.c composite.c \ | 228 | doprnt.c intervals.c textprop.c composite.c \ |
| 228 | gnutls.c | 229 | gnutls.c xml.c |
| 229 | SOME_MACHINE_OBJECTS = dosfns.o msdos.o \ | 230 | SOME_MACHINE_OBJECTS = dosfns.o msdos.o \ |
| 230 | xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o | 231 | xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o dbusbind.o |
| 231 | obj = $(GLOBAL_SOURCES:.c=.o) | 232 | obj = $(GLOBAL_SOURCES:.c=.o) |
| @@ -940,6 +941,13 @@ $(BLD)/gnutls.$(O) : \ | |||
| 940 | $(LISP_H) \ | 941 | $(LISP_H) \ |
| 941 | $(PROCESS_H) | 942 | $(PROCESS_H) |
| 942 | 943 | ||
| 944 | $(BLD)/xml.$(O) : \ | ||
| 945 | $(SRC)/xml.c \ | ||
| 946 | $(SRC)/buffer.h \ | ||
| 947 | $(SRC)/w32.h \ | ||
| 948 | $(CONFIG_H) \ | ||
| 949 | $(LISP_H) | ||
| 950 | |||
| 943 | $(BLD)/image.$(O) : \ | 951 | $(BLD)/image.$(O) : \ |
| 944 | $(SRC)/image.c \ | 952 | $(SRC)/image.c \ |
| 945 | $(SRC)/epaths.h \ | 953 | $(SRC)/epaths.h \ |
diff --git a/src/minibuf.c b/src/minibuf.c index c3a49bff0a5..e9bc36303f9 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -72,7 +72,7 @@ Lisp_Object Qcompletion_ignore_case; | |||
| 72 | static Lisp_Object Qminibuffer_completion_table; | 72 | static Lisp_Object Qminibuffer_completion_table; |
| 73 | static Lisp_Object Qminibuffer_completion_predicate; | 73 | static Lisp_Object Qminibuffer_completion_predicate; |
| 74 | static Lisp_Object Qminibuffer_completion_confirm; | 74 | static Lisp_Object Qminibuffer_completion_confirm; |
| 75 | static Lisp_Object Quser_variable_p; | 75 | static Lisp_Object Qcustom_variable_p; |
| 76 | 76 | ||
| 77 | static Lisp_Object Qminibuffer_default; | 77 | static Lisp_Object Qminibuffer_default; |
| 78 | 78 | ||
| @@ -1094,10 +1094,11 @@ Prompt with PROMPT. */) | |||
| 1094 | #endif /* NOTDEF */ | 1094 | #endif /* NOTDEF */ |
| 1095 | 1095 | ||
| 1096 | DEFUN ("read-variable", Fread_variable, Sread_variable, 1, 2, 0, | 1096 | DEFUN ("read-variable", Fread_variable, Sread_variable, 1, 2, 0, |
| 1097 | doc: /* Read the name of a user variable and return it as a symbol. | 1097 | doc: /* Read the name of a user option and return it as a symbol. |
| 1098 | Prompt with PROMPT. By default, return DEFAULT-VALUE or its first element | 1098 | Prompt with PROMPT. By default, return DEFAULT-VALUE or its first element |
| 1099 | if it is a list. | 1099 | if it is a list. |
| 1100 | A user variable is one for which `user-variable-p' returns non-nil. */) | 1100 | A user option, or customizable variable, is one for which |
| 1101 | `custom-variable-p' returns non-nil. */) | ||
| 1101 | (Lisp_Object prompt, Lisp_Object default_value) | 1102 | (Lisp_Object prompt, Lisp_Object default_value) |
| 1102 | { | 1103 | { |
| 1103 | Lisp_Object name, default_string; | 1104 | Lisp_Object name, default_string; |
| @@ -1110,7 +1111,7 @@ A user variable is one for which `user-variable-p' returns non-nil. */) | |||
| 1110 | default_string = default_value; | 1111 | default_string = default_value; |
| 1111 | 1112 | ||
| 1112 | name = Fcompleting_read (prompt, Vobarray, | 1113 | name = Fcompleting_read (prompt, Vobarray, |
| 1113 | Quser_variable_p, Qt, | 1114 | Qcustom_variable_p, Qt, |
| 1114 | Qnil, Qnil, default_string, Qnil); | 1115 | Qnil, Qnil, default_string, Qnil); |
| 1115 | if (NILP (name)) | 1116 | if (NILP (name)) |
| 1116 | return name; | 1117 | return name; |
| @@ -1975,11 +1976,11 @@ syms_of_minibuf (void) | |||
| 1975 | staticpro (&last_minibuf_string); | 1976 | staticpro (&last_minibuf_string); |
| 1976 | last_minibuf_string = Qnil; | 1977 | last_minibuf_string = Qnil; |
| 1977 | 1978 | ||
| 1978 | DEFSYM (Quser_variable_p, "user-variable-p"); | ||
| 1979 | DEFSYM (Qminibuffer_history, "minibuffer-history"); | 1979 | DEFSYM (Qminibuffer_history, "minibuffer-history"); |
| 1980 | DEFSYM (Qbuffer_name_history, "buffer-name-history"); | 1980 | DEFSYM (Qbuffer_name_history, "buffer-name-history"); |
| 1981 | Fset (Qbuffer_name_history, Qnil); | 1981 | Fset (Qbuffer_name_history, Qnil); |
| 1982 | 1982 | ||
| 1983 | DEFSYM (Qcustom_variable_p, "custom-variable-p"); | ||
| 1983 | DEFSYM (Qminibuffer_setup_hook, "minibuffer-setup-hook"); | 1984 | DEFSYM (Qminibuffer_setup_hook, "minibuffer-setup-hook"); |
| 1984 | DEFSYM (Qminibuffer_exit_hook, "minibuffer-exit-hook"); | 1985 | DEFSYM (Qminibuffer_exit_hook, "minibuffer-exit-hook"); |
| 1985 | DEFSYM (Qhistory_length, "history-length"); | 1986 | DEFSYM (Qhistory_length, "history-length"); |
diff --git a/src/msdos.c b/src/msdos.c index 885cedd3df0..5f46829aefd 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -4270,7 +4270,7 @@ syms_of_msdos (void) | |||
| 4270 | DEFSYM (Qreverse, "reverse"); | 4270 | DEFSYM (Qreverse, "reverse"); |
| 4271 | 4271 | ||
| 4272 | DEFVAR_LISP ("dos-unsupported-char-glyph", Vdos_unsupported_char_glyph, | 4272 | DEFVAR_LISP ("dos-unsupported-char-glyph", Vdos_unsupported_char_glyph, |
| 4273 | doc: /* *Glyph to display instead of chars not supported by current codepage. | 4273 | doc: /* Glyph to display instead of chars not supported by current codepage. |
| 4274 | This variable is used only by MS-DOS terminals. */); | 4274 | This variable is used only by MS-DOS terminals. */); |
| 4275 | Vdos_unsupported_char_glyph = make_number ('\177'); | 4275 | Vdos_unsupported_char_glyph = make_number ('\177'); |
| 4276 | 4276 | ||
diff --git a/src/print.c b/src/print.c index 443869b6fd0..868d61ba2f1 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -2141,7 +2141,7 @@ shared once again when the text is read back. */); | |||
| 2141 | Vprint_gensym = Qnil; | 2141 | Vprint_gensym = Qnil; |
| 2142 | 2142 | ||
| 2143 | DEFVAR_LISP ("print-circle", Vprint_circle, | 2143 | DEFVAR_LISP ("print-circle", Vprint_circle, |
| 2144 | doc: /* *Non-nil means print recursive structures using #N= and #N# syntax. | 2144 | doc: /* Non-nil means print recursive structures using #N= and #N# syntax. |
| 2145 | If nil, printing proceeds recursively and may lead to | 2145 | If nil, printing proceeds recursively and may lead to |
| 2146 | `max-lisp-eval-depth' being exceeded or an error may occur: | 2146 | `max-lisp-eval-depth' being exceeded or an error may occur: |
| 2147 | \"Apparently circular structure being printed.\" Also see | 2147 | \"Apparently circular structure being printed.\" Also see |
| @@ -2153,7 +2153,7 @@ where N is a positive decimal integer. */); | |||
| 2153 | Vprint_circle = Qnil; | 2153 | Vprint_circle = Qnil; |
| 2154 | 2154 | ||
| 2155 | DEFVAR_LISP ("print-continuous-numbering", Vprint_continuous_numbering, | 2155 | DEFVAR_LISP ("print-continuous-numbering", Vprint_continuous_numbering, |
| 2156 | doc: /* *Non-nil means number continuously across print calls. | 2156 | doc: /* Non-nil means number continuously across print calls. |
| 2157 | This affects the numbers printed for #N= labels and #M# references. | 2157 | This affects the numbers printed for #N= labels and #M# references. |
| 2158 | See also `print-circle', `print-gensym', and `print-number-table'. | 2158 | See also `print-circle', `print-gensym', and `print-number-table'. |
| 2159 | This variable should not be set with `setq'; bind it with a `let' instead. */); | 2159 | This variable should not be set with `setq'; bind it with a `let' instead. */); |
diff --git a/src/process.c b/src/process.c index daa49b129ae..9ccc77e1d83 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -640,7 +640,10 @@ make_process (Lisp_Object name) | |||
| 640 | 640 | ||
| 641 | #ifdef HAVE_GNUTLS | 641 | #ifdef HAVE_GNUTLS |
| 642 | p->gnutls_initstage = GNUTLS_STAGE_EMPTY; | 642 | p->gnutls_initstage = GNUTLS_STAGE_EMPTY; |
| 643 | /* Default log level. */ | ||
| 643 | p->gnutls_log_level = 0; | 644 | p->gnutls_log_level = 0; |
| 645 | /* GnuTLS handshakes attempted for this connection. */ | ||
| 646 | p->gnutls_handshakes_tried = 0; | ||
| 644 | p->gnutls_p = 0; | 647 | p->gnutls_p = 0; |
| 645 | p->gnutls_state = NULL; | 648 | p->gnutls_state = NULL; |
| 646 | p->gnutls_x509_cred = NULL; | 649 | p->gnutls_x509_cred = NULL; |
| @@ -4874,15 +4877,20 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, | |||
| 4874 | It can't hurt. */ | 4877 | It can't hurt. */ |
| 4875 | else if (nread == -1 && errno == EIO) | 4878 | else if (nread == -1 && errno == EIO) |
| 4876 | { | 4879 | { |
| 4877 | /* Clear the descriptor now, so we only raise the signal once. */ | 4880 | /* Don't do anything if only a pty, with no associated |
| 4878 | FD_CLR (channel, &input_wait_mask); | 4881 | process (bug#10933). */ |
| 4879 | FD_CLR (channel, &non_keyboard_wait_mask); | 4882 | if (XPROCESS (proc)->pid != -2) { |
| 4880 | 4883 | /* Clear the descriptor now, so we only raise the signal | |
| 4881 | kill (getpid (), SIGCHLD); | 4884 | once. */ |
| 4885 | FD_CLR (channel, &input_wait_mask); | ||
| 4886 | FD_CLR (channel, &non_keyboard_wait_mask); | ||
| 4887 | |||
| 4888 | kill (getpid (), SIGCHLD); | ||
| 4889 | } | ||
| 4882 | } | 4890 | } |
| 4883 | #endif /* HAVE_PTYS */ | 4891 | #endif /* HAVE_PTYS */ |
| 4884 | /* If we can detect process termination, don't consider the process | 4892 | /* If we can detect process termination, don't consider the |
| 4885 | gone just because its pipe is closed. */ | 4893 | process gone just because its pipe is closed. */ |
| 4886 | #ifdef SIGCHLD | 4894 | #ifdef SIGCHLD |
| 4887 | else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc)) | 4895 | else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc)) |
| 4888 | ; | 4896 | ; |
| @@ -7426,7 +7434,7 @@ syms_of_process (void) | |||
| 7426 | DEFSYM (Qargs, "args"); | 7434 | DEFSYM (Qargs, "args"); |
| 7427 | 7435 | ||
| 7428 | DEFVAR_BOOL ("delete-exited-processes", delete_exited_processes, | 7436 | DEFVAR_BOOL ("delete-exited-processes", delete_exited_processes, |
| 7429 | doc: /* *Non-nil means delete processes immediately when they exit. | 7437 | doc: /* Non-nil means delete processes immediately when they exit. |
| 7430 | A value of nil means don't delete them until `list-processes' is run. */); | 7438 | A value of nil means don't delete them until `list-processes' is run. */); |
| 7431 | 7439 | ||
| 7432 | delete_exited_processes = 1; | 7440 | delete_exited_processes = 1; |
diff --git a/src/process.h b/src/process.h index 9efde261386..3eb94cb196b 100644 --- a/src/process.h +++ b/src/process.h | |||
| @@ -134,6 +134,7 @@ struct Lisp_Process | |||
| 134 | gnutls_certificate_client_credentials gnutls_x509_cred; | 134 | gnutls_certificate_client_credentials gnutls_x509_cred; |
| 135 | gnutls_anon_client_credentials_t gnutls_anon_cred; | 135 | gnutls_anon_client_credentials_t gnutls_anon_cred; |
| 136 | int gnutls_log_level; | 136 | int gnutls_log_level; |
| 137 | int gnutls_handshakes_tried; | ||
| 137 | int gnutls_p; | 138 | int gnutls_p; |
| 138 | #endif | 139 | #endif |
| 139 | }; | 140 | }; |
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index b54bd985e6b..c1233c0e6ce 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h | |||
| @@ -146,9 +146,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 146 | || defined __ia64__ || defined __sh__ | 146 | || defined __ia64__ || defined __sh__ |
| 147 | #define GC_SETJMP_WORKS 1 | 147 | #define GC_SETJMP_WORKS 1 |
| 148 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | 148 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS |
| 149 | #ifdef __mc68000__ | ||
| 150 | #define GC_LISP_OBJECT_ALIGNMENT 2 | ||
| 151 | #endif | ||
| 152 | #ifdef __ia64__ | 149 | #ifdef __ia64__ |
| 153 | #define GC_MARK_SECONDARY_STACK() \ | 150 | #define GC_MARK_SECONDARY_STACK() \ |
| 154 | do { \ | 151 | do { \ |
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h index d533ae34ac3..e89ecb05931 100644 --- a/src/s/ms-w32.h +++ b/src/s/ms-w32.h | |||
| @@ -159,6 +159,9 @@ struct sigaction { | |||
| 159 | #undef HAVE_UTIMES | 159 | #undef HAVE_UTIMES |
| 160 | #undef HAVE_SETRLIMIT | 160 | #undef HAVE_SETRLIMIT |
| 161 | #undef HAVE_SETPGID | 161 | #undef HAVE_SETPGID |
| 162 | /* If you think about defining HAVE_GETCWD, don't: the alternative | ||
| 163 | getwd is redefined on w32.c, and does not really return the current | ||
| 164 | directory, to get the desired results elsewhere in Emacs */ | ||
| 162 | #undef HAVE_GETCWD | 165 | #undef HAVE_GETCWD |
| 163 | #define HAVE_SHUTDOWN 1 | 166 | #define HAVE_SHUTDOWN 1 |
| 164 | 167 | ||
| @@ -286,6 +289,12 @@ typedef int pid_t; | |||
| 286 | #define stricmp _stricmp | 289 | #define stricmp _stricmp |
| 287 | #define tzset _tzset | 290 | #define tzset _tzset |
| 288 | 291 | ||
| 292 | /* Include time.h before redirecting tzname, since MSVC's time.h | ||
| 293 | defines _tzname to call a function, but also declares tzname a | ||
| 294 | 2-element array. Having the redirection before including the | ||
| 295 | header thus has the effect of declaring a function that returns an | ||
| 296 | array, and triggers an error message. */ | ||
| 297 | #include <time.h> | ||
| 289 | #define tzname _tzname | 298 | #define tzname _tzname |
| 290 | #if !defined (_MSC_VER) || (_MSC_VER < 1400) | 299 | #if !defined (_MSC_VER) || (_MSC_VER < 1400) |
| 291 | #undef utime | 300 | #undef utime |
diff --git a/src/search.c b/src/search.c index f33965d4d70..503720b70ab 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* String search routines for GNU Emacs. | 1 | /* String search routines for GNU Emacs. |
| 2 | Copyright (C) 1985-1987, 1993-1994, 1997-1999, 2001-2012 | 2 | |
| 3 | Free Software Foundation, Inc. | 3 | Copyright (C) 1985-1987, 1993-1994, 1997-1999, 2001-2012 |
| 4 | Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 6 | 7 | ||
| @@ -2268,7 +2269,7 @@ DEFUN ("word-search-backward-lax", Fword_search_backward_lax, Sword_search_backw | |||
| 2268 | Set point to the beginning of the occurrence found, and return point. | 2269 | Set point to the beginning of the occurrence found, and return point. |
| 2269 | 2270 | ||
| 2270 | Unlike `word-search-backward', the end of STRING need not match a word | 2271 | Unlike `word-search-backward', the end of STRING need not match a word |
| 2271 | boundary unless it ends in whitespace. | 2272 | boundary, unless STRING ends in whitespace. |
| 2272 | 2273 | ||
| 2273 | An optional second argument bounds the search; it is a buffer position. | 2274 | An optional second argument bounds the search; it is a buffer position. |
| 2274 | The match found must not extend before that position. | 2275 | The match found must not extend before that position. |
| @@ -2290,7 +2291,7 @@ DEFUN ("word-search-forward-lax", Fword_search_forward_lax, Sword_search_forward | |||
| 2290 | Set point to the end of the occurrence found, and return point. | 2291 | Set point to the end of the occurrence found, and return point. |
| 2291 | 2292 | ||
| 2292 | Unlike `word-search-forward', the end of STRING need not match a word | 2293 | Unlike `word-search-forward', the end of STRING need not match a word |
| 2293 | boundary unless it ends in whitespace. | 2294 | boundary, unless STRING ends in whitespace. |
| 2294 | 2295 | ||
| 2295 | An optional second argument bounds the search; it is a buffer position. | 2296 | An optional second argument bounds the search; it is a buffer position. |
| 2296 | The match found must not extend after that position. | 2297 | The match found must not extend after that position. |
diff --git a/src/syntax.c b/src/syntax.c index 70e66ba1871..71da13e7a66 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -3498,7 +3498,7 @@ See the info node `(elisp)Syntax Properties' for a description of the | |||
| 3498 | 3498 | ||
| 3499 | DEFVAR_BOOL ("open-paren-in-column-0-is-defun-start", | 3499 | DEFVAR_BOOL ("open-paren-in-column-0-is-defun-start", |
| 3500 | open_paren_in_column_0_is_defun_start, | 3500 | open_paren_in_column_0_is_defun_start, |
| 3501 | doc: /* *Non-nil means an open paren in column 0 denotes the start of a defun. */); | 3501 | doc: /* Non-nil means an open paren in column 0 denotes the start of a defun. */); |
| 3502 | open_paren_in_column_0_is_defun_start = 1; | 3502 | open_paren_in_column_0_is_defun_start = 1; |
| 3503 | 3503 | ||
| 3504 | 3504 | ||
diff --git a/src/w32heap.c b/src/w32heap.c index 35ac4cbf31f..da8579896f2 100644 --- a/src/w32heap.c +++ b/src/w32heap.c | |||
| @@ -296,27 +296,3 @@ round_heap (unsigned long align) | |||
| 296 | if (need_to_alloc) | 296 | if (need_to_alloc) |
| 297 | sbrk (need_to_alloc); | 297 | sbrk (need_to_alloc); |
| 298 | } | 298 | } |
| 299 | |||
| 300 | #if (_MSC_VER >= 1000 && _MSC_VER < 1300 && !defined (USE_CRT_DLL)) | ||
| 301 | |||
| 302 | /* MSVC 4.2 invokes these functions from mainCRTStartup to initialize | ||
| 303 | a heap via HeapCreate. They are normally defined by the runtime, | ||
| 304 | but we override them here so that the unnecessary HeapCreate call | ||
| 305 | is not performed. */ | ||
| 306 | |||
| 307 | int __cdecl | ||
| 308 | _heap_init (void) | ||
| 309 | { | ||
| 310 | /* Stepping through the assembly indicates that mainCRTStartup is | ||
| 311 | expecting a nonzero success return value. */ | ||
| 312 | return 1; | ||
| 313 | } | ||
| 314 | |||
| 315 | void __cdecl | ||
| 316 | _heap_term (void) | ||
| 317 | { | ||
| 318 | return; | ||
| 319 | } | ||
| 320 | |||
| 321 | #endif | ||
| 322 | |||
diff --git a/src/w32menu.c b/src/w32menu.c index 4b3aa4f8047..dd741a01b5b 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -1173,18 +1173,23 @@ w32_dialog_show (FRAME_PTR f, int keymaps, | |||
| 1173 | static int | 1173 | static int |
| 1174 | is_simple_dialog (Lisp_Object contents) | 1174 | is_simple_dialog (Lisp_Object contents) |
| 1175 | { | 1175 | { |
| 1176 | Lisp_Object options = XCDR (contents); | 1176 | Lisp_Object options; |
| 1177 | Lisp_Object name, yes, no, other; | 1177 | Lisp_Object name, yes, no, other; |
| 1178 | 1178 | ||
| 1179 | if (!CONSP (contents)) | ||
| 1180 | return 0; | ||
| 1181 | options = XCDR (contents); | ||
| 1182 | |||
| 1179 | yes = build_string ("Yes"); | 1183 | yes = build_string ("Yes"); |
| 1180 | no = build_string ("No"); | 1184 | no = build_string ("No"); |
| 1181 | 1185 | ||
| 1182 | if (!CONSP (options)) | 1186 | if (!CONSP (options)) |
| 1183 | return 0; | 1187 | return 0; |
| 1184 | 1188 | ||
| 1185 | name = XCAR (XCAR (options)); | 1189 | name = XCAR (options); |
| 1186 | if (!CONSP (options)) | 1190 | if (!CONSP (name)) |
| 1187 | return 0; | 1191 | return 0; |
| 1192 | name = XCAR (name); | ||
| 1188 | 1193 | ||
| 1189 | if (!NILP (Fstring_equal (name, yes))) | 1194 | if (!NILP (Fstring_equal (name, yes))) |
| 1190 | other = no; | 1195 | other = no; |
| @@ -1197,7 +1202,10 @@ is_simple_dialog (Lisp_Object contents) | |||
| 1197 | if (!CONSP (options)) | 1202 | if (!CONSP (options)) |
| 1198 | return 0; | 1203 | return 0; |
| 1199 | 1204 | ||
| 1200 | name = XCAR (XCAR (options)); | 1205 | name = XCAR (options); |
| 1206 | if (!CONSP (name)) | ||
| 1207 | return 0; | ||
| 1208 | name = XCAR (name); | ||
| 1201 | if (NILP (Fstring_equal (name, other))) | 1209 | if (NILP (Fstring_equal (name, other))) |
| 1202 | return 0; | 1210 | return 0; |
| 1203 | 1211 | ||
| @@ -1223,6 +1231,7 @@ simple_dialog_show (FRAME_PTR f, Lisp_Object contents, Lisp_Object header) | |||
| 1223 | if (unicode_message_box) | 1231 | if (unicode_message_box) |
| 1224 | { | 1232 | { |
| 1225 | WCHAR *text, *title; | 1233 | WCHAR *text, *title; |
| 1234 | USE_SAFE_ALLOCA; | ||
| 1226 | 1235 | ||
| 1227 | if (STRINGP (temp)) | 1236 | if (STRINGP (temp)) |
| 1228 | { | 1237 | { |
| @@ -1232,7 +1241,7 @@ simple_dialog_show (FRAME_PTR f, Lisp_Object contents, Lisp_Object header) | |||
| 1232 | one utf16 word, so we cannot simply use the character | 1241 | one utf16 word, so we cannot simply use the character |
| 1233 | length of temp. */ | 1242 | length of temp. */ |
| 1234 | int utf8_len = strlen (utf8_text); | 1243 | int utf8_len = strlen (utf8_text); |
| 1235 | text = alloca ((utf8_len + 1) * sizeof (WCHAR)); | 1244 | SAFE_ALLOCA (text, WCHAR *, (utf8_len + 1) * sizeof (WCHAR)); |
| 1236 | utf8to16 (utf8_text, utf8_len, text); | 1245 | utf8to16 (utf8_text, utf8_len, text); |
| 1237 | } | 1246 | } |
| 1238 | else | 1247 | else |
| @@ -1252,6 +1261,7 @@ simple_dialog_show (FRAME_PTR f, Lisp_Object contents, Lisp_Object header) | |||
| 1252 | } | 1261 | } |
| 1253 | 1262 | ||
| 1254 | answer = unicode_message_box (FRAME_W32_WINDOW (f), text, title, type); | 1263 | answer = unicode_message_box (FRAME_W32_WINDOW (f), text, title, type); |
| 1264 | SAFE_FREE (); | ||
| 1255 | } | 1265 | } |
| 1256 | else | 1266 | else |
| 1257 | { | 1267 | { |
| @@ -1358,6 +1368,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) | |||
| 1358 | char *out_string, *p, *q; | 1368 | char *out_string, *p, *q; |
| 1359 | int return_value; | 1369 | int return_value; |
| 1360 | size_t nlen, orig_len; | 1370 | size_t nlen, orig_len; |
| 1371 | USE_SAFE_ALLOCA; | ||
| 1361 | 1372 | ||
| 1362 | if (menu_separator_name_p (wv->name)) | 1373 | if (menu_separator_name_p (wv->name)) |
| 1363 | { | 1374 | { |
| @@ -1373,7 +1384,8 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) | |||
| 1373 | 1384 | ||
| 1374 | if (wv->key != NULL) | 1385 | if (wv->key != NULL) |
| 1375 | { | 1386 | { |
| 1376 | out_string = alloca (strlen (wv->name) + strlen (wv->key) + 2); | 1387 | SAFE_ALLOCA (out_string, char *, |
| 1388 | strlen (wv->name) + strlen (wv->key) + 2); | ||
| 1377 | strcpy (out_string, wv->name); | 1389 | strcpy (out_string, wv->name); |
| 1378 | strcat (out_string, "\t"); | 1390 | strcat (out_string, "\t"); |
| 1379 | strcat (out_string, wv->key); | 1391 | strcat (out_string, wv->key); |
| @@ -1407,7 +1419,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) | |||
| 1407 | if (nlen > orig_len) | 1419 | if (nlen > orig_len) |
| 1408 | { | 1420 | { |
| 1409 | p = out_string; | 1421 | p = out_string; |
| 1410 | out_string = alloca (nlen + 1); | 1422 | SAFE_ALLOCA (out_string, char *, nlen + 1); |
| 1411 | q = out_string; | 1423 | q = out_string; |
| 1412 | while (*p) | 1424 | while (*p) |
| 1413 | { | 1425 | { |
| @@ -1467,7 +1479,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) | |||
| 1467 | if (fuFlags & MF_OWNERDRAW) | 1479 | if (fuFlags & MF_OWNERDRAW) |
| 1468 | utf16_string = local_alloc ((utf8_len + 1) * sizeof (WCHAR)); | 1480 | utf16_string = local_alloc ((utf8_len + 1) * sizeof (WCHAR)); |
| 1469 | else | 1481 | else |
| 1470 | utf16_string = alloca ((utf8_len + 1) * sizeof (WCHAR)); | 1482 | SAFE_ALLOCA (utf16_string, WCHAR *, (utf8_len + 1) * sizeof (WCHAR)); |
| 1471 | 1483 | ||
| 1472 | utf8to16 (out_string, utf8_len, utf16_string); | 1484 | utf8to16 (out_string, utf8_len, utf16_string); |
| 1473 | return_value = unicode_append_menu (menu, fuFlags, | 1485 | return_value = unicode_append_menu (menu, fuFlags, |
| @@ -1536,6 +1548,7 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item) | |||
| 1536 | FALSE, &info); | 1548 | FALSE, &info); |
| 1537 | } | 1549 | } |
| 1538 | } | 1550 | } |
| 1551 | SAFE_FREE (); | ||
| 1539 | return return_value; | 1552 | return return_value; |
| 1540 | } | 1553 | } |
| 1541 | 1554 | ||
diff --git a/src/w32proc.c b/src/w32proc.c index f7982f36913..28591f90128 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -2067,8 +2067,8 @@ DEFUN ("w32-get-console-codepage", Fw32_get_console_codepage, | |||
| 2067 | 2067 | ||
| 2068 | DEFUN ("w32-set-console-codepage", Fw32_set_console_codepage, | 2068 | DEFUN ("w32-set-console-codepage", Fw32_set_console_codepage, |
| 2069 | Sw32_set_console_codepage, 1, 1, 0, | 2069 | Sw32_set_console_codepage, 1, 1, 0, |
| 2070 | doc: /* Make Windows codepage CP be the current codepage setting for Emacs. | 2070 | doc: /* Make Windows codepage CP be the codepage for Emacs tty keyboard input. |
| 2071 | The codepage setting affects keyboard input and display in tty mode. | 2071 | This codepage setting affects keyboard input in tty mode. |
| 2072 | If successful, the new CP is returned, otherwise nil. */) | 2072 | If successful, the new CP is returned, otherwise nil. */) |
| 2073 | (Lisp_Object cp) | 2073 | (Lisp_Object cp) |
| 2074 | { | 2074 | { |
| @@ -2095,8 +2095,8 @@ DEFUN ("w32-get-console-output-codepage", Fw32_get_console_output_codepage, | |||
| 2095 | 2095 | ||
| 2096 | DEFUN ("w32-set-console-output-codepage", Fw32_set_console_output_codepage, | 2096 | DEFUN ("w32-set-console-output-codepage", Fw32_set_console_output_codepage, |
| 2097 | Sw32_set_console_output_codepage, 1, 1, 0, | 2097 | Sw32_set_console_output_codepage, 1, 1, 0, |
| 2098 | doc: /* Make Windows codepage CP be the current codepage setting for Emacs. | 2098 | doc: /* Make Windows codepage CP be the codepage for Emacs console output. |
| 2099 | The codepage setting affects keyboard input and display in tty mode. | 2099 | This codepage setting affects display in tty mode. |
| 2100 | If successful, the new CP is returned, otherwise nil. */) | 2100 | If successful, the new CP is returned, otherwise nil. */) |
| 2101 | (Lisp_Object cp) | 2101 | (Lisp_Object cp) |
| 2102 | { | 2102 | { |
| @@ -2114,7 +2114,7 @@ If successful, the new CP is returned, otherwise nil. */) | |||
| 2114 | 2114 | ||
| 2115 | DEFUN ("w32-get-codepage-charset", Fw32_get_codepage_charset, | 2115 | DEFUN ("w32-get-codepage-charset", Fw32_get_codepage_charset, |
| 2116 | Sw32_get_codepage_charset, 1, 1, 0, | 2116 | Sw32_get_codepage_charset, 1, 1, 0, |
| 2117 | doc: /* Return charset of codepage CP. | 2117 | doc: /* Return charset ID corresponding to codepage CP. |
| 2118 | Returns nil if the codepage is not valid. */) | 2118 | Returns nil if the codepage is not valid. */) |
| 2119 | (Lisp_Object cp) | 2119 | (Lisp_Object cp) |
| 2120 | { | 2120 | { |
diff --git a/src/w32term.c b/src/w32term.c index 8a0e9efc943..18a3753f9e9 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -6411,7 +6411,7 @@ the cursor have no effect. */); | |||
| 6411 | from cus-start.el and other places, like "M-x set-variable". */ | 6411 | from cus-start.el and other places, like "M-x set-variable". */ |
| 6412 | DEFVAR_BOOL ("x-use-underline-position-properties", | 6412 | DEFVAR_BOOL ("x-use-underline-position-properties", |
| 6413 | x_use_underline_position_properties, | 6413 | x_use_underline_position_properties, |
| 6414 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. | 6414 | doc: /* Non-nil means make use of UNDERLINE_POSITION font properties. |
| 6415 | A value of nil means ignore them. If you encounter fonts with bogus | 6415 | A value of nil means ignore them. If you encounter fonts with bogus |
| 6416 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior | 6416 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior |
| 6417 | to 4.1, set this to nil. You can also use `underline-minimum-offset' | 6417 | to 4.1, set this to nil. You can also use `underline-minimum-offset' |
| @@ -6421,7 +6421,7 @@ sizes. */); | |||
| 6421 | 6421 | ||
| 6422 | DEFVAR_BOOL ("x-underline-at-descent-line", | 6422 | DEFVAR_BOOL ("x-underline-at-descent-line", |
| 6423 | x_underline_at_descent_line, | 6423 | x_underline_at_descent_line, |
| 6424 | doc: /* *Non-nil means to draw the underline at the same place as the descent line. | 6424 | doc: /* Non-nil means to draw the underline at the same place as the descent line. |
| 6425 | A value of nil means to draw the underline according to the value of the | 6425 | A value of nil means to draw the underline according to the value of the |
| 6426 | variable `x-use-underline-position-properties', which is usually at the | 6426 | variable `x-use-underline-position-properties', which is usually at the |
| 6427 | baseline level. The default value is nil. */); | 6427 | baseline level. The default value is nil. */); |
diff --git a/src/window.c b/src/window.c index af70890d4e4..7fda1b3bc54 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -122,9 +122,6 @@ static int window_initialized; | |||
| 122 | /* Hook to run when window config changes. */ | 122 | /* Hook to run when window config changes. */ |
| 123 | static Lisp_Object Qwindow_configuration_change_hook; | 123 | static Lisp_Object Qwindow_configuration_change_hook; |
| 124 | 124 | ||
| 125 | /* If non-nil, run_window_configuration_change_hook does nothing. */ | ||
| 126 | Lisp_Object inhibit_window_configuration_change_hook; | ||
| 127 | |||
| 128 | /* Used by the function window_scroll_pixel_based */ | 125 | /* Used by the function window_scroll_pixel_based */ |
| 129 | static int window_scroll_pixel_based_preserve_x; | 126 | static int window_scroll_pixel_based_preserve_x; |
| 130 | static int window_scroll_pixel_based_preserve_y; | 127 | static int window_scroll_pixel_based_preserve_y; |
| @@ -2569,6 +2566,7 @@ window-start value is reasonable when this function is called. */) | |||
| 2569 | Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; | 2566 | Lisp_Object sibling, pwindow, swindow IF_LINT (= Qnil), delta; |
| 2570 | ptrdiff_t startpos IF_LINT (= 0); | 2567 | ptrdiff_t startpos IF_LINT (= 0); |
| 2571 | int top IF_LINT (= 0), new_top, resize_failed; | 2568 | int top IF_LINT (= 0), new_top, resize_failed; |
| 2569 | Mouse_HLInfo *hlinfo; | ||
| 2572 | 2570 | ||
| 2573 | w = decode_any_window (window); | 2571 | w = decode_any_window (window); |
| 2574 | XSETWINDOW (window, w); | 2572 | XSETWINDOW (window, w); |
| @@ -2649,6 +2647,20 @@ window-start value is reasonable when this function is called. */) | |||
| 2649 | } | 2647 | } |
| 2650 | 2648 | ||
| 2651 | BLOCK_INPUT; | 2649 | BLOCK_INPUT; |
| 2650 | hlinfo = MOUSE_HL_INFO (f); | ||
| 2651 | /* We are going to free the glyph matrices of WINDOW, and with that | ||
| 2652 | we might lose any information about glyph rows that have some of | ||
| 2653 | their glyphs highlighted in mouse face. (These rows are marked | ||
| 2654 | with a non-zero mouse_face_p flag.) If WINDOW indeed has some | ||
| 2655 | glyphs highlighted in mouse face, signal to frame's up-to-date | ||
| 2656 | hook that mouse highlight was overwritten, so that it will | ||
| 2657 | arrange for redisplaying the highlight. */ | ||
| 2658 | if (EQ (hlinfo->mouse_face_window, window)) | ||
| 2659 | { | ||
| 2660 | hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1; | ||
| 2661 | hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1; | ||
| 2662 | hlinfo->mouse_face_window = Qnil; | ||
| 2663 | } | ||
| 2652 | free_window_matrices (r); | 2664 | free_window_matrices (r); |
| 2653 | 2665 | ||
| 2654 | windows_or_buffers_changed++; | 2666 | windows_or_buffers_changed++; |
| @@ -2898,7 +2910,7 @@ run_window_configuration_change_hook (struct frame *f) | |||
| 2898 | = Fdefault_value (Qwindow_configuration_change_hook); | 2910 | = Fdefault_value (Qwindow_configuration_change_hook); |
| 2899 | XSETFRAME (frame, f); | 2911 | XSETFRAME (frame, f); |
| 2900 | 2912 | ||
| 2901 | if (NILP (Vrun_hooks) || !NILP (inhibit_window_configuration_change_hook)) | 2913 | if (NILP (Vrun_hooks) || !NILP (inhibit_lisp_code)) |
| 2902 | return; | 2914 | return; |
| 2903 | 2915 | ||
| 2904 | /* Use the right buffer. Matters when running the local hooks. */ | 2916 | /* Use the right buffer. Matters when running the local hooks. */ |
| @@ -6529,8 +6541,6 @@ syms_of_window (void) | |||
| 6529 | window_scroll_preserve_hpos = -1; | 6541 | window_scroll_preserve_hpos = -1; |
| 6530 | window_scroll_preserve_vpos = -1; | 6542 | window_scroll_preserve_vpos = -1; |
| 6531 | 6543 | ||
| 6532 | inhibit_window_configuration_change_hook = Qnil; | ||
| 6533 | |||
| 6534 | DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function, | 6544 | DEFVAR_LISP ("temp-buffer-show-function", Vtemp_buffer_show_function, |
| 6535 | doc: /* Non-nil means call as function to display a help buffer. | 6545 | doc: /* Non-nil means call as function to display a help buffer. |
| 6536 | The function is called with one argument, the buffer to be displayed. | 6546 | The function is called with one argument, the buffer to be displayed. |
diff --git a/src/window.h b/src/window.h index f4a5f52b9a5..ea127ca95a8 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -810,10 +810,6 @@ extern Lisp_Object Vmouse_window; | |||
| 810 | 810 | ||
| 811 | extern Lisp_Object Vmouse_event; | 811 | extern Lisp_Object Vmouse_event; |
| 812 | 812 | ||
| 813 | /* If non-nil, run_window_configuration_change_hook does nothing. */ | ||
| 814 | |||
| 815 | extern Lisp_Object inhibit_window_configuration_change_hook; | ||
| 816 | |||
| 817 | EXFUN (Fnext_window, 3); | 813 | EXFUN (Fnext_window, 3); |
| 818 | EXFUN (Fselect_window, 2); | 814 | EXFUN (Fselect_window, 2); |
| 819 | EXFUN (Fset_window_buffer, 3); | 815 | EXFUN (Fset_window_buffer, 3); |
diff --git a/src/xdisp.c b/src/xdisp.c index c3403031650..d051e88e6bb 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -3676,7 +3676,9 @@ handle_face_prop (struct it *it) | |||
| 3676 | with, so that overlay strings appear in the same face as | 3676 | with, so that overlay strings appear in the same face as |
| 3677 | surrounding text, unless they specify their own | 3677 | surrounding text, unless they specify their own |
| 3678 | faces. */ | 3678 | faces. */ |
| 3679 | base_face_id = underlying_face_id (it); | 3679 | base_face_id = it->string_from_prefix_prop_p |
| 3680 | ? DEFAULT_FACE_ID | ||
| 3681 | : underlying_face_id (it); | ||
| 3680 | } | 3682 | } |
| 3681 | 3683 | ||
| 3682 | new_face_id = face_at_string_position (it->w, | 3684 | new_face_id = face_at_string_position (it->w, |
| @@ -5584,6 +5586,7 @@ push_it (struct it *it, struct text_pos *position) | |||
| 5584 | p->font_height = it->font_height; | 5586 | p->font_height = it->font_height; |
| 5585 | p->voffset = it->voffset; | 5587 | p->voffset = it->voffset; |
| 5586 | p->string_from_display_prop_p = it->string_from_display_prop_p; | 5588 | p->string_from_display_prop_p = it->string_from_display_prop_p; |
| 5589 | p->string_from_prefix_prop_p = it->string_from_prefix_prop_p; | ||
| 5587 | p->display_ellipsis_p = 0; | 5590 | p->display_ellipsis_p = 0; |
| 5588 | p->line_wrap = it->line_wrap; | 5591 | p->line_wrap = it->line_wrap; |
| 5589 | p->bidi_p = it->bidi_p; | 5592 | p->bidi_p = it->bidi_p; |
| @@ -5693,6 +5696,7 @@ pop_it (struct it *it) | |||
| 5693 | it->font_height = p->font_height; | 5696 | it->font_height = p->font_height; |
| 5694 | it->voffset = p->voffset; | 5697 | it->voffset = p->voffset; |
| 5695 | it->string_from_display_prop_p = p->string_from_display_prop_p; | 5698 | it->string_from_display_prop_p = p->string_from_display_prop_p; |
| 5699 | it->string_from_prefix_prop_p = p->string_from_prefix_prop_p; | ||
| 5696 | it->line_wrap = p->line_wrap; | 5700 | it->line_wrap = p->line_wrap; |
| 5697 | it->bidi_p = p->bidi_p; | 5701 | it->bidi_p = p->bidi_p; |
| 5698 | it->paragraph_embedding = p->paragraph_embedding; | 5702 | it->paragraph_embedding = p->paragraph_embedding; |
| @@ -6123,6 +6127,8 @@ reseat_1 (struct it *it, struct text_pos pos, int set_stop_p) | |||
| 6123 | it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); | 6127 | it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); |
| 6124 | it->sp = 0; | 6128 | it->sp = 0; |
| 6125 | it->string_from_display_prop_p = 0; | 6129 | it->string_from_display_prop_p = 0; |
| 6130 | it->string_from_prefix_prop_p = 0; | ||
| 6131 | |||
| 6126 | it->from_disp_prop_p = 0; | 6132 | it->from_disp_prop_p = 0; |
| 6127 | it->face_before_selective_p = 0; | 6133 | it->face_before_selective_p = 0; |
| 6128 | if (it->bidi_p) | 6134 | if (it->bidi_p) |
| @@ -7368,7 +7374,7 @@ next_element_from_string (struct it *it) | |||
| 7368 | if (it->current.overlay_string_index >= 0) | 7374 | if (it->current.overlay_string_index >= 0) |
| 7369 | { | 7375 | { |
| 7370 | /* Get the next character from an overlay string. In overlay | 7376 | /* Get the next character from an overlay string. In overlay |
| 7371 | strings, There is no field width or padding with spaces to | 7377 | strings, there is no field width or padding with spaces to |
| 7372 | do. */ | 7378 | do. */ |
| 7373 | if (IT_STRING_CHARPOS (*it) >= SCHARS (it->string)) | 7379 | if (IT_STRING_CHARPOS (*it) >= SCHARS (it->string)) |
| 7374 | { | 7380 | { |
| @@ -8966,7 +8972,6 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) | |||
| 8966 | { | 8972 | { |
| 8967 | /* DVPOS == 0 means move to the start of the screen line. */ | 8973 | /* DVPOS == 0 means move to the start of the screen line. */ |
| 8968 | move_it_vertically_backward (it, 0); | 8974 | move_it_vertically_backward (it, 0); |
| 8969 | xassert (it->current_x == 0 && it->hpos == 0); | ||
| 8970 | /* Let next call to line_bottom_y calculate real line height */ | 8975 | /* Let next call to line_bottom_y calculate real line height */ |
| 8971 | last_height = 0; | 8976 | last_height = 0; |
| 8972 | } | 8977 | } |
| @@ -8974,7 +8979,20 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) | |||
| 8974 | { | 8979 | { |
| 8975 | move_it_to (it, -1, -1, -1, it->vpos + dvpos, MOVE_TO_VPOS); | 8980 | move_it_to (it, -1, -1, -1, it->vpos + dvpos, MOVE_TO_VPOS); |
| 8976 | if (!IT_POS_VALID_AFTER_MOVE_P (it)) | 8981 | if (!IT_POS_VALID_AFTER_MOVE_P (it)) |
| 8977 | move_it_to (it, IT_CHARPOS (*it) + 1, -1, -1, -1, MOVE_TO_POS); | 8982 | { |
| 8983 | /* Only move to the next buffer position if we ended up in a | ||
| 8984 | string from display property, not in an overlay string | ||
| 8985 | (before-string or after-string). That is because the | ||
| 8986 | latter don't conceal the underlying buffer position, so | ||
| 8987 | we can ask to move the iterator to the exact position we | ||
| 8988 | are interested in. Note that, even if we are already at | ||
| 8989 | IT_CHARPOS (*it), the call below is not a no-op, as it | ||
| 8990 | will detect that we are at the end of the string, pop the | ||
| 8991 | iterator, and compute it->current_x and it->hpos | ||
| 8992 | correctly. */ | ||
| 8993 | move_it_to (it, IT_CHARPOS (*it) + it->string_from_display_prop_p, | ||
| 8994 | -1, -1, -1, MOVE_TO_POS); | ||
| 8995 | } | ||
| 8978 | } | 8996 | } |
| 8979 | else | 8997 | else |
| 8980 | { | 8998 | { |
| @@ -13801,16 +13819,31 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 13801 | 13819 | ||
| 13802 | chprop = Fget_char_property (make_number (glyph_pos), Qcursor, | 13820 | chprop = Fget_char_property (make_number (glyph_pos), Qcursor, |
| 13803 | glyph->object); | 13821 | glyph->object); |
| 13822 | if (!NILP (chprop)) | ||
| 13823 | { | ||
| 13824 | /* If the string came from a `display' text property, | ||
| 13825 | look up the buffer position of that property and | ||
| 13826 | use that position to update bpos_max, as if we | ||
| 13827 | actually saw such a position in one of the row's | ||
| 13828 | glyphs. This helps with supporting integer values | ||
| 13829 | of `cursor' property on the display string in | ||
| 13830 | situations where most or all of the row's buffer | ||
| 13831 | text is completely covered by display properties, | ||
| 13832 | so that no glyph with valid buffer positions is | ||
| 13833 | ever seen in the row. */ | ||
| 13834 | ptrdiff_t prop_pos = | ||
| 13835 | string_buffer_position_lim (glyph->object, pos_before, | ||
| 13836 | pos_after, 0); | ||
| 13837 | |||
| 13838 | if (prop_pos >= pos_before) | ||
| 13839 | bpos_max = prop_pos - 1; | ||
| 13840 | } | ||
| 13804 | if (INTEGERP (chprop)) | 13841 | if (INTEGERP (chprop)) |
| 13805 | { | 13842 | { |
| 13806 | bpos_covered = bpos_max + XINT (chprop); | 13843 | bpos_covered = bpos_max + XINT (chprop); |
| 13807 | /* If the `cursor' property covers buffer positions up | 13844 | /* If the `cursor' property covers buffer positions up |
| 13808 | to and including point, we should display cursor on | 13845 | to and including point, we should display cursor on |
| 13809 | this glyph. Note that overlays and text properties | 13846 | this glyph. Note that, if a `cursor' property on one |
| 13810 | with string values stop bidi reordering, so every | ||
| 13811 | buffer position to the left of the string is always | ||
| 13812 | smaller than any position to the right of the | ||
| 13813 | string. Therefore, if a `cursor' property on one | ||
| 13814 | of the string's characters has an integer value, we | 13847 | of the string's characters has an integer value, we |
| 13815 | will break out of the loop below _before_ we get to | 13848 | will break out of the loop below _before_ we get to |
| 13816 | the position match above. IOW, integer values of | 13849 | the position match above. IOW, integer values of |
| @@ -13870,6 +13903,15 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 13870 | 13903 | ||
| 13871 | chprop = Fget_char_property (make_number (glyph_pos), Qcursor, | 13904 | chprop = Fget_char_property (make_number (glyph_pos), Qcursor, |
| 13872 | glyph->object); | 13905 | glyph->object); |
| 13906 | if (!NILP (chprop)) | ||
| 13907 | { | ||
| 13908 | ptrdiff_t prop_pos = | ||
| 13909 | string_buffer_position_lim (glyph->object, pos_before, | ||
| 13910 | pos_after, 0); | ||
| 13911 | |||
| 13912 | if (prop_pos >= pos_before) | ||
| 13913 | bpos_max = prop_pos - 1; | ||
| 13914 | } | ||
| 13873 | if (INTEGERP (chprop)) | 13915 | if (INTEGERP (chprop)) |
| 13874 | { | 13916 | { |
| 13875 | bpos_covered = bpos_max + XINT (chprop); | 13917 | bpos_covered = bpos_max + XINT (chprop); |
| @@ -14007,15 +14049,18 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14007 | || pos <= tem) | 14049 | || pos <= tem) |
| 14008 | { | 14050 | { |
| 14009 | /* If the string from which this glyph came is | 14051 | /* If the string from which this glyph came is |
| 14010 | found in the buffer at point, then we've | 14052 | found in the buffer at point, or at position |
| 14011 | found the glyph we've been looking for. If | 14053 | that is closer to point than pos_after, then |
| 14012 | it comes from an overlay (tem == 0), and it | 14054 | we've found the glyph we've been looking for. |
| 14013 | has the `cursor' property on one of its | 14055 | If it comes from an overlay (tem == 0), and |
| 14056 | it has the `cursor' property on one of its | ||
| 14014 | glyphs, record that glyph as a candidate for | 14057 | glyphs, record that glyph as a candidate for |
| 14015 | displaying the cursor. (As in the | 14058 | displaying the cursor. (As in the |
| 14016 | unidirectional version, we will display the | 14059 | unidirectional version, we will display the |
| 14017 | cursor on the last candidate we find.) */ | 14060 | cursor on the last candidate we find.) */ |
| 14018 | if (tem == 0 || tem == pt_old) | 14061 | if (tem == 0 |
| 14062 | || tem == pt_old | ||
| 14063 | || (tem - pt_old > 0 && tem < pos_after)) | ||
| 14019 | { | 14064 | { |
| 14020 | /* The glyphs from this string could have | 14065 | /* The glyphs from this string could have |
| 14021 | been reordered. Find the one with the | 14066 | been reordered. Find the one with the |
| @@ -14053,7 +14098,8 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 14053 | } | 14098 | } |
| 14054 | } | 14099 | } |
| 14055 | 14100 | ||
| 14056 | if (tem == pt_old) | 14101 | if (tem == pt_old |
| 14102 | || (tem - pt_old > 0 && tem < pos_after)) | ||
| 14057 | goto compute_x; | 14103 | goto compute_x; |
| 14058 | } | 14104 | } |
| 14059 | if (tem) | 14105 | if (tem) |
| @@ -15609,7 +15655,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15609 | accessible region of the buffer. This can happen when we | 15655 | accessible region of the buffer. This can happen when we |
| 15610 | have just switched to a different buffer and/or changed | 15656 | have just switched to a different buffer and/or changed |
| 15611 | its restriction. In that case, startp is initialized to | 15657 | its restriction. In that case, startp is initialized to |
| 15612 | the character position 1 (BEG) because we did not yet | 15658 | the character position 1 (BEGV) because we did not yet |
| 15613 | have chance to display the buffer even once. */ | 15659 | have chance to display the buffer even once. */ |
| 15614 | && BEGV <= CHARPOS (startp) && CHARPOS (startp) <= ZV) | 15660 | && BEGV <= CHARPOS (startp) && CHARPOS (startp) <= ZV) |
| 15615 | { | 15661 | { |
| @@ -15618,7 +15664,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15618 | 15664 | ||
| 15619 | SAVE_IT (it1, it, it1data); | 15665 | SAVE_IT (it1, it, it1data); |
| 15620 | start_display (&it1, w, startp); | 15666 | start_display (&it1, w, startp); |
| 15621 | move_it_vertically (&it1, margin); | 15667 | move_it_vertically (&it1, margin * FRAME_LINE_HEIGHT (f)); |
| 15622 | margin_pos = IT_CHARPOS (it1); | 15668 | margin_pos = IT_CHARPOS (it1); |
| 15623 | RESTORE_IT (&it, &it, it1data); | 15669 | RESTORE_IT (&it, &it, it1data); |
| 15624 | } | 15670 | } |
| @@ -16329,7 +16375,10 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 16329 | ++first_row_to_display) | 16375 | ++first_row_to_display) |
| 16330 | { | 16376 | { |
| 16331 | if (PT >= MATRIX_ROW_START_CHARPOS (first_row_to_display) | 16377 | if (PT >= MATRIX_ROW_START_CHARPOS (first_row_to_display) |
| 16332 | && PT < MATRIX_ROW_END_CHARPOS (first_row_to_display)) | 16378 | && (PT < MATRIX_ROW_END_CHARPOS (first_row_to_display) |
| 16379 | || (PT == MATRIX_ROW_END_CHARPOS (first_row_to_display) | ||
| 16380 | && first_row_to_display->ends_at_zv_p | ||
| 16381 | && pt_row == NULL))) | ||
| 16333 | pt_row = first_row_to_display; | 16382 | pt_row = first_row_to_display; |
| 16334 | } | 16383 | } |
| 16335 | 16384 | ||
| @@ -16421,7 +16470,9 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 16421 | if (pt_row) | 16470 | if (pt_row) |
| 16422 | { | 16471 | { |
| 16423 | for (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos); | 16472 | for (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos); |
| 16424 | row < bottom_row && PT >= MATRIX_ROW_END_CHARPOS (row); | 16473 | row < bottom_row |
| 16474 | && PT >= MATRIX_ROW_END_CHARPOS (row) | ||
| 16475 | && !row->ends_at_zv_p; | ||
| 16425 | row++) | 16476 | row++) |
| 16426 | { | 16477 | { |
| 16427 | w->cursor.vpos++; | 16478 | w->cursor.vpos++; |
| @@ -18168,8 +18219,10 @@ append_space_for_newline (struct it *it, int default_face_p) | |||
| 18168 | it->c = it->char_to_display = ' '; | 18219 | it->c = it->char_to_display = ' '; |
| 18169 | it->len = 1; | 18220 | it->len = 1; |
| 18170 | 18221 | ||
| 18222 | /* If the default face was remapped, be sure to use the | ||
| 18223 | remapped face for the appended newline. */ | ||
| 18171 | if (default_face_p) | 18224 | if (default_face_p) |
| 18172 | it->face_id = DEFAULT_FACE_ID; | 18225 | it->face_id = lookup_basic_face (it->f, DEFAULT_FACE_ID); |
| 18173 | else if (it->face_before_selective_p) | 18226 | else if (it->face_before_selective_p) |
| 18174 | it->face_id = it->saved_face_id; | 18227 | it->face_id = it->saved_face_id; |
| 18175 | face = FACE_FROM_ID (it->f, it->face_id); | 18228 | face = FACE_FROM_ID (it->f, it->face_id); |
| @@ -18205,7 +18258,7 @@ append_space_for_newline (struct it *it, int default_face_p) | |||
| 18205 | static void | 18258 | static void |
| 18206 | extend_face_to_end_of_line (struct it *it) | 18259 | extend_face_to_end_of_line (struct it *it) |
| 18207 | { | 18260 | { |
| 18208 | struct face *face; | 18261 | struct face *face, *default_face; |
| 18209 | struct frame *f = it->f; | 18262 | struct frame *f = it->f; |
| 18210 | 18263 | ||
| 18211 | /* If line is already filled, do nothing. Non window-system frames | 18264 | /* If line is already filled, do nothing. Non window-system frames |
| @@ -18219,6 +18272,9 @@ extend_face_to_end_of_line (struct it *it) | |||
| 18219 | && !it->glyph_row->continued_p)) | 18272 | && !it->glyph_row->continued_p)) |
| 18220 | return; | 18273 | return; |
| 18221 | 18274 | ||
| 18275 | /* The default face, possibly remapped. */ | ||
| 18276 | default_face = FACE_FROM_ID (f, lookup_basic_face (f, DEFAULT_FACE_ID)); | ||
| 18277 | |||
| 18222 | /* Face extension extends the background and box of IT->face_id | 18278 | /* Face extension extends the background and box of IT->face_id |
| 18223 | to the end of the line. If the background equals the background | 18279 | to the end of the line. If the background equals the background |
| 18224 | of the frame, we don't have to do anything. */ | 18280 | of the frame, we don't have to do anything. */ |
| @@ -18256,7 +18312,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 18256 | if (it->glyph_row->used[TEXT_AREA] == 0) | 18312 | if (it->glyph_row->used[TEXT_AREA] == 0) |
| 18257 | { | 18313 | { |
| 18258 | it->glyph_row->glyphs[TEXT_AREA][0] = space_glyph; | 18314 | it->glyph_row->glyphs[TEXT_AREA][0] = space_glyph; |
| 18259 | it->glyph_row->glyphs[TEXT_AREA][0].face_id = it->face_id; | 18315 | it->glyph_row->glyphs[TEXT_AREA][0].face_id = face->id; |
| 18260 | it->glyph_row->used[TEXT_AREA] = 1; | 18316 | it->glyph_row->used[TEXT_AREA] = 1; |
| 18261 | } | 18317 | } |
| 18262 | #ifdef HAVE_WINDOW_SYSTEM | 18318 | #ifdef HAVE_WINDOW_SYSTEM |
| @@ -18292,7 +18348,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 18292 | face, to avoid painting the rest of the window with | 18348 | face, to avoid painting the rest of the window with |
| 18293 | the region face, if the region ends at ZV. */ | 18349 | the region face, if the region ends at ZV. */ |
| 18294 | if (it->glyph_row->ends_at_zv_p) | 18350 | if (it->glyph_row->ends_at_zv_p) |
| 18295 | it->face_id = DEFAULT_FACE_ID; | 18351 | it->face_id = default_face->id; |
| 18296 | else | 18352 | else |
| 18297 | it->face_id = face->id; | 18353 | it->face_id = face->id; |
| 18298 | append_stretch_glyph (it, make_number (0), stretch_width, | 18354 | append_stretch_glyph (it, make_number (0), stretch_width, |
| @@ -18325,7 +18381,7 @@ extend_face_to_end_of_line (struct it *it) | |||
| 18325 | avoid painting the rest of the window with the region face, | 18381 | avoid painting the rest of the window with the region face, |
| 18326 | if the region ends at ZV. */ | 18382 | if the region ends at ZV. */ |
| 18327 | if (it->glyph_row->ends_at_zv_p) | 18383 | if (it->glyph_row->ends_at_zv_p) |
| 18328 | it->face_id = DEFAULT_FACE_ID; | 18384 | it->face_id = default_face->id; |
| 18329 | else | 18385 | else |
| 18330 | it->face_id = face->id; | 18386 | it->face_id = face->id; |
| 18331 | 18387 | ||
| @@ -18458,9 +18514,11 @@ cursor_row_p (struct glyph_row *row) | |||
| 18458 | /* Suppose the row ends on a string. | 18514 | /* Suppose the row ends on a string. |
| 18459 | Unless the row is continued, that means it ends on a newline | 18515 | Unless the row is continued, that means it ends on a newline |
| 18460 | in the string. If it's anything other than a display string | 18516 | in the string. If it's anything other than a display string |
| 18461 | (e.g. a before-string from an overlay), we don't want the | 18517 | (e.g., a before-string from an overlay), we don't want the |
| 18462 | cursor there. (This heuristic seems to give the optimal | 18518 | cursor there. (This heuristic seems to give the optimal |
| 18463 | behavior for the various types of multi-line strings.) */ | 18519 | behavior for the various types of multi-line strings.) |
| 18520 | One exception: if the string has `cursor' property on one of | ||
| 18521 | its characters, we _do_ want the cursor there. */ | ||
| 18464 | if (CHARPOS (row->end.string_pos) >= 0) | 18522 | if (CHARPOS (row->end.string_pos) >= 0) |
| 18465 | { | 18523 | { |
| 18466 | if (row->continued_p) | 18524 | if (row->continued_p) |
| @@ -18482,6 +18540,25 @@ cursor_row_p (struct glyph_row *row) | |||
| 18482 | result = | 18540 | result = |
| 18483 | (!NILP (prop) | 18541 | (!NILP (prop) |
| 18484 | && display_prop_string_p (prop, glyph->object)); | 18542 | && display_prop_string_p (prop, glyph->object)); |
| 18543 | /* If there's a `cursor' property on one of the | ||
| 18544 | string's characters, this row is a cursor row, | ||
| 18545 | even though this is not a display string. */ | ||
| 18546 | if (!result) | ||
| 18547 | { | ||
| 18548 | Lisp_Object s = glyph->object; | ||
| 18549 | |||
| 18550 | for ( ; glyph >= beg && EQ (glyph->object, s); --glyph) | ||
| 18551 | { | ||
| 18552 | ptrdiff_t gpos = glyph->charpos; | ||
| 18553 | |||
| 18554 | if (!NILP (Fget_char_property (make_number (gpos), | ||
| 18555 | Qcursor, s))) | ||
| 18556 | { | ||
| 18557 | result = 1; | ||
| 18558 | break; | ||
| 18559 | } | ||
| 18560 | } | ||
| 18561 | } | ||
| 18485 | break; | 18562 | break; |
| 18486 | } | 18563 | } |
| 18487 | } | 18564 | } |
| @@ -18520,7 +18597,7 @@ cursor_row_p (struct glyph_row *row) | |||
| 18520 | `line-prefix' and `wrap-prefix' properties. */ | 18597 | `line-prefix' and `wrap-prefix' properties. */ |
| 18521 | 18598 | ||
| 18522 | static int | 18599 | static int |
| 18523 | push_display_prop (struct it *it, Lisp_Object prop) | 18600 | push_prefix_prop (struct it *it, Lisp_Object prop) |
| 18524 | { | 18601 | { |
| 18525 | struct text_pos pos = | 18602 | struct text_pos pos = |
| 18526 | STRINGP (it->string) ? it->current.string_pos : it->current.pos; | 18603 | STRINGP (it->string) ? it->current.string_pos : it->current.pos; |
| @@ -18544,6 +18621,7 @@ push_display_prop (struct it *it, Lisp_Object prop) | |||
| 18544 | } | 18621 | } |
| 18545 | 18622 | ||
| 18546 | it->string = prop; | 18623 | it->string = prop; |
| 18624 | it->string_from_prefix_prop_p = 1; | ||
| 18547 | it->multibyte_p = STRING_MULTIBYTE (it->string); | 18625 | it->multibyte_p = STRING_MULTIBYTE (it->string); |
| 18548 | it->current.overlay_string_index = -1; | 18626 | it->current.overlay_string_index = -1; |
| 18549 | IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0; | 18627 | IT_STRING_CHARPOS (*it) = IT_STRING_BYTEPOS (*it) = 0; |
| @@ -18630,7 +18708,7 @@ handle_line_prefix (struct it *it) | |||
| 18630 | if (NILP (prefix)) | 18708 | if (NILP (prefix)) |
| 18631 | prefix = Vline_prefix; | 18709 | prefix = Vline_prefix; |
| 18632 | } | 18710 | } |
| 18633 | if (! NILP (prefix) && push_display_prop (it, prefix)) | 18711 | if (! NILP (prefix) && push_prefix_prop (it, prefix)) |
| 18634 | { | 18712 | { |
| 18635 | /* If the prefix is wider than the window, and we try to wrap | 18713 | /* If the prefix is wider than the window, and we try to wrap |
| 18636 | it, it would acquire its own wrap prefix, and so on till the | 18714 | it, it would acquire its own wrap prefix, and so on till the |
| @@ -18967,8 +19045,13 @@ display_line (struct it *it) | |||
| 18967 | /* A row that displays right-to-left text must always have | 19045 | /* A row that displays right-to-left text must always have |
| 18968 | its last face extended all the way to the end of line, | 19046 | its last face extended all the way to the end of line, |
| 18969 | even if this row ends in ZV, because we still write to | 19047 | even if this row ends in ZV, because we still write to |
| 18970 | the screen left to right. */ | 19048 | the screen left to right. We also need to extend the |
| 18971 | if (row->reversed_p) | 19049 | last face if the default face is remapped to some |
| 19050 | different face, otherwise the functions that clear | ||
| 19051 | portions of the screen will clear with the default face's | ||
| 19052 | background color. */ | ||
| 19053 | if (row->reversed_p | ||
| 19054 | || lookup_basic_face (it->f, DEFAULT_FACE_ID) != DEFAULT_FACE_ID) | ||
| 18972 | extend_face_to_end_of_line (it); | 19055 | extend_face_to_end_of_line (it); |
| 18973 | break; | 19056 | break; |
| 18974 | } | 19057 | } |
| @@ -23987,7 +24070,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym) | |||
| 23987 | sprintf (buf, "%0*X", it->c < 0x10000 ? 4 : 6, it->c); | 24070 | sprintf (buf, "%0*X", it->c < 0x10000 ? 4 : 6, it->c); |
| 23988 | str = buf; | 24071 | str = buf; |
| 23989 | } | 24072 | } |
| 23990 | for (len = 0; str[len] && ASCII_BYTE_P (str[len]); len++) | 24073 | for (len = 0; str[len] && ASCII_BYTE_P (str[len]) && len < 6; len++) |
| 23991 | code[len] = font->driver->encode_char (font, str[len]); | 24074 | code[len] = font->driver->encode_char (font, str[len]); |
| 23992 | upper_len = (len + 1) / 2; | 24075 | upper_len = (len + 1) / 2; |
| 23993 | font->driver->text_extents (font, code, upper_len, | 24076 | font->driver->text_extents (font, code, upper_len, |
| @@ -28208,14 +28291,14 @@ syms_of_xdisp (void) | |||
| 28208 | 28291 | ||
| 28209 | #ifdef HAVE_WINDOW_SYSTEM | 28292 | #ifdef HAVE_WINDOW_SYSTEM |
| 28210 | DEFVAR_BOOL ("x-stretch-cursor", x_stretch_cursor_p, | 28293 | DEFVAR_BOOL ("x-stretch-cursor", x_stretch_cursor_p, |
| 28211 | doc: /* *Non-nil means draw block cursor as wide as the glyph under it. | 28294 | doc: /* Non-nil means draw block cursor as wide as the glyph under it. |
| 28212 | For example, if a block cursor is over a tab, it will be drawn as | 28295 | For example, if a block cursor is over a tab, it will be drawn as |
| 28213 | wide as that tab on the display. */); | 28296 | wide as that tab on the display. */); |
| 28214 | x_stretch_cursor_p = 0; | 28297 | x_stretch_cursor_p = 0; |
| 28215 | #endif | 28298 | #endif |
| 28216 | 28299 | ||
| 28217 | DEFVAR_LISP ("show-trailing-whitespace", Vshow_trailing_whitespace, | 28300 | DEFVAR_LISP ("show-trailing-whitespace", Vshow_trailing_whitespace, |
| 28218 | doc: /* *Non-nil means highlight trailing whitespace. | 28301 | doc: /* Non-nil means highlight trailing whitespace. |
| 28219 | The face used for trailing whitespace is `trailing-whitespace'. */); | 28302 | The face used for trailing whitespace is `trailing-whitespace'. */); |
| 28220 | Vshow_trailing_whitespace = Qnil; | 28303 | Vshow_trailing_whitespace = Qnil; |
| 28221 | 28304 | ||
| @@ -28235,7 +28318,7 @@ A value of nil means no special handling of these characters. */); | |||
| 28235 | Vnobreak_char_display = Qt; | 28318 | Vnobreak_char_display = Qt; |
| 28236 | 28319 | ||
| 28237 | DEFVAR_LISP ("void-text-area-pointer", Vvoid_text_area_pointer, | 28320 | DEFVAR_LISP ("void-text-area-pointer", Vvoid_text_area_pointer, |
| 28238 | doc: /* *The pointer shape to show in void text areas. | 28321 | doc: /* The pointer shape to show in void text areas. |
| 28239 | A value of nil means to show the text pointer. Other options are `arrow', | 28322 | A value of nil means to show the text pointer. Other options are `arrow', |
| 28240 | `text', `hand', `vdrag', `hdrag', `modeline', and `hourglass'. */); | 28323 | `text', `hand', `vdrag', `hdrag', `modeline', and `hourglass'. */); |
| 28241 | Vvoid_text_area_pointer = Qarrow; | 28324 | Vvoid_text_area_pointer = Qarrow; |
| @@ -28268,14 +28351,14 @@ where to display overlay arrows. */); | |||
| 28268 | = Fcons (intern_c_string ("overlay-arrow-position"), Qnil); | 28351 | = Fcons (intern_c_string ("overlay-arrow-position"), Qnil); |
| 28269 | 28352 | ||
| 28270 | DEFVAR_INT ("scroll-step", emacs_scroll_step, | 28353 | DEFVAR_INT ("scroll-step", emacs_scroll_step, |
| 28271 | doc: /* *The number of lines to try scrolling a window by when point moves out. | 28354 | doc: /* The number of lines to try scrolling a window by when point moves out. |
| 28272 | If that fails to bring point back on frame, point is centered instead. | 28355 | If that fails to bring point back on frame, point is centered instead. |
| 28273 | If this is zero, point is always centered after it moves off frame. | 28356 | If this is zero, point is always centered after it moves off frame. |
| 28274 | If you want scrolling to always be a line at a time, you should set | 28357 | If you want scrolling to always be a line at a time, you should set |
| 28275 | `scroll-conservatively' to a large value rather than set this to 1. */); | 28358 | `scroll-conservatively' to a large value rather than set this to 1. */); |
| 28276 | 28359 | ||
| 28277 | DEFVAR_INT ("scroll-conservatively", scroll_conservatively, | 28360 | DEFVAR_INT ("scroll-conservatively", scroll_conservatively, |
| 28278 | doc: /* *Scroll up to this many lines, to bring point back on screen. | 28361 | doc: /* Scroll up to this many lines, to bring point back on screen. |
| 28279 | If point moves off-screen, redisplay will scroll by up to | 28362 | If point moves off-screen, redisplay will scroll by up to |
| 28280 | `scroll-conservatively' lines in order to bring point just barely | 28363 | `scroll-conservatively' lines in order to bring point just barely |
| 28281 | onto the screen again. If that cannot be done, then redisplay | 28364 | onto the screen again. If that cannot be done, then redisplay |
| @@ -28289,7 +28372,7 @@ A value of zero means always recenter point if it moves off screen. */); | |||
| 28289 | scroll_conservatively = 0; | 28372 | scroll_conservatively = 0; |
| 28290 | 28373 | ||
| 28291 | DEFVAR_INT ("scroll-margin", scroll_margin, | 28374 | DEFVAR_INT ("scroll-margin", scroll_margin, |
| 28292 | doc: /* *Number of lines of margin at the top and bottom of a window. | 28375 | doc: /* Number of lines of margin at the top and bottom of a window. |
| 28293 | Recenter the window whenever point gets within this many lines | 28376 | Recenter the window whenever point gets within this many lines |
| 28294 | of the top or bottom of the window. */); | 28377 | of the top or bottom of the window. */); |
| 28295 | scroll_margin = 0; | 28378 | scroll_margin = 0; |
| @@ -28325,20 +28408,20 @@ Any other value means to use the appropriate face, `mode-line', | |||
| 28325 | mode_line_inverse_video = 1; | 28408 | mode_line_inverse_video = 1; |
| 28326 | 28409 | ||
| 28327 | DEFVAR_LISP ("line-number-display-limit", Vline_number_display_limit, | 28410 | DEFVAR_LISP ("line-number-display-limit", Vline_number_display_limit, |
| 28328 | doc: /* *Maximum buffer size for which line number should be displayed. | 28411 | doc: /* Maximum buffer size for which line number should be displayed. |
| 28329 | If the buffer is bigger than this, the line number does not appear | 28412 | If the buffer is bigger than this, the line number does not appear |
| 28330 | in the mode line. A value of nil means no limit. */); | 28413 | in the mode line. A value of nil means no limit. */); |
| 28331 | Vline_number_display_limit = Qnil; | 28414 | Vline_number_display_limit = Qnil; |
| 28332 | 28415 | ||
| 28333 | DEFVAR_INT ("line-number-display-limit-width", | 28416 | DEFVAR_INT ("line-number-display-limit-width", |
| 28334 | line_number_display_limit_width, | 28417 | line_number_display_limit_width, |
| 28335 | doc: /* *Maximum line width (in characters) for line number display. | 28418 | doc: /* Maximum line width (in characters) for line number display. |
| 28336 | If the average length of the lines near point is bigger than this, then the | 28419 | If the average length of the lines near point is bigger than this, then the |
| 28337 | line number may be omitted from the mode line. */); | 28420 | line number may be omitted from the mode line. */); |
| 28338 | line_number_display_limit_width = 200; | 28421 | line_number_display_limit_width = 200; |
| 28339 | 28422 | ||
| 28340 | DEFVAR_BOOL ("highlight-nonselected-windows", highlight_nonselected_windows, | 28423 | DEFVAR_BOOL ("highlight-nonselected-windows", highlight_nonselected_windows, |
| 28341 | doc: /* *Non-nil means highlight region even in nonselected windows. */); | 28424 | doc: /* Non-nil means highlight region even in nonselected windows. */); |
| 28342 | highlight_nonselected_windows = 0; | 28425 | highlight_nonselected_windows = 0; |
| 28343 | 28426 | ||
| 28344 | DEFVAR_BOOL ("multiple-frames", multiple_frames, | 28427 | DEFVAR_BOOL ("multiple-frames", multiple_frames, |
| @@ -28410,7 +28493,7 @@ See `set-window-redisplay-end-trigger'. */); | |||
| 28410 | Vredisplay_end_trigger_functions = Qnil; | 28493 | Vredisplay_end_trigger_functions = Qnil; |
| 28411 | 28494 | ||
| 28412 | DEFVAR_LISP ("mouse-autoselect-window", Vmouse_autoselect_window, | 28495 | DEFVAR_LISP ("mouse-autoselect-window", Vmouse_autoselect_window, |
| 28413 | doc: /* *Non-nil means autoselect window with mouse pointer. | 28496 | doc: /* Non-nil means autoselect window with mouse pointer. |
| 28414 | If nil, do not autoselect windows. | 28497 | If nil, do not autoselect windows. |
| 28415 | A positive number means delay autoselection by that many seconds: a | 28498 | A positive number means delay autoselection by that many seconds: a |
| 28416 | window is autoselected only after the mouse has remained in that | 28499 | window is autoselected only after the mouse has remained in that |
| @@ -28430,7 +28513,7 @@ When customizing this variable make sure that the actual value of | |||
| 28430 | Vmouse_autoselect_window = Qnil; | 28513 | Vmouse_autoselect_window = Qnil; |
| 28431 | 28514 | ||
| 28432 | DEFVAR_LISP ("auto-resize-tool-bars", Vauto_resize_tool_bars, | 28515 | DEFVAR_LISP ("auto-resize-tool-bars", Vauto_resize_tool_bars, |
| 28433 | doc: /* *Non-nil means automatically resize tool-bars. | 28516 | doc: /* Non-nil means automatically resize tool-bars. |
| 28434 | This dynamically changes the tool-bar's height to the minimum height | 28517 | This dynamically changes the tool-bar's height to the minimum height |
| 28435 | that is needed to make all tool-bar items visible. | 28518 | that is needed to make all tool-bar items visible. |
| 28436 | If value is `grow-only', the tool-bar's height is only increased | 28519 | If value is `grow-only', the tool-bar's height is only increased |
| @@ -28438,15 +28521,15 @@ automatically; to decrease the tool-bar height, use \\[recenter]. */); | |||
| 28438 | Vauto_resize_tool_bars = Qt; | 28521 | Vauto_resize_tool_bars = Qt; |
| 28439 | 28522 | ||
| 28440 | DEFVAR_BOOL ("auto-raise-tool-bar-buttons", auto_raise_tool_bar_buttons_p, | 28523 | DEFVAR_BOOL ("auto-raise-tool-bar-buttons", auto_raise_tool_bar_buttons_p, |
| 28441 | doc: /* *Non-nil means raise tool-bar buttons when the mouse moves over them. */); | 28524 | doc: /* Non-nil means raise tool-bar buttons when the mouse moves over them. */); |
| 28442 | auto_raise_tool_bar_buttons_p = 1; | 28525 | auto_raise_tool_bar_buttons_p = 1; |
| 28443 | 28526 | ||
| 28444 | DEFVAR_BOOL ("make-cursor-line-fully-visible", make_cursor_line_fully_visible_p, | 28527 | DEFVAR_BOOL ("make-cursor-line-fully-visible", make_cursor_line_fully_visible_p, |
| 28445 | doc: /* *Non-nil means to scroll (recenter) cursor line if it is not fully visible. */); | 28528 | doc: /* Non-nil means to scroll (recenter) cursor line if it is not fully visible. */); |
| 28446 | make_cursor_line_fully_visible_p = 1; | 28529 | make_cursor_line_fully_visible_p = 1; |
| 28447 | 28530 | ||
| 28448 | DEFVAR_LISP ("tool-bar-border", Vtool_bar_border, | 28531 | DEFVAR_LISP ("tool-bar-border", Vtool_bar_border, |
| 28449 | doc: /* *Border below tool-bar in pixels. | 28532 | doc: /* Border below tool-bar in pixels. |
| 28450 | If an integer, use it as the height of the border. | 28533 | If an integer, use it as the height of the border. |
| 28451 | If it is one of `internal-border-width' or `border-width', use the | 28534 | If it is one of `internal-border-width' or `border-width', use the |
| 28452 | value of the corresponding frame parameter. | 28535 | value of the corresponding frame parameter. |
| @@ -28454,7 +28537,7 @@ Otherwise, no border is added below the tool-bar. */); | |||
| 28454 | Vtool_bar_border = Qinternal_border_width; | 28537 | Vtool_bar_border = Qinternal_border_width; |
| 28455 | 28538 | ||
| 28456 | DEFVAR_LISP ("tool-bar-button-margin", Vtool_bar_button_margin, | 28539 | DEFVAR_LISP ("tool-bar-button-margin", Vtool_bar_button_margin, |
| 28457 | doc: /* *Margin around tool-bar buttons in pixels. | 28540 | doc: /* Margin around tool-bar buttons in pixels. |
| 28458 | If an integer, use that for both horizontal and vertical margins. | 28541 | If an integer, use that for both horizontal and vertical margins. |
| 28459 | Otherwise, value should be a pair of integers `(HORZ . VERT)' with | 28542 | Otherwise, value should be a pair of integers `(HORZ . VERT)' with |
| 28460 | HORZ specifying the horizontal margin, and VERT specifying the | 28543 | HORZ specifying the horizontal margin, and VERT specifying the |
| @@ -28462,7 +28545,7 @@ vertical margin. */); | |||
| 28462 | Vtool_bar_button_margin = make_number (DEFAULT_TOOL_BAR_BUTTON_MARGIN); | 28545 | Vtool_bar_button_margin = make_number (DEFAULT_TOOL_BAR_BUTTON_MARGIN); |
| 28463 | 28546 | ||
| 28464 | DEFVAR_INT ("tool-bar-button-relief", tool_bar_button_relief, | 28547 | DEFVAR_INT ("tool-bar-button-relief", tool_bar_button_relief, |
| 28465 | doc: /* *Relief thickness of tool-bar buttons. */); | 28548 | doc: /* Relief thickness of tool-bar buttons. */); |
| 28466 | tool_bar_button_relief = DEFAULT_TOOL_BAR_BUTTON_RELIEF; | 28549 | tool_bar_button_relief = DEFAULT_TOOL_BAR_BUTTON_RELIEF; |
| 28467 | 28550 | ||
| 28468 | DEFVAR_LISP ("tool-bar-style", Vtool_bar_style, | 28551 | DEFVAR_LISP ("tool-bar-style", Vtool_bar_style, |
| @@ -28477,7 +28560,7 @@ It can be one of | |||
| 28477 | Vtool_bar_style = Qnil; | 28560 | Vtool_bar_style = Qnil; |
| 28478 | 28561 | ||
| 28479 | DEFVAR_INT ("tool-bar-max-label-size", tool_bar_max_label_size, | 28562 | DEFVAR_INT ("tool-bar-max-label-size", tool_bar_max_label_size, |
| 28480 | doc: /* *Maximum number of characters a label can have to be shown. | 28563 | doc: /* Maximum number of characters a label can have to be shown. |
| 28481 | The tool bar style must also show labels for this to have any effect, see | 28564 | The tool bar style must also show labels for this to have any effect, see |
| 28482 | `tool-bar-style'. */); | 28565 | `tool-bar-style'. */); |
| 28483 | tool_bar_max_label_size = DEFAULT_TOOL_BAR_LABEL_SIZE; | 28566 | tool_bar_max_label_size = DEFAULT_TOOL_BAR_LABEL_SIZE; |
| @@ -28492,7 +28575,7 @@ fontified regions the property `fontified'. */); | |||
| 28492 | 28575 | ||
| 28493 | DEFVAR_BOOL ("unibyte-display-via-language-environment", | 28576 | DEFVAR_BOOL ("unibyte-display-via-language-environment", |
| 28494 | unibyte_display_via_language_environment, | 28577 | unibyte_display_via_language_environment, |
| 28495 | doc: /* *Non-nil means display unibyte text according to language environment. | 28578 | doc: /* Non-nil means display unibyte text according to language environment. |
| 28496 | Specifically, this means that raw bytes in the range 160-255 decimal | 28579 | Specifically, this means that raw bytes in the range 160-255 decimal |
| 28497 | are displayed by converting them to the equivalent multibyte characters | 28580 | are displayed by converting them to the equivalent multibyte characters |
| 28498 | according to the current language environment. As a result, they are | 28581 | according to the current language environment. As a result, they are |
| @@ -28503,7 +28586,7 @@ but does not change the fact they are interpreted as raw bytes. */); | |||
| 28503 | unibyte_display_via_language_environment = 0; | 28586 | unibyte_display_via_language_environment = 0; |
| 28504 | 28587 | ||
| 28505 | DEFVAR_LISP ("max-mini-window-height", Vmax_mini_window_height, | 28588 | DEFVAR_LISP ("max-mini-window-height", Vmax_mini_window_height, |
| 28506 | doc: /* *Maximum height for resizing mini-windows (the minibuffer and the echo area). | 28589 | doc: /* Maximum height for resizing mini-windows (the minibuffer and the echo area). |
| 28507 | If a float, it specifies a fraction of the mini-window frame's height. | 28590 | If a float, it specifies a fraction of the mini-window frame's height. |
| 28508 | If an integer, it specifies a number of lines. */); | 28591 | If an integer, it specifies a number of lines. */); |
| 28509 | Vmax_mini_window_height = make_float (0.25); | 28592 | Vmax_mini_window_height = make_float (0.25); |
| @@ -28537,12 +28620,12 @@ point visible. */); | |||
| 28537 | DEFSYM (Qauto_hscroll_mode, "auto-hscroll-mode"); | 28620 | DEFSYM (Qauto_hscroll_mode, "auto-hscroll-mode"); |
| 28538 | 28621 | ||
| 28539 | DEFVAR_INT ("hscroll-margin", hscroll_margin, | 28622 | DEFVAR_INT ("hscroll-margin", hscroll_margin, |
| 28540 | doc: /* *How many columns away from the window edge point is allowed to get | 28623 | doc: /* How many columns away from the window edge point is allowed to get |
| 28541 | before automatic hscrolling will horizontally scroll the window. */); | 28624 | before automatic hscrolling will horizontally scroll the window. */); |
| 28542 | hscroll_margin = 5; | 28625 | hscroll_margin = 5; |
| 28543 | 28626 | ||
| 28544 | DEFVAR_LISP ("hscroll-step", Vhscroll_step, | 28627 | DEFVAR_LISP ("hscroll-step", Vhscroll_step, |
| 28545 | doc: /* *How many columns to scroll the window when point gets too close to the edge. | 28628 | doc: /* How many columns to scroll the window when point gets too close to the edge. |
| 28546 | When point is less than `hscroll-margin' columns from the window | 28629 | When point is less than `hscroll-margin' columns from the window |
| 28547 | edge, automatic hscrolling will scroll the window by the amount of columns | 28630 | edge, automatic hscrolling will scroll the window by the amount of columns |
| 28548 | determined by this variable. If its value is a positive integer, scroll that | 28631 | determined by this variable. If its value is a positive integer, scroll that |
| @@ -28629,7 +28712,7 @@ To add a prefix to continuation lines, use `wrap-prefix'. */); | |||
| 28629 | #endif /* GLYPH_DEBUG */ | 28712 | #endif /* GLYPH_DEBUG */ |
| 28630 | 28713 | ||
| 28631 | DEFVAR_INT ("overline-margin", overline_margin, | 28714 | DEFVAR_INT ("overline-margin", overline_margin, |
| 28632 | doc: /* *Space between overline and text, in pixels. | 28715 | doc: /* Space between overline and text, in pixels. |
| 28633 | The default value is 2: the height of the overline (1 pixel) plus 1 pixel | 28716 | The default value is 2: the height of the overline (1 pixel) plus 1 pixel |
| 28634 | margin to the character height. */); | 28717 | margin to the character height. */); |
| 28635 | overline_margin = 2; | 28718 | overline_margin = 2; |
| @@ -28650,7 +28733,7 @@ cursor shapes. */); | |||
| 28650 | display_hourglass_p = 1; | 28733 | display_hourglass_p = 1; |
| 28651 | 28734 | ||
| 28652 | DEFVAR_LISP ("hourglass-delay", Vhourglass_delay, | 28735 | DEFVAR_LISP ("hourglass-delay", Vhourglass_delay, |
| 28653 | doc: /* *Seconds to wait before displaying an hourglass pointer when Emacs is busy. */); | 28736 | doc: /* Seconds to wait before displaying an hourglass pointer when Emacs is busy. */); |
| 28654 | Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY); | 28737 | Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY); |
| 28655 | 28738 | ||
| 28656 | hourglass_atimer = NULL; | 28739 | hourglass_atimer = NULL; |
diff --git a/src/xfaces.c b/src/xfaces.c index 7c3bc8d2749..84a47cf6ccf 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -6562,7 +6562,7 @@ syms_of_xfaces (void) | |||
| 6562 | #endif | 6562 | #endif |
| 6563 | 6563 | ||
| 6564 | DEFVAR_LISP ("font-list-limit", Vfont_list_limit, | 6564 | DEFVAR_LISP ("font-list-limit", Vfont_list_limit, |
| 6565 | doc: /* *Limit for font matching. | 6565 | doc: /* Limit for font matching. |
| 6566 | If an integer > 0, font matching functions won't load more than | 6566 | If an integer > 0, font matching functions won't load more than |
| 6567 | that number of fonts when searching for a matching font. */); | 6567 | that number of fonts when searching for a matching font. */); |
| 6568 | Vfont_list_limit = make_number (DEFAULT_FONT_LIST_LIMIT); | 6568 | Vfont_list_limit = make_number (DEFAULT_FONT_LIST_LIMIT); |
| @@ -6572,7 +6572,7 @@ that number of fonts when searching for a matching font. */); | |||
| 6572 | Vface_new_frame_defaults = Qnil; | 6572 | Vface_new_frame_defaults = Qnil; |
| 6573 | 6573 | ||
| 6574 | DEFVAR_LISP ("face-default-stipple", Vface_default_stipple, | 6574 | DEFVAR_LISP ("face-default-stipple", Vface_default_stipple, |
| 6575 | doc: /* *Default stipple pattern used on monochrome displays. | 6575 | doc: /* Default stipple pattern used on monochrome displays. |
| 6576 | This stipple pattern is used on monochrome displays | 6576 | This stipple pattern is used on monochrome displays |
| 6577 | instead of shades of gray for a face background color. | 6577 | instead of shades of gray for a face background color. |
| 6578 | See `set-face-stipple' for possible values for this variable. */); | 6578 | See `set-face-stipple' for possible values for this variable. */); |
| @@ -6603,20 +6603,22 @@ ignore. */); | |||
| 6603 | doc: /* Alist of face remappings. | 6603 | doc: /* Alist of face remappings. |
| 6604 | Each element is of the form: | 6604 | Each element is of the form: |
| 6605 | 6605 | ||
| 6606 | (FACE REPLACEMENT...), | 6606 | (FACE . REPLACEMENT), |
| 6607 | 6607 | ||
| 6608 | which causes display of the face FACE to use REPLACEMENT... instead. | 6608 | which causes display of the face FACE to use REPLACEMENT instead. |
| 6609 | REPLACEMENT... is interpreted the same way as the value of a `face' | 6609 | REPLACEMENT is a face specification, i.e. one of the following: |
| 6610 | text property: it may be (1) A face name, (2) A list of face names, | ||
| 6611 | (3) A property-list of face attribute/value pairs, or (4) A list of | ||
| 6612 | face names or lists containing face attribute/value pairs. | ||
| 6613 | 6610 | ||
| 6614 | Multiple entries in REPLACEMENT... are merged together to form the final | 6611 | (1) a face name |
| 6615 | result, with faces or attributes earlier in the list taking precedence | 6612 | (2) a property list of attribute/value pairs, or |
| 6616 | over those that are later. | 6613 | (3) a list in which each element has the form of (1) or (2). |
| 6617 | 6614 | ||
| 6618 | Face-name remapping cycles are suppressed; recursive references use the | 6615 | List values for REPLACEMENT are merged to form the final face |
| 6619 | underlying face instead of the remapped face. So a remapping of the form: | 6616 | specification, with earlier entries taking precedence, in the same as |
| 6617 | as in the `face' text property. | ||
| 6618 | |||
| 6619 | Face-name remapping cycles are suppressed; recursive references use | ||
| 6620 | the underlying face instead of the remapped face. So a remapping of | ||
| 6621 | the form: | ||
| 6620 | 6622 | ||
| 6621 | (FACE EXTRA-FACE... FACE) | 6623 | (FACE EXTRA-FACE... FACE) |
| 6622 | 6624 | ||
| @@ -6624,13 +6626,13 @@ or: | |||
| 6624 | 6626 | ||
| 6625 | (FACE (FACE-ATTR VAL ...) FACE) | 6627 | (FACE (FACE-ATTR VAL ...) FACE) |
| 6626 | 6628 | ||
| 6627 | will cause EXTRA-FACE... or (FACE-ATTR VAL ...) to be _merged_ with the | 6629 | causes EXTRA-FACE... or (FACE-ATTR VAL ...) to be _merged_ with the |
| 6628 | existing definition of FACE. Note that for the default face, this isn't | 6630 | existing definition of FACE. Note that this isn't necessary for the |
| 6629 | necessary, as every face inherits from the default face. | 6631 | default face, since every face inherits from the default face. |
| 6630 | 6632 | ||
| 6631 | Making this variable buffer-local is a good way to allow buffer-specific | 6633 | If this variable is made buffer-local, the face remapping takes effect |
| 6632 | face definitions. For instance, the mode my-mode could define a face | 6634 | only in that buffer. For instance, the mode my-mode could define a |
| 6633 | `my-mode-default', and then in the mode setup function, do: | 6635 | face `my-mode-default', and then in the mode setup function, do: |
| 6634 | 6636 | ||
| 6635 | (set (make-local-variable 'face-remapping-alist) | 6637 | (set (make-local-variable 'face-remapping-alist) |
| 6636 | '((default my-mode-default)))). | 6638 | '((default my-mode-default)))). |
diff --git a/src/xfns.c b/src/xfns.c index 4cf4a059a67..2d2ab46fb36 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2952,7 +2952,7 @@ unwind_create_frame (Lisp_Object frame) | |||
| 2952 | static Lisp_Object | 2952 | static Lisp_Object |
| 2953 | unwind_create_frame_1 (Lisp_Object val) | 2953 | unwind_create_frame_1 (Lisp_Object val) |
| 2954 | { | 2954 | { |
| 2955 | inhibit_window_configuration_change_hook = val; | 2955 | inhibit_lisp_code = val; |
| 2956 | return Qnil; | 2956 | return Qnil; |
| 2957 | } | 2957 | } |
| 2958 | 2958 | ||
| @@ -3337,9 +3337,8 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3337 | Vframe_list. */ | 3337 | Vframe_list. */ |
| 3338 | { | 3338 | { |
| 3339 | ptrdiff_t count2 = SPECPDL_INDEX (); | 3339 | ptrdiff_t count2 = SPECPDL_INDEX (); |
| 3340 | record_unwind_protect (unwind_create_frame_1, | 3340 | record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code); |
| 3341 | inhibit_window_configuration_change_hook); | 3341 | inhibit_lisp_code = Qt; |
| 3342 | inhibit_window_configuration_change_hook = Qt; | ||
| 3343 | 3342 | ||
| 3344 | x_default_parameter (f, parms, Qmenu_bar_lines, | 3343 | x_default_parameter (f, parms, Qmenu_bar_lines, |
| 3345 | NILP (Vmenu_bar_mode) | 3344 | NILP (Vmenu_bar_mode) |
| @@ -5919,32 +5918,32 @@ Chinese, Japanese, and Korean. */); | |||
| 5919 | 5918 | ||
| 5920 | /* This is not ifdef:ed, so other builds than GTK can customize it. */ | 5919 | /* This is not ifdef:ed, so other builds than GTK can customize it. */ |
| 5921 | DEFVAR_BOOL ("x-gtk-use-old-file-dialog", x_gtk_use_old_file_dialog, | 5920 | DEFVAR_BOOL ("x-gtk-use-old-file-dialog", x_gtk_use_old_file_dialog, |
| 5922 | doc: /* *Non-nil means prompt with the old GTK file selection dialog. | 5921 | doc: /* Non-nil means prompt with the old GTK file selection dialog. |
| 5923 | If nil or if the file selection dialog is not available, the new GTK file | 5922 | If nil or if the file selection dialog is not available, the new GTK file |
| 5924 | chooser is used instead. To turn off all file dialogs set the | 5923 | chooser is used instead. To turn off all file dialogs set the |
| 5925 | variable `use-file-dialog'. */); | 5924 | variable `use-file-dialog'. */); |
| 5926 | x_gtk_use_old_file_dialog = 0; | 5925 | x_gtk_use_old_file_dialog = 0; |
| 5927 | 5926 | ||
| 5928 | DEFVAR_BOOL ("x-gtk-show-hidden-files", x_gtk_show_hidden_files, | 5927 | DEFVAR_BOOL ("x-gtk-show-hidden-files", x_gtk_show_hidden_files, |
| 5929 | doc: /* *If non-nil, the GTK file chooser will by default show hidden files. | 5928 | doc: /* If non-nil, the GTK file chooser will by default show hidden files. |
| 5930 | Note that this is just the default, there is a toggle button on the file | 5929 | Note that this is just the default, there is a toggle button on the file |
| 5931 | chooser to show or not show hidden files on a case by case basis. */); | 5930 | chooser to show or not show hidden files on a case by case basis. */); |
| 5932 | x_gtk_show_hidden_files = 0; | 5931 | x_gtk_show_hidden_files = 0; |
| 5933 | 5932 | ||
| 5934 | DEFVAR_BOOL ("x-gtk-file-dialog-help-text", x_gtk_file_dialog_help_text, | 5933 | DEFVAR_BOOL ("x-gtk-file-dialog-help-text", x_gtk_file_dialog_help_text, |
| 5935 | doc: /* *If non-nil, the GTK file chooser will show additional help text. | 5934 | doc: /* If non-nil, the GTK file chooser will show additional help text. |
| 5936 | If more space for files in the file chooser dialog is wanted, set this to nil | 5935 | If more space for files in the file chooser dialog is wanted, set this to nil |
| 5937 | to turn the additional text off. */); | 5936 | to turn the additional text off. */); |
| 5938 | x_gtk_file_dialog_help_text = 1; | 5937 | x_gtk_file_dialog_help_text = 1; |
| 5939 | 5938 | ||
| 5940 | DEFVAR_BOOL ("x-gtk-whole-detached-tool-bar", x_gtk_whole_detached_tool_bar, | 5939 | DEFVAR_BOOL ("x-gtk-whole-detached-tool-bar", x_gtk_whole_detached_tool_bar, |
| 5941 | doc: /* *If non-nil, a detached tool bar is shown in full. | 5940 | doc: /* If non-nil, a detached tool bar is shown in full. |
| 5942 | The default is to just show an arrow and pressing on that arrow shows | 5941 | The default is to just show an arrow and pressing on that arrow shows |
| 5943 | the tool bar buttons. */); | 5942 | the tool bar buttons. */); |
| 5944 | x_gtk_whole_detached_tool_bar = 0; | 5943 | x_gtk_whole_detached_tool_bar = 0; |
| 5945 | 5944 | ||
| 5946 | DEFVAR_BOOL ("x-gtk-use-system-tooltips", x_gtk_use_system_tooltips, | 5945 | DEFVAR_BOOL ("x-gtk-use-system-tooltips", x_gtk_use_system_tooltips, |
| 5947 | doc: /* *If non-nil with a Gtk+ built Emacs, the Gtk+ tooltip is used. | 5946 | doc: /* If non-nil with a Gtk+ built Emacs, the Gtk+ tooltip is used. |
| 5948 | Otherwise use Emacs own tooltip implementation. | 5947 | Otherwise use Emacs own tooltip implementation. |
| 5949 | When using Gtk+ tooltips, the tooltip face is not used. */); | 5948 | When using Gtk+ tooltips, the tooltip face is not used. */); |
| 5950 | x_gtk_use_system_tooltips = 1; | 5949 | x_gtk_use_system_tooltips = 1; |
| @@ -28,6 +28,97 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | #include "lisp.h" | 28 | #include "lisp.h" |
| 29 | #include "buffer.h" | 29 | #include "buffer.h" |
| 30 | 30 | ||
| 31 | |||
| 32 | static Lisp_Object Qlibxml2_dll; | ||
| 33 | |||
| 34 | #ifdef WINDOWSNT | ||
| 35 | |||
| 36 | #include <windows.h> | ||
| 37 | #include "w32.h" | ||
| 38 | |||
| 39 | /* Macro for defining functions that will be loaded from the libxml2 DLL. */ | ||
| 40 | #define DEF_XML2_FN(rettype,func,args) static rettype (FAR CDECL *fn_##func)args | ||
| 41 | |||
| 42 | /* Macro for loading libxml2 functions from the library. */ | ||
| 43 | #define LOAD_XML2_FN(lib,func) { \ | ||
| 44 | fn_##func = (void *) GetProcAddress (lib, #func); \ | ||
| 45 | if (!fn_##func) goto bad_library; \ | ||
| 46 | } | ||
| 47 | |||
| 48 | DEF_XML2_FN (htmlDocPtr, htmlReadMemory, | ||
| 49 | (const char *, int, const char *, const char *, int)); | ||
| 50 | DEF_XML2_FN (xmlDocPtr, xmlReadMemory, | ||
| 51 | (const char *, int, const char *, const char *, int)); | ||
| 52 | DEF_XML2_FN (xmlNodePtr, xmlDocGetRootElement, (xmlDocPtr)); | ||
| 53 | DEF_XML2_FN (void, xmlFreeDoc, (xmlDocPtr)); | ||
| 54 | DEF_XML2_FN (void, xmlCleanupParser, (void)); | ||
| 55 | DEF_XML2_FN (void, xmlCheckVersion, (int)); | ||
| 56 | |||
| 57 | static int | ||
| 58 | libxml2_loaded_p (void) | ||
| 59 | { | ||
| 60 | Lisp_Object found = Fassq (Qlibxml2_dll, Vlibrary_cache); | ||
| 61 | |||
| 62 | if (CONSP (found)) | ||
| 63 | return EQ (XCDR (found), Qt) ? 1 : 0; | ||
| 64 | return 0; | ||
| 65 | } | ||
| 66 | |||
| 67 | #else /* !WINDOWSNT */ | ||
| 68 | |||
| 69 | #define fn_htmlReadMemory htmlReadMemory | ||
| 70 | #define fn_xmlReadMemory xmlReadMemory | ||
| 71 | #define fn_xmlDocGetRootElement xmlDocGetRootElement | ||
| 72 | #define fn_xmlFreeDoc xmlFreeDoc | ||
| 73 | #define fn_xmlCleanupParser xmlCleanupParser | ||
| 74 | #define fn_xmlCheckVersion xmlCheckVersion | ||
| 75 | |||
| 76 | static inline int | ||
| 77 | libxml2_loaded_p (void) | ||
| 78 | { | ||
| 79 | return 1; | ||
| 80 | } | ||
| 81 | |||
| 82 | #endif /* !WINDOWSNT */ | ||
| 83 | |||
| 84 | static int | ||
| 85 | init_libxml2_functions (Lisp_Object libraries) | ||
| 86 | { | ||
| 87 | #ifdef WINDOWSNT | ||
| 88 | if (libxml2_loaded_p ()) | ||
| 89 | return 1; | ||
| 90 | else | ||
| 91 | { | ||
| 92 | HMODULE library; | ||
| 93 | |||
| 94 | if (!(library = w32_delayed_load (libraries, Qlibxml2_dll))) | ||
| 95 | { | ||
| 96 | message ("%s", "libxml2 library not found"); | ||
| 97 | return 0; | ||
| 98 | } | ||
| 99 | |||
| 100 | /* LOAD_XML2_FN jumps to bad_library if it fails to find the | ||
| 101 | named function. */ | ||
| 102 | LOAD_XML2_FN (library, htmlReadMemory); | ||
| 103 | LOAD_XML2_FN (library, xmlReadMemory); | ||
| 104 | LOAD_XML2_FN (library, xmlDocGetRootElement); | ||
| 105 | LOAD_XML2_FN (library, xmlFreeDoc); | ||
| 106 | LOAD_XML2_FN (library, xmlCleanupParser); | ||
| 107 | LOAD_XML2_FN (library, xmlCheckVersion); | ||
| 108 | |||
| 109 | Vlibrary_cache = Fcons (Fcons (Qlibxml2_dll, Qt), Vlibrary_cache); | ||
| 110 | return 1; | ||
| 111 | } | ||
| 112 | |||
| 113 | bad_library: | ||
| 114 | Vlibrary_cache = Fcons (Fcons (Qlibxml2_dll, Qnil), Vlibrary_cache); | ||
| 115 | |||
| 116 | return 0; | ||
| 117 | #else /* !WINDOWSNT */ | ||
| 118 | return 1; | ||
| 119 | #endif /* !WINDOWSNT */ | ||
| 120 | } | ||
| 121 | |||
| 31 | static Lisp_Object | 122 | static Lisp_Object |
| 32 | make_dom (xmlNode *node) | 123 | make_dom (xmlNode *node) |
| 33 | { | 124 | { |
| @@ -92,7 +183,7 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html | |||
| 92 | ptrdiff_t bytes; | 183 | ptrdiff_t bytes; |
| 93 | ptrdiff_t istart, iend; | 184 | ptrdiff_t istart, iend; |
| 94 | 185 | ||
| 95 | LIBXML_TEST_VERSION; | 186 | fn_xmlCheckVersion (LIBXML_VERSION); |
| 96 | 187 | ||
| 97 | validate_region (&start, &end); | 188 | validate_region (&start, &end); |
| 98 | 189 | ||
| @@ -111,16 +202,16 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html | |||
| 111 | bytes = CHAR_TO_BYTE (iend) - CHAR_TO_BYTE (istart); | 202 | bytes = CHAR_TO_BYTE (iend) - CHAR_TO_BYTE (istart); |
| 112 | 203 | ||
| 113 | if (htmlp) | 204 | if (htmlp) |
| 114 | doc = htmlReadMemory ((char *) BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), | 205 | doc = fn_htmlReadMemory ((char *) BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), |
| 115 | bytes, burl, "utf-8", | 206 | bytes, burl, "utf-8", |
| 116 | HTML_PARSE_RECOVER|HTML_PARSE_NONET| | 207 | HTML_PARSE_RECOVER|HTML_PARSE_NONET| |
| 117 | HTML_PARSE_NOWARNING|HTML_PARSE_NOERROR| | 208 | HTML_PARSE_NOWARNING|HTML_PARSE_NOERROR| |
| 118 | HTML_PARSE_NOBLANKS); | 209 | HTML_PARSE_NOBLANKS); |
| 119 | else | 210 | else |
| 120 | doc = xmlReadMemory ((char *) BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), | 211 | doc = fn_xmlReadMemory ((char *) BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), |
| 121 | bytes, burl, "utf-8", | 212 | bytes, burl, "utf-8", |
| 122 | XML_PARSE_NONET|XML_PARSE_NOWARNING| | 213 | XML_PARSE_NONET|XML_PARSE_NOWARNING| |
| 123 | XML_PARSE_NOBLANKS |XML_PARSE_NOERROR); | 214 | XML_PARSE_NOBLANKS |XML_PARSE_NOERROR); |
| 124 | 215 | ||
| 125 | if (doc != NULL) | 216 | if (doc != NULL) |
| 126 | { | 217 | { |
| @@ -139,19 +230,26 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html | |||
| 139 | if (NILP (result)) { | 230 | if (NILP (result)) { |
| 140 | /* The document isn't just comments, so get the tree the | 231 | /* The document isn't just comments, so get the tree the |
| 141 | proper way. */ | 232 | proper way. */ |
| 142 | xmlNode *node = xmlDocGetRootElement (doc); | 233 | xmlNode *node = fn_xmlDocGetRootElement (doc); |
| 143 | if (node != NULL) | 234 | if (node != NULL) |
| 144 | result = make_dom (node); | 235 | result = make_dom (node); |
| 145 | } else | 236 | } else |
| 146 | result = Fcons (intern ("top"), | 237 | result = Fcons (intern ("top"), |
| 147 | Fcons (Qnil, Fnreverse (Fcons (r, result)))); | 238 | Fcons (Qnil, Fnreverse (Fcons (r, result)))); |
| 148 | 239 | ||
| 149 | xmlFreeDoc (doc); | 240 | fn_xmlFreeDoc (doc); |
| 150 | } | 241 | } |
| 151 | 242 | ||
| 152 | return result; | 243 | return result; |
| 153 | } | 244 | } |
| 154 | 245 | ||
| 246 | void | ||
| 247 | xml_cleanup_parser (void) | ||
| 248 | { | ||
| 249 | if (libxml2_loaded_p ()) | ||
| 250 | fn_xmlCleanupParser (); | ||
| 251 | } | ||
| 252 | |||
| 155 | DEFUN ("libxml-parse-html-region", Flibxml_parse_html_region, | 253 | DEFUN ("libxml-parse-html-region", Flibxml_parse_html_region, |
| 156 | Slibxml_parse_html_region, | 254 | Slibxml_parse_html_region, |
| 157 | 2, 3, 0, | 255 | 2, 3, 0, |
| @@ -159,7 +257,9 @@ DEFUN ("libxml-parse-html-region", Flibxml_parse_html_region, | |||
| 159 | If BASE-URL is non-nil, it is used to expand relative URLs. */) | 257 | If BASE-URL is non-nil, it is used to expand relative URLs. */) |
| 160 | (Lisp_Object start, Lisp_Object end, Lisp_Object base_url) | 258 | (Lisp_Object start, Lisp_Object end, Lisp_Object base_url) |
| 161 | { | 259 | { |
| 162 | return parse_region (start, end, base_url, 1); | 260 | if (init_libxml2_functions (Vdynamic_library_alist)) |
| 261 | return parse_region (start, end, base_url, 1); | ||
| 262 | return Qnil; | ||
| 163 | } | 263 | } |
| 164 | 264 | ||
| 165 | DEFUN ("libxml-parse-xml-region", Flibxml_parse_xml_region, | 265 | DEFUN ("libxml-parse-xml-region", Flibxml_parse_xml_region, |
| @@ -169,7 +269,9 @@ DEFUN ("libxml-parse-xml-region", Flibxml_parse_xml_region, | |||
| 169 | If BASE-URL is non-nil, it is used to expand relative URLs. */) | 269 | If BASE-URL is non-nil, it is used to expand relative URLs. */) |
| 170 | (Lisp_Object start, Lisp_Object end, Lisp_Object base_url) | 270 | (Lisp_Object start, Lisp_Object end, Lisp_Object base_url) |
| 171 | { | 271 | { |
| 172 | return parse_region (start, end, base_url, 0); | 272 | if (init_libxml2_functions (Vdynamic_library_alist)) |
| 273 | return parse_region (start, end, base_url, 0); | ||
| 274 | return Qnil; | ||
| 173 | } | 275 | } |
| 174 | 276 | ||
| 175 | 277 | ||
| @@ -181,6 +283,8 @@ syms_of_xml (void) | |||
| 181 | { | 283 | { |
| 182 | defsubr (&Slibxml_parse_html_region); | 284 | defsubr (&Slibxml_parse_html_region); |
| 183 | defsubr (&Slibxml_parse_xml_region); | 285 | defsubr (&Slibxml_parse_xml_region); |
| 286 | |||
| 287 | DEFSYM (Qlibxml2_dll, "libxml2"); | ||
| 184 | } | 288 | } |
| 185 | 289 | ||
| 186 | #endif /* HAVE_LIBXML2 */ | 290 | #endif /* HAVE_LIBXML2 */ |
diff --git a/src/xsettings.c b/src/xsettings.c index 066c6e795e9..69ef22f55d7 100644 --- a/src/xsettings.c +++ b/src/xsettings.c | |||
| @@ -1024,7 +1024,7 @@ syms_of_xsettings (void) | |||
| 1024 | defsubr (&Sfont_get_system_normal_font); | 1024 | defsubr (&Sfont_get_system_normal_font); |
| 1025 | 1025 | ||
| 1026 | DEFVAR_BOOL ("font-use-system-font", use_system_font, | 1026 | DEFVAR_BOOL ("font-use-system-font", use_system_font, |
| 1027 | doc: /* *Non-nil means to apply the system defined font dynamically. | 1027 | doc: /* Non-nil means to apply the system defined font dynamically. |
| 1028 | When this is non-nil and the system defined fixed width font changes, we | 1028 | When this is non-nil and the system defined fixed width font changes, we |
| 1029 | update frames dynamically. | 1029 | update frames dynamically. |
| 1030 | If this variable is nil, Emacs ignores system font changes. */); | 1030 | If this variable is nil, Emacs ignores system font changes. */); |
diff --git a/src/xterm.c b/src/xterm.c index 88cd0bf4091..1a5bc913f60 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -7099,7 +7099,8 @@ x_dispatch_event (XEvent *event, Display *display) | |||
| 7099 | 7099 | ||
| 7100 | 7100 | ||
| 7101 | /* Read events coming from the X server. | 7101 | /* Read events coming from the X server. |
| 7102 | This routine is called by the SIGIO handler. | 7102 | This routine is called by the SIGIO handler only if SYNC_INPUT is |
| 7103 | not defined. | ||
| 7103 | We return as soon as there are no more events to be read. | 7104 | We return as soon as there are no more events to be read. |
| 7104 | 7105 | ||
| 7105 | We return the number of characters stored into the buffer, | 7106 | We return the number of characters stored into the buffer, |
| @@ -7133,7 +7134,9 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold | |||
| 7133 | /* So people can tell when we have read the available input. */ | 7134 | /* So people can tell when we have read the available input. */ |
| 7134 | input_signal_count++; | 7135 | input_signal_count++; |
| 7135 | 7136 | ||
| 7137 | #ifndef SYNC_INPUT | ||
| 7136 | ++handling_signal; | 7138 | ++handling_signal; |
| 7139 | #endif | ||
| 7137 | 7140 | ||
| 7138 | /* For debugging, this gives a way to fake an I/O error. */ | 7141 | /* For debugging, this gives a way to fake an I/O error. */ |
| 7139 | if (terminal->display_info.x == XTread_socket_fake_io_error) | 7142 | if (terminal->display_info.x == XTread_socket_fake_io_error) |
| @@ -7223,7 +7226,9 @@ XTread_socket (struct terminal *terminal, int expected, struct input_event *hold | |||
| 7223 | pending_autoraise_frame = 0; | 7226 | pending_autoraise_frame = 0; |
| 7224 | } | 7227 | } |
| 7225 | 7228 | ||
| 7229 | #ifndef SYNC_INPUT | ||
| 7226 | --handling_signal; | 7230 | --handling_signal; |
| 7231 | #endif | ||
| 7227 | UNBLOCK_INPUT; | 7232 | UNBLOCK_INPUT; |
| 7228 | 7233 | ||
| 7229 | return count; | 7234 | return count; |
| @@ -10825,7 +10830,7 @@ syms_of_xterm (void) | |||
| 10825 | 10830 | ||
| 10826 | DEFVAR_BOOL ("x-use-underline-position-properties", | 10831 | DEFVAR_BOOL ("x-use-underline-position-properties", |
| 10827 | x_use_underline_position_properties, | 10832 | x_use_underline_position_properties, |
| 10828 | doc: /* *Non-nil means make use of UNDERLINE_POSITION font properties. | 10833 | doc: /* Non-nil means make use of UNDERLINE_POSITION font properties. |
| 10829 | A value of nil means ignore them. If you encounter fonts with bogus | 10834 | A value of nil means ignore them. If you encounter fonts with bogus |
| 10830 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior | 10835 | UNDERLINE_POSITION font properties, for example 7x13 on XFree prior |
| 10831 | to 4.1, set this to nil. You can also use `underline-minimum-offset' | 10836 | to 4.1, set this to nil. You can also use `underline-minimum-offset' |
| @@ -10835,7 +10840,7 @@ sizes. */); | |||
| 10835 | 10840 | ||
| 10836 | DEFVAR_BOOL ("x-underline-at-descent-line", | 10841 | DEFVAR_BOOL ("x-underline-at-descent-line", |
| 10837 | x_underline_at_descent_line, | 10842 | x_underline_at_descent_line, |
| 10838 | doc: /* *Non-nil means to draw the underline at the same place as the descent line. | 10843 | doc: /* Non-nil means to draw the underline at the same place as the descent line. |
| 10839 | A value of nil means to draw the underline according to the value of the | 10844 | A value of nil means to draw the underline according to the value of the |
| 10840 | variable `x-use-underline-position-properties', which is usually at the | 10845 | variable `x-use-underline-position-properties', which is usually at the |
| 10841 | baseline level. The default value is nil. */); | 10846 | baseline level. The default value is nil. */); |