aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2020-10-04 19:45:05 +0200
committerAndrea Corallo2020-10-04 19:45:05 +0200
commit44ef24342fd8a2ac876212124ebf38673acda35a (patch)
tree793dc4ba4197559b4bc65339d713c0807a7b2ca9 /src
parentafb765ab3cab7b6582d0def543b23603cd076445 (diff)
parentd8665e6d3473403c90a0831e83439a013d0012d3 (diff)
downloademacs-44ef24342fd8a2ac876212124ebf38673acda35a.tar.gz
emacs-44ef24342fd8a2ac876212124ebf38673acda35a.zip
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog.1014
-rw-r--r--src/ChangeLog.1120
-rw-r--r--src/ChangeLog.1210
-rw-r--r--src/ChangeLog.1332
-rw-r--r--src/ChangeLog.36
-rw-r--r--src/ChangeLog.810
-rw-r--r--src/ChangeLog.92
-rw-r--r--src/dbusbind.c17
-rw-r--r--src/image.c10
-rw-r--r--src/indent.c30
-rw-r--r--src/w16select.c2
-rw-r--r--src/w32.c9
-rw-r--r--src/w32select.c2
-rw-r--r--src/xdisp.c95
14 files changed, 167 insertions, 92 deletions
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index 1c954b20eec..fbbd3608909 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -9344,7 +9344,7 @@
9344 * dispextern.h (struct glyph_row): New member overlay_arrow_bitmap. 9344 * dispextern.h (struct glyph_row): New member overlay_arrow_bitmap.
9345 It replaces the corresponding member from struct window, as a 9345 It replaces the corresponding member from struct window, as a
9346 window may now show multiple overlay arrows. 9346 window may now show multiple overlay arrows.
9347 Remove member overlay_arrow_p, superseeded by overlay_arrow_bitmap. 9347 Remove member overlay_arrow_p, superseded by overlay_arrow_bitmap.
9348 9348
9349 * dispnew.c (row_equal_p, update_window_line, scrolling_window): 9349 * dispnew.c (row_equal_p, update_window_line, scrolling_window):
9350 Compare overlay_arrow_bitmap than overlay_arrow_p members. 9350 Compare overlay_arrow_bitmap than overlay_arrow_p members.
@@ -11141,7 +11141,7 @@
11141 * eval.c (Fdefun, Fdefmacro): Use (defun . FN_NAME) in LOADHIST_ATTACH. 11141 * eval.c (Fdefun, Fdefmacro): Use (defun . FN_NAME) in LOADHIST_ATTACH.
11142 (Fdefvaralias, Fdefvar, Fdefconst): Use just SYM in LOADHIST_ATTACH. 11142 (Fdefvaralias, Fdefvar, Fdefconst): Use just SYM in LOADHIST_ATTACH.
11143 (Qdefvar): Var deleted. 11143 (Qdefvar): Var deleted.
11144 (syms_of_eval): Don't initialze it. 11144 (syms_of_eval): Don't initialize it.
11145 11145
11146 * lread.c (syms_of_lread) <load-history>: Doc fix. 11146 * lread.c (syms_of_lread) <load-history>: Doc fix.
11147 11147
@@ -18716,7 +18716,7 @@
18716 and line_height, and use corresponding new members in struct 18716 and line_height, and use corresponding new members in struct
18717 frame. All uses changed. 18717 frame. All uses changed.
18718 (FRAME_LINE_HEIGHT, FRAME_INTERNAL_BORDER_WIDTH): Remove macros; 18718 (FRAME_LINE_HEIGHT, FRAME_INTERNAL_BORDER_WIDTH): Remove macros;
18719 superseeded by corresponding macros in frame.h. 18719 superseded by corresponding macros in frame.h.
18720 18720
18721 * msdos.c: Make (several) trivial substitutions for renamed and 18721 * msdos.c: Make (several) trivial substitutions for renamed and
18722 new macros in dispextern.h, frame.h and window.h. 18722 new macros in dispextern.h, frame.h and window.h.
@@ -19145,7 +19145,7 @@
19145 (syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp variable. 19145 (syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp variable.
19146 19146
19147 * lread.c (read1): Before calling index, check if the 2nd 19147 * lread.c (read1): Before calling index, check if the 2nd
19148 arguemnt is in ASCII range. 19148 argument is in ASCII range.
19149 19149
191502003-04-08 Richard M. Stallman <rms@gnu.org> 191502003-04-08 Richard M. Stallman <rms@gnu.org>
19151 19151
@@ -19945,7 +19945,7 @@
199452003-03-09 David Kastrup <dak@gnu.org> 199452003-03-09 David Kastrup <dak@gnu.org>
19946 19946
19947 * process.c (read_process_output): We have allocated enough space 19947 * process.c (read_process_output): We have allocated enough space
19948 for readmax and carryover, so actually use the alloted space. 19948 for readmax and carryover, so actually use the allotted space.
19949 19949
199502003-03-09 Jan Djärv <jan.h.d@swipnet.se> 199502003-03-09 Jan Djärv <jan.h.d@swipnet.se>
19951 19951
@@ -24638,7 +24638,7 @@
24638 * w32gui.h (struct XImage): Define. 24638 * w32gui.h (struct XImage): Define.
24639 24639
24640 * w32term.c (w32_read_socket) <WM_XBUTTONUP>: Use XFASTINT to 24640 * w32term.c (w32_read_socket) <WM_XBUTTONUP>: Use XFASTINT to
24641 extract mouse co-ordinates. 24641 extract mouse coordinates.
24642 24642
246432002-03-20 Jason Rumney <jasonr@gnu.org> 246432002-03-20 Jason Rumney <jasonr@gnu.org>
24644 24644
@@ -25377,7 +25377,7 @@
25377 Handle literal output of strings by sharing the 25377 Handle literal output of strings by sharing the
25378 main-line code for strings, using local var `literal'. 25378 main-line code for strings, using local var `literal'.
25379 Handle :propertize feature. 25379 Handle :propertize feature.
25380 (syms_of_xdisp): Initialze and staticpro QCpropertize and 25380 (syms_of_xdisp): Initialize and staticpro QCpropertize and
25381 mode_line_proptrans_alist. 25381 mode_line_proptrans_alist.
25382 25382
253832002-02-11 Kim F. Storm <storm@cua.dk> 253832002-02-11 Kim F. Storm <storm@cua.dk>
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11
index 2942d35561a..1086d1183a2 100644
--- a/src/ChangeLog.11
+++ b/src/ChangeLog.11
@@ -947,7 +947,7 @@
947 (c_string_pos, number_of_chars, message_dolog): 947 (c_string_pos, number_of_chars, message_dolog):
948 (message_log_check_duplicate, set_message_1, store_mode_line_noprop): 948 (message_log_check_duplicate, set_message_1, store_mode_line_noprop):
949 (display_mode_element, display_string): 949 (display_mode_element, display_string):
950 Switch between char * and unsigned char * to stay compatible wth 950 Switch between char * and unsigned char * to stay compatible with
951 C89 pointer rules. 951 C89 pointer rules.
952 952
953 * regex.c: Conform to C89 pointer rules. 953 * regex.c: Conform to C89 pointer rules.
@@ -9492,7 +9492,7 @@
9492 * coding.c (decode_coding_ccl): Fix previous change for the 9492 * coding.c (decode_coding_ccl): Fix previous change for the
9493 multibyte case. 9493 multibyte case.
9494 (encode_coding_ccl): Don't setup ccl program here. Fix for the 9494 (encode_coding_ccl): Don't setup ccl program here. Fix for the
9495 case that the output buffer is fullfilled. 9495 case that the output buffer is fulfilled.
9496 (encode_coding): Setup ccl program here. 9496 (encode_coding): Setup ccl program here.
9497 9497
94982010-03-23 Dan Nicolaescu <dann@ics.uci.edu> 94982010-03-23 Dan Nicolaescu <dann@ics.uci.edu>
@@ -9772,10 +9772,10 @@
97722010-02-17 Kenichi Handa <handa@m17n.org> 97722010-02-17 Kenichi Handa <handa@m17n.org>
9773 9773
9774 * coding.c (decode_coding_ccl): Don't setup ccl program here. 9774 * coding.c (decode_coding_ccl): Don't setup ccl program here.
9775 Fix for the case that the output buffer is fullfilled. 9775 Fix for the case that the output buffer is fulfilled.
9776 (decode_coding): Setup ccl program here. Keep looping when the 9776 (decode_coding): Setup ccl program here. Keep looping when the
9777 decoder stopped because the output buffer is 9777 decoder stopped because the output buffer is
9778 fullfilled (bug#5534). 9778 fulfilled (bug#5534).
9779 9779
9780 * ccl.c (ccl_driver): Never reset ic to CCL_HEADER_MAIN. 9780 * ccl.c (ccl_driver): Never reset ic to CCL_HEADER_MAIN.
9781 9781
@@ -23923,7 +23923,7 @@
23923 23923
239242008-02-01 Kenichi Handa <handa@m17n.org> 239242008-02-01 Kenichi Handa <handa@m17n.org>
23925 23925
23926 * alloc.c (NSTATICS): Increas to 0x600. 23926 * alloc.c (NSTATICS): Increase to 0x600.
23927 23927
239282008-02-01 Kenichi Handa <handa@m17n.org> 239282008-02-01 Kenichi Handa <handa@m17n.org>
23929 23929
@@ -25309,12 +25309,12 @@
25309 25309
25310 * coding.c (enum iso_code_class_type): Delete ISO_carriage_return. 25310 * coding.c (enum iso_code_class_type): Delete ISO_carriage_return.
25311 (CODING_GET_INFO): Delete argument eol_type. Change callers. 25311 (CODING_GET_INFO): Delete argument eol_type. Change callers.
25312 (decode_coding_utf_8): Don't do eol converion. 25312 (decode_coding_utf_8): Don't do eol conversion.
25313 (detect_coding_utf_16): Check coding->src_chars, not 25313 (detect_coding_utf_16): Check coding->src_chars, not
25314 coding->src_bytes. Add heuristics for those that have no signature. 25314 coding->src_bytes. Add heuristics for those that have no signature.
25315 (decode_coding_emacs_mule, decode_coding_iso_2022) 25315 (decode_coding_emacs_mule, decode_coding_iso_2022)
25316 (decode_coding_sjis, decode_coding_big5, decode_coding_charset): 25316 (decode_coding_sjis, decode_coding_big5, decode_coding_charset):
25317 Don't do eol converion. 25317 Don't do eol conversion.
25318 (adjust_coding_eol_type): Return a new coding system. 25318 (adjust_coding_eol_type): Return a new coding system.
25319 (detect_coding): Don't detect eol. Fix for utf-16 detection. 25319 (detect_coding): Don't detect eol. Fix for utf-16 detection.
25320 (decode_eol): In case of CRLF->LF conversion, use del_range_2 on 25320 (decode_eol): In case of CRLF->LF conversion, use del_range_2 on
@@ -25952,7 +25952,7 @@
25952 (font_list): The argument REGISTRY is now a list of registry names. 25952 (font_list): The argument REGISTRY is now a list of registry names.
25953 (choose_face_font): If we are choosing an ASCII font, and ATTRS 25953 (choose_face_font): If we are choosing an ASCII font, and ATTRS
25954 specifies an explicit font name, return the name as is. Make a 25954 specifies an explicit font name, return the name as is. Make a
25955 list of registy names. 25955 list of registry names.
25956 25956
25957 * xfns.c (x_set_font, x_create_tip_frame): Adjust for the change 25957 * xfns.c (x_set_font, x_create_tip_frame): Adjust for the change
25958 of x_new_fontset. 25958 of x_new_fontset.
@@ -26647,7 +26647,7 @@
26647 (fontset_set): Delete. 26647 (fontset_set): Delete.
26648 (fontset_face): New arg FACE. Return face ID, not face. 26648 (fontset_face): New arg FACE. Return face ID, not face.
26649 Complete re-write to handle new fontset structure. Change caller. 26649 Complete re-write to handle new fontset structure. Change caller.
26650 (free_face_fontset): Use ASET istead of AREF (X) = Y. 26650 (free_face_fontset): Use ASET instead of AREF (X) = Y.
26651 (face_for_char): Don't call lookup_face. 26651 (face_for_char): Don't call lookup_face.
26652 (make_fontset_for_ascii_face): New arg FACE. 26652 (make_fontset_for_ascii_face): New arg FACE.
26653 (fs_load_font): New arg CHARSET_ID. Don't check 26653 (fs_load_font): New arg CHARSET_ID. Don't check
@@ -31141,7 +31141,7 @@
31141 * term.c (term_mouse_highlight): Remove unused variables. 31141 * term.c (term_mouse_highlight): Remove unused variables.
31142 (Fterm_open_connection): Set gpm_zerobased to 1. 31142 (Fterm_open_connection): Set gpm_zerobased to 1.
31143 (term_mouse_movement, term_mouse_click, handle_one_term_event): 31143 (term_mouse_movement, term_mouse_click, handle_one_term_event):
31144 Use zero based co-ordinates. 31144 Use zero based coordinates.
31145 (handle_one_term_event): Report a drag as mouse movement too. 31145 (handle_one_term_event): Report a drag as mouse movement too.
31146 31146
31147 * Makefile.in (MOUSE_SUPPORT): Define for HAVE_GPM. 31147 * Makefile.in (MOUSE_SUPPORT): Define for HAVE_GPM.
diff --git a/src/ChangeLog.12 b/src/ChangeLog.12
index 0397a495212..04983fe03e6 100644
--- a/src/ChangeLog.12
+++ b/src/ChangeLog.12
@@ -239,7 +239,7 @@
239 239
240 * lisp.h (find_next_newline_no_quit): Rename to find_next_newline. 240 * lisp.h (find_next_newline_no_quit): Rename to find_next_newline.
241 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start) 241 * xdisp.c (back_to_previous_line_start, forward_to_next_line_start)
242 (get_visually_first_element, move_it_vertically_backward): Ajust users. 242 (get_visually_first_element, move_it_vertically_backward): Adjust users.
243 * bidi.c (bidi_find_paragraph_start): Likewise. 243 * bidi.c (bidi_find_paragraph_start): Likewise.
244 * indent.c (vmotion): Likewise. 244 * indent.c (vmotion): Likewise.
245 245
@@ -7335,7 +7335,7 @@
7335 7335
73362012-08-17 Chong Yidong <cyd@gnu.org> 73362012-08-17 Chong Yidong <cyd@gnu.org>
7337 7337
7338 * xfaces.c (merge_face_vectors): If the target font specfies a 7338 * xfaces.c (merge_face_vectors): If the target font specifies a
7339 font spec, make the font's attributes take precedence over 7339 font spec, make the font's attributes take precedence over
7340 directly-specified attributes. 7340 directly-specified attributes.
7341 (merge_face_ref): Recognize :font. 7341 (merge_face_ref): Recognize :font.
@@ -9265,7 +9265,7 @@
9265 9265
9266 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog) 9266 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
9267 (initFromContents): Use SSDATA where appropriate. 9267 (initFromContents): Use SSDATA where appropriate.
9268 (ns_update_menubar): Add braces to ambigous if-else. 9268 (ns_update_menubar): Add braces to ambiguous if-else.
9269 (initWithTitle): Put () around assignment in if statement. 9269 (initWithTitle): Put () around assignment in if statement.
9270 (ns_menu_show): Remove unused variables window and keymap. 9270 (ns_menu_show): Remove unused variables window and keymap.
9271 (update_frame_tool_bar): Remove unused variable selected_p. 9271 (update_frame_tool_bar): Remove unused variable selected_p.
@@ -14333,7 +14333,7 @@
14333 14333
143342011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org> 143342011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
14335 14335
14336 * process.c (wait_reading_process_output): Fix asynchrounous 14336 * process.c (wait_reading_process_output): Fix asynchronous
14337 GnuTLS socket handling on some versions of the GnuTLS library. 14337 GnuTLS socket handling on some versions of the GnuTLS library.
14338 (wait_reading_process_output): Add comment and URL. 14338 (wait_reading_process_output): Add comment and URL.
14339 14339
@@ -21271,7 +21271,7 @@
21271 not the number of arguments given. This is simpler and lets GCC 21271 not the number of arguments given. This is simpler and lets GCC
21272 4.6.0 generate slightly better code. 21272 4.6.0 generate slightly better code.
21273 21273
21274 * ftfont.c: Distingish more carefully between FcChar8 and char. 21274 * ftfont.c: Distinguish more carefully between FcChar8 and char.
21275 The previous code passed unsigned char * to a functions like 21275 The previous code passed unsigned char * to a functions like
21276 strlen and xstrcasecmp that expect char *, which does not 21276 strlen and xstrcasecmp that expect char *, which does not
21277 conform to the C standard. 21277 conform to the C standard.
diff --git a/src/ChangeLog.13 b/src/ChangeLog.13
index 791de9a6a8b..87055d70315 100644
--- a/src/ChangeLog.13
+++ b/src/ChangeLog.13
@@ -580,7 +580,7 @@
580 (x_intersect_rectangles, clear_mouse_face, display_tty_menu_item): 580 (x_intersect_rectangles, clear_mouse_face, display_tty_menu_item):
581 * lisp.h (setup_echo_area_for_printing, message_with_string) 581 * lisp.h (setup_echo_area_for_printing, message_with_string)
582 (pos_visible_p): Use bool for boolean. 582 (pos_visible_p): Use bool for boolean.
583 * xdisp.c: Use bool, true, false intstead of int, 1, 0. 583 * xdisp.c: Use bool, true, false instead of int, 1, 0.
584 Remove unnecessary forward decls. 584 Remove unnecessary forward decls.
585 (trace_move) [DEBUG_TRACE_MOVE]: Now static. 585 (trace_move) [DEBUG_TRACE_MOVE]: Now static.
586 (CHECK_IT, CHECK_WINDOW_END): 586 (CHECK_IT, CHECK_WINDOW_END):
@@ -685,7 +685,7 @@
685 Inhibit resizing fullwidth-/height frames in one direction only. 685 Inhibit resizing fullwidth-/height frames in one direction only.
686 Update frame_size_history. 686 Update frame_size_history.
687 (adjust_frame_size): Call frame_size_history_add. 687 (adjust_frame_size): Call frame_size_history_add.
688 (make_frame): Initalize after_make_frame slot. 688 (make_frame): Initialize after_make_frame slot.
689 (Fmake_terminal_frame): Adjust adjust_frame_size call. 689 (Fmake_terminal_frame): Adjust adjust_frame_size call.
690 (Fcan_run_window_configuration_change_hook): Rename to 690 (Fcan_run_window_configuration_change_hook): Rename to
691 Fframe_after_make_frame. Set after_make_frame slot. 691 Fframe_after_make_frame. Set after_make_frame slot.
@@ -1419,7 +1419,7 @@
1419 1419
14202015-01-12 Paul Eggert <eggert@cs.ucla.edu> 14202015-01-12 Paul Eggert <eggert@cs.ucla.edu>
1421 1421
1422 Port to 32-bit MingGW --with-wide-int 1422 Port to 32-bit MinGW --with-wide-int
1423 Problem reported by Eli Zaretskii in: 1423 Problem reported by Eli Zaretskii in:
1424 https://lists.gnu.org/r/emacs-devel/2015-01/msg00265.html 1424 https://lists.gnu.org/r/emacs-devel/2015-01/msg00265.html
1425 * lisp.h (struct Lisp_Sub_Char_Table): Check that offset matches 1425 * lisp.h (struct Lisp_Sub_Char_Table): Check that offset matches
@@ -1635,7 +1635,7 @@
16352015-01-06 Jan Djärv <jan.h.d@swipnet.se> 16352015-01-06 Jan Djärv <jan.h.d@swipnet.se>
1636 1636
1637 * nsterm.m (x_set_window_size): Call updateFrameSize to get real 1637 * nsterm.m (x_set_window_size): Call updateFrameSize to get real
1638 size instead of using widht/height. The frame may be 1638 size instead of using width/height. The frame may be
1639 constrained (Bug#19482). 1639 constrained (Bug#19482).
1640 1640
16412015-01-05 Paul Eggert <eggert@cs.ucla.edu> 16412015-01-05 Paul Eggert <eggert@cs.ucla.edu>
@@ -2102,7 +2102,7 @@
2102 Partially disabled previous change. 2102 Partially disabled previous change.
2103 2103
2104 * image.c (svg_load): Temporarily disabled filename thing for 2104 * image.c (svg_load): Temporarily disabled filename thing for
2105 not-a-file case as it can cause crashs. 2105 not-a-file case as it can cause crashes.
2106 2106
21072014-12-17 Ulf Jasper <ulf.jasper@web.de> 21072014-12-17 Ulf Jasper <ulf.jasper@web.de>
2108 2108
@@ -2807,7 +2807,7 @@
2807 * nsselect.m (QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME) 2807 * nsselect.m (QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME)
2808 (NXPrimaryPboard, NXSecondaryPboard): Declare static. 2808 (NXPrimaryPboard, NXSecondaryPboard): Declare static.
2809 (Qforeign_selection): Remove. 2809 (Qforeign_selection): Remove.
2810 (ns_get_local_selection): Identation fix. 2810 (ns_get_local_selection): Indentation fix.
2811 (syms_of_nsselect): Remove Qforeign_selection, ns-lost-selection-hooks 2811 (syms_of_nsselect): Remove Qforeign_selection, ns-lost-selection-hooks
2812 2812
2813 * nsselect.m (ns_get_local_selection): Remove calling of 2813 * nsselect.m (ns_get_local_selection): Remove calling of
@@ -5162,7 +5162,7 @@
51622014-07-27 Jan Djärv <jan.h.d@swipnet.se> 51622014-07-27 Jan Djärv <jan.h.d@swipnet.se>
5163 5163
5164 * nsterm.m (applicationDidFinishLaunching antialiasThresholdDidChange): 5164 * nsterm.m (applicationDidFinishLaunching antialiasThresholdDidChange):
5165 Reinstate code removed by the prevoius commit to this file. 5165 Reinstate code removed by the previous commit to this file.
5166 5166
51672014-07-27 Martin Rudalics <rudalics@gmx.at> 51672014-07-27 Martin Rudalics <rudalics@gmx.at>
5168 5168
@@ -7847,11 +7847,11 @@
7847 * w32.c (unsetenv): Remove unused var `retval'. 7847 * w32.c (unsetenv): Remove unused var `retval'.
7848 (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'. 7848 (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
7849 7849
7850 * w32notify.c (watch_worker): Remove unnecesary var sleep_result. 7850 * w32notify.c (watch_worker): Remove unnecessary var sleep_result.
7851 (start_watching): Remove unused var `thr'. 7851 (start_watching): Remove unused var `thr'.
7852 7852
7853 * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'. 7853 * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
7854 (find_child_console): Remove unnecesary var `thread_id'. 7854 (find_child_console): Remove unnecessary var `thread_id'.
7855 7855
7856 * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'. 7856 * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
7857 (x_focus_frame): #ifdef 0 unused variable `dpyinfo'. 7857 (x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
@@ -9004,7 +9004,7 @@
9004 * widget.c (pixel_to_text_size): New function. 9004 * widget.c (pixel_to_text_size): New function.
9005 (update_wm_hints): Have size hints respect value of 9005 (update_wm_hints): Have size hints respect value of
9006 frame_resize_pixelwise. 9006 frame_resize_pixelwise.
9007 (EmacsFrameResize): Alway process resize requests pixelwise. 9007 (EmacsFrameResize): Always process resize requests pixelwise.
9008 * window.c (grow_mini_window): Make sure mini window is at least 9008 * window.c (grow_mini_window): Make sure mini window is at least
9009 one line tall. 9009 one line tall.
9010 * xdisp.c (display_menu_bar): Make sure menubar extends till 9010 * xdisp.c (display_menu_bar): Make sure menubar extends till
@@ -10768,7 +10768,7 @@
10768 10768
10769 * search.c (find_newline): Rewrite to prefer offsets to pointers. 10769 * search.c (find_newline): Rewrite to prefer offsets to pointers.
10770 This avoids undefined behavior when subtracting pointers into 10770 This avoids undefined behavior when subtracting pointers into
10771 different aways. On my platform it also makes the code a tad 10771 different always. On my platform it also makes the code a tad
10772 smaller and presumably faster. 10772 smaller and presumably faster.
10773 10773
107742013-11-11 Stefan Monnier <monnier@iro.umontreal.ca> 107742013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -13849,7 +13849,7 @@
13849 13849
138502013-08-13 Jan Djärv <jan.h.d@swipnet.se> 138502013-08-13 Jan Djärv <jan.h.d@swipnet.se>
13851 13851
13852 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by 13852 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage introduced by
13853 2013-08-13 checkin below. Change bool to BOOL, rule is: 13853 2013-08-13 checkin below. Change bool to BOOL, rule is:
13854 All Obj-C code uses BOOL, except for interfaces callable from C. 13854 All Obj-C code uses BOOL, except for interfaces callable from C.
13855 13855
@@ -14041,7 +14041,7 @@
14041 the caller. Do not lock the temp file. Unwind-protect the file 14041 the caller. Do not lock the temp file. Unwind-protect the file
14042 and the file-descriptor. 14042 and the file-descriptor.
14043 (Fcall_process_region): If the input is /dev/null, unwind-protect it. 14043 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
14044 If an asynchrounous process, record it here, not in call_process. 14044 If an asynchronous process, record it here, not in call_process.
14045 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile. 14045 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
14046 * eval.c (set_unwind_protect): New function. 14046 * eval.c (set_unwind_protect): New function.
14047 * fileio.c (write_region): New function, generalized from the 14047 * fileio.c (write_region): New function, generalized from the
@@ -14764,7 +14764,7 @@
14764 All callers changed. 14764 All callers changed.
14765 (create_process): Recover pty_flag from process, not from volatile local. 14765 (create_process): Recover pty_flag from process, not from volatile local.
14766 (create_pty): Stay inside array even when pty allocation fails. 14766 (create_pty): Stay inside array even when pty allocation fails.
14767 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag. 14767 (Fmake_serial_process): Omit unnecessary initialization of pty_flag.
14768 14768
14769 * lread.c (Fload): Avoid initialization only when lint checking. 14769 * lread.c (Fload): Avoid initialization only when lint checking.
14770 Mention that it's needed only for older GCCs. 14770 Mention that it's needed only for older GCCs.
@@ -17372,7 +17372,7 @@
173722013-03-31 Dmitry Antipov <dmantipov@yandex.ru> 173722013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
17373 17373
17374 * frame.h (struct frame): Drop scroll_bottom_vpos 17374 * frame.h (struct frame): Drop scroll_bottom_vpos
17375 member becaue all real users are dead long ago. 17375 member because all real users are dead long ago.
17376 (FRAME_SCROLL_BOTTOM_VPOS): Remove. 17376 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
17377 * xdisp.c (redisplay_internal): Adjust user. 17377 * xdisp.c (redisplay_internal): Adjust user.
17378 17378
@@ -17394,7 +17394,7 @@
17394 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698). 17394 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
17395 17395
17396 * nsterm.m (menu_will_open_state, menu_mouse_point) 17396 * nsterm.m (menu_will_open_state, menu_mouse_point)
17397 (menu_pending_title): New varaibles. 17397 (menu_pending_title): New variables.
17398 (ns_get_pending_menu_title, ns_check_menu_open) 17398 (ns_get_pending_menu_title, ns_check_menu_open)
17399 (ns_check_pending_open_menu): New functions. 17399 (ns_check_pending_open_menu): New functions.
17400 17400
diff --git a/src/ChangeLog.3 b/src/ChangeLog.3
index 973251859c1..4e403058837 100644
--- a/src/ChangeLog.3
+++ b/src/ChangeLog.3
@@ -11656,8 +11656,8 @@
11656 pixel_to_glyph_translation, and rewritten. Just get coordinates, 11656 pixel_to_glyph_translation, and rewritten. Just get coordinates,
11657 don't return anything. 11657 don't return anything.
11658 (buffer_posn_from_coords): New function - given a window and 11658 (buffer_posn_from_coords): New function - given a window and
11659 co-ordinates on the screen, find the buffer position at those 11659 coordinates on the screen, find the buffer position at those
11660 co-ordinates. 11660 coordinates.
11661 11661
116621991-01-08 Jim Blandy (jimb@geech.ai.mit.edu) 116621991-01-08 Jim Blandy (jimb@geech.ai.mit.edu)
11663 11663
@@ -16140,7 +16140,7 @@
16140 New format %S converts everything (even strings) with prin1. 16140 New format %S converts everything (even strings) with prin1.
16141 * doprnt.c (doprnt): Treat %s like %S. 16141 * doprnt.c (doprnt): Treat %s like %S.
16142 16142
16143 * print.c (Fprin1_to_string): Opt 3nd arg non-nil does princ. 16143 * print.c (Fprin1_to_string): Opt 3rd arg non-nil does princ.
16144 16144
161451988-12-31 Richard Stallman (rms@sugar-bombs.ai.mit.edu) 161451988-12-31 Richard Stallman (rms@sugar-bombs.ai.mit.edu)
16146 16146
diff --git a/src/ChangeLog.8 b/src/ChangeLog.8
index 17522e450f0..c7b99a443d5 100644
--- a/src/ChangeLog.8
+++ b/src/ChangeLog.8
@@ -1572,7 +1572,7 @@
1572 (wait_reading_process_input): Use emacs_strerror, not strerror. 1572 (wait_reading_process_input): Use emacs_strerror, not strerror.
1573 1573
1574 * process.c (status_message, sigchld_handler): Synchronize locale, 1574 * process.c (status_message, sigchld_handler): Synchronize locale,
1575 then use strsignal istead of sys_siglist. 1575 then use strsignal instead of sys_siglist.
1576 * w32proc.c (sys_wait): Likewise. 1576 * w32proc.c (sys_wait): Likewise.
1577 1577
1578 * s/aix3-1.h, s/bsd4-1.h, s/dgux.h, s/gnu-linux.h, s/hiuxmpp.h: 1578 * s/aix3-1.h, s/bsd4-1.h, s/dgux.h, s/gnu-linux.h, s/hiuxmpp.h:
@@ -7560,7 +7560,7 @@
7560 (recompute_basic_faces): Realize basic faces only if face cache is 7560 (recompute_basic_faces): Realize basic faces only if face cache is
7561 allocated, i.e. after init_frame_faces has been called. 7561 allocated, i.e. after init_frame_faces has been called.
7562 7562
7563 * frame.c (make_frame): Initialze face cache with null. 7563 * frame.c (make_frame): Initialize face cache with null.
7564 7564
7565 * xfaces.c (same_size_fonts): Remove. 7565 * xfaces.c (same_size_fonts): Remove.
7566 7566
@@ -9810,7 +9810,7 @@
98101997-10-13 Gerd Moellmann <gerd@acm.org> 98101997-10-13 Gerd Moellmann <gerd@acm.org>
9811 9811
9812 * xdisp.c (redisplay_window): Use available current matrix to 9812 * xdisp.c (redisplay_window): Use available current matrix to
9813 skip faster when only point is moved withing the window. 9813 skip faster when only point is moved within the window.
9814 9814
9815 * intervals.c: Include stdio.h. 9815 * intervals.c: Include stdio.h.
9816 (find_interval): Trace to stderr to catch some nasty error 9816 (find_interval): Trace to stderr to catch some nasty error
@@ -9859,7 +9859,7 @@
9859 * emacs.c: FreeBSD headers for profiling removed. 9859 * emacs.c: FreeBSD headers for profiling removed.
9860 9860
9861 * dispnew.c (direct_output_for_insert): Don't use PT-1 for 9861 * dispnew.c (direct_output_for_insert): Don't use PT-1 for
9862 display cursor, use DEC_POS instread. 9862 display cursor, use DEC_POS instead.
9863 9863
9864 * xfaces.c (load_font): Use x_load_font to load fonts so that 9864 * xfaces.c (load_font): Use x_load_font to load fonts so that
9865 all fonts are in the font table. 9865 all fonts are in the font table.
@@ -11940,7 +11940,7 @@
11940 This avoids a conflict with a system header file paths.h on GNU/Linux. 11940 This avoids a conflict with a system header file paths.h on GNU/Linux.
11941 11941
11942 * callproc.c, lread.c, w32fns.c, xfns.c, xrdb.c: 11942 * callproc.c, lread.c, w32fns.c, xfns.c, xrdb.c:
11943 Use epaths.h istead of paths.h. 11943 Use epaths.h instead of paths.h.
11944 11944
119451999-02-26 Andreas Schwab <schwab@gnu.org> 119451999-02-26 Andreas Schwab <schwab@gnu.org>
11946 11946
diff --git a/src/ChangeLog.9 b/src/ChangeLog.9
index 9f12748fbeb..0c1f72a6787 100644
--- a/src/ChangeLog.9
+++ b/src/ChangeLog.9
@@ -10388,7 +10388,7 @@
10388 ISO_control_0 and ISO_control_1. 10388 ISO_control_0 and ISO_control_1.
10389 10389
10390 * coding.h (enum iso_code_class_type): Member ISO_control_code is 10390 * coding.h (enum iso_code_class_type): Member ISO_control_code is
10391 devided into ISO_control_0 and ISO_control_1. 10391 divided into ISO_control_0 and ISO_control_1.
10392 (struct coding_system): New members src_multibyte, dst_multibyte, 10392 (struct coding_system): New members src_multibyte, dst_multibyte,
10393 errors, and result. Delete member fake_multibyte. 10393 errors, and result. Delete member fake_multibyte.
10394 (CODING_REQUIRE_DECODING): Return 1 if coding->dst_multibyte is 10394 (CODING_REQUIRE_DECODING): Return 1 if coding->dst_multibyte is
diff --git a/src/dbusbind.c b/src/dbusbind.c
index b06077d3b58..cca5f13907d 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -209,9 +209,12 @@ xd_dbus_type_to_symbol (int type)
209 : Qnil; 209 : Qnil;
210} 210}
211 211
212#define XD_KEYWORDP(object) !NILP (Fkeywordp (object))
213
212/* Check whether a Lisp symbol is a predefined D-Bus type symbol. */ 214/* Check whether a Lisp symbol is a predefined D-Bus type symbol. */
213#define XD_DBUS_TYPE_P(object) \ 215#define XD_DBUS_TYPE_P(object) \
214 (SYMBOLP (object) && ((xd_symbol_to_dbus_type (object) != DBUS_TYPE_INVALID))) 216 XD_KEYWORDP (object) && \
217 ((xd_symbol_to_dbus_type (object) != DBUS_TYPE_INVALID))
215 218
216/* Determine the DBusType of a given Lisp OBJECT. It is used to 219/* Determine the DBusType of a given Lisp OBJECT. It is used to
217 convert Lisp objects, being arguments of `dbus-call-method' or 220 convert Lisp objects, being arguments of `dbus-call-method' or
@@ -463,6 +466,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
463 CHECK_CONS (object); 466 CHECK_CONS (object);
464 467
465 elt = XD_NEXT_VALUE (elt); 468 elt = XD_NEXT_VALUE (elt);
469 CHECK_CONS (elt);
466 subtype = XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (elt)); 470 subtype = XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (elt));
467 xd_signature (x, subtype, dtype, CAR_SAFE (XD_NEXT_VALUE (elt))); 471 xd_signature (x, subtype, dtype, CAR_SAFE (XD_NEXT_VALUE (elt)));
468 472
@@ -474,11 +478,12 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
474 break; 478 break;
475 479
476 case DBUS_TYPE_STRUCT: 480 case DBUS_TYPE_STRUCT:
477 /* A struct list might contain any number of elements with 481 /* A struct list might contain any (but zero) number of elements
478 different types. No further check needed. */ 482 with different types. No further check needed. */
479 CHECK_CONS (object); 483 CHECK_CONS (object);
480 484
481 elt = XD_NEXT_VALUE (elt); 485 elt = XD_NEXT_VALUE (elt);
486 CHECK_CONS (elt);
482 487
483 /* Compose the signature from the elements. It is enclosed by 488 /* Compose the signature from the elements. It is enclosed by
484 parentheses. */ 489 parentheses. */
@@ -509,6 +514,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
509 514
510 /* First element. */ 515 /* First element. */
511 elt = XD_NEXT_VALUE (elt); 516 elt = XD_NEXT_VALUE (elt);
517 CHECK_CONS (elt);
512 subtype = XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (elt)); 518 subtype = XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (elt));
513 xd_signature (x, subtype, dtype, CAR_SAFE (XD_NEXT_VALUE (elt))); 519 xd_signature (x, subtype, dtype, CAR_SAFE (XD_NEXT_VALUE (elt)));
514 xd_signature_cat (signature, x); 520 xd_signature_cat (signature, x);
@@ -518,6 +524,7 @@ xd_signature (char *signature, int dtype, int parent_type, Lisp_Object object)
518 524
519 /* Second element. */ 525 /* Second element. */
520 elt = CDR_SAFE (XD_NEXT_VALUE (elt)); 526 elt = CDR_SAFE (XD_NEXT_VALUE (elt));
527 CHECK_CONS (elt);
521 subtype = XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (elt)); 528 subtype = XD_OBJECT_TO_DBUS_TYPE (CAR_SAFE (elt));
522 xd_signature (x, subtype, dtype, CAR_SAFE (XD_NEXT_VALUE (elt))); 529 xd_signature (x, subtype, dtype, CAR_SAFE (XD_NEXT_VALUE (elt)));
523 xd_signature_cat (signature, x); 530 xd_signature_cat (signature, x);
@@ -1227,7 +1234,7 @@ this connection to those buses. */)
1227 xd_add_watch, 1234 xd_add_watch,
1228 xd_remove_watch, 1235 xd_remove_watch,
1229 xd_toggle_watch, 1236 xd_toggle_watch,
1230 SYMBOLP (bus) 1237 XD_KEYWORDP (bus)
1231 ? (void *) XSYMBOL (bus) 1238 ? (void *) XSYMBOL (bus)
1232 : (void *) XSTRING (bus), 1239 : (void *) XSTRING (bus),
1233 NULL)) 1240 NULL))
@@ -1793,7 +1800,7 @@ xd_read_queued_messages (int fd, void *data)
1793 while (!NILP (busp)) 1800 while (!NILP (busp))
1794 { 1801 {
1795 key = CAR_SAFE (CAR_SAFE (busp)); 1802 key = CAR_SAFE (CAR_SAFE (busp));
1796 if ((SYMBOLP (key) && XSYMBOL (key) == data) 1803 if ((XD_KEYWORDP (key) && XSYMBOL (key) == data)
1797 || (STRINGP (key) && XSTRING (key) == data)) 1804 || (STRINGP (key) && XSTRING (key) == data))
1798 bus = key; 1805 bus = key;
1799 busp = CDR_SAFE (busp); 1806 busp = CDR_SAFE (busp);
diff --git a/src/image.c b/src/image.c
index 6ecf6a70fe2..25d5af8a8d5 100644
--- a/src/image.c
+++ b/src/image.c
@@ -2329,8 +2329,14 @@ lookup_image (struct frame *f, Lisp_Object spec, int face_id)
2329 struct image *img; 2329 struct image *img;
2330 EMACS_UINT hash; 2330 EMACS_UINT hash;
2331 2331
2332 struct face *face = (face_id >= 0) ? FACE_FROM_ID (f, face_id) 2332 if (FRAME_FACE_CACHE (f) == NULL)
2333 : FACE_FROM_ID (f, DEFAULT_FACE_ID); 2333 init_frame_faces (f);
2334 if (FRAME_FACE_CACHE (f)->used == 0)
2335 recompute_basic_faces (f);
2336 if (face_id < 0 || face_id >= FRAME_FACE_CACHE (f)->used)
2337 face_id = DEFAULT_FACE_ID;
2338
2339 struct face *face = FACE_FROM_ID (f, face_id);
2334 unsigned long foreground = FACE_COLOR_TO_PIXEL (face->foreground, f); 2340 unsigned long foreground = FACE_COLOR_TO_PIXEL (face->foreground, f);
2335 unsigned long background = FACE_COLOR_TO_PIXEL (face->background, f); 2341 unsigned long background = FACE_COLOR_TO_PIXEL (face->background, f);
2336 2342
diff --git a/src/indent.c b/src/indent.c
index 581323b91ee..4ecf02b6b96 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -524,9 +524,11 @@ check_display_width (ptrdiff_t pos, ptrdiff_t col, ptrdiff_t *endpos)
524 comes first. 524 comes first.
525 Return the resulting buffer position and column in ENDPOS and GOALCOL. 525 Return the resulting buffer position and column in ENDPOS and GOALCOL.
526 PREVCOL gets set to the column of the previous position (it's always 526 PREVCOL gets set to the column of the previous position (it's always
527 strictly smaller than the goal column). */ 527 strictly smaller than the goal column), and PREVPOS and PREVBPOS get set
528 to the corresponding buffer character and byte positions. */
528static void 529static void
529scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol) 530scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol,
531 ptrdiff_t *prevpos, ptrdiff_t *prevbpos, ptrdiff_t *prevcol)
530{ 532{
531 int tab_width = SANE_TAB_WIDTH (current_buffer); 533 int tab_width = SANE_TAB_WIDTH (current_buffer);
532 bool ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow)); 534 bool ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow));
@@ -540,10 +542,12 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol)
540 register ptrdiff_t col = 0, prev_col = 0; 542 register ptrdiff_t col = 0, prev_col = 0;
541 EMACS_INT goal = goalcol ? *goalcol : MOST_POSITIVE_FIXNUM; 543 EMACS_INT goal = goalcol ? *goalcol : MOST_POSITIVE_FIXNUM;
542 ptrdiff_t end = endpos ? *endpos : PT; 544 ptrdiff_t end = endpos ? *endpos : PT;
543 ptrdiff_t scan, scan_byte, next_boundary; 545 ptrdiff_t scan, scan_byte, next_boundary, prev_pos, prev_bpos;
544 546
545 scan = find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, NULL, &scan_byte, 1); 547 scan = find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, NULL, &scan_byte, 1);
546 next_boundary = scan; 548 next_boundary = scan;
549 prev_pos = scan;
550 prev_bpos = scan_byte;
547 551
548 window = Fget_buffer_window (Fcurrent_buffer (), Qnil); 552 window = Fget_buffer_window (Fcurrent_buffer (), Qnil);
549 w = ! NILP (window) ? XWINDOW (window) : NULL; 553 w = ! NILP (window) ? XWINDOW (window) : NULL;
@@ -576,6 +580,8 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol)
576 if (col >= goal) 580 if (col >= goal)
577 break; 581 break;
578 prev_col = col; 582 prev_col = col;
583 prev_pos = scan;
584 prev_bpos = scan_byte;
579 585
580 { /* Check display property. */ 586 { /* Check display property. */
581 ptrdiff_t endp; 587 ptrdiff_t endp;
@@ -705,6 +711,10 @@ scan_for_column (ptrdiff_t *endpos, EMACS_INT *goalcol, ptrdiff_t *prevcol)
705 *goalcol = col; 711 *goalcol = col;
706 if (endpos) 712 if (endpos)
707 *endpos = scan; 713 *endpos = scan;
714 if (prevpos)
715 *prevpos = prev_pos;
716 if (prevbpos)
717 *prevbpos = prev_bpos;
708 if (prevcol) 718 if (prevcol)
709 *prevcol = prev_col; 719 *prevcol = prev_col;
710} 720}
@@ -720,7 +730,7 @@ current_column_1 (void)
720 EMACS_INT col = MOST_POSITIVE_FIXNUM; 730 EMACS_INT col = MOST_POSITIVE_FIXNUM;
721 ptrdiff_t opoint = PT; 731 ptrdiff_t opoint = PT;
722 732
723 scan_for_column (&opoint, &col, NULL); 733 scan_for_column (&opoint, &col, NULL, NULL, NULL);
724 return col; 734 return col;
725} 735}
726 736
@@ -988,7 +998,7 @@ to reach COLUMN, add spaces/tabs to get there.
988The return value is the current column. */) 998The return value is the current column. */)
989 (Lisp_Object column, Lisp_Object force) 999 (Lisp_Object column, Lisp_Object force)
990{ 1000{
991 ptrdiff_t pos, prev_col; 1001 ptrdiff_t pos, prev_pos, prev_bpos, prev_col;
992 EMACS_INT col; 1002 EMACS_INT col;
993 EMACS_INT goal; 1003 EMACS_INT goal;
994 1004
@@ -997,7 +1007,7 @@ The return value is the current column. */)
997 1007
998 col = goal; 1008 col = goal;
999 pos = ZV; 1009 pos = ZV;
1000 scan_for_column (&pos, &col, &prev_col); 1010 scan_for_column (&pos, &col, &prev_pos, &prev_bpos, &prev_col);
1001 1011
1002 SET_PT (pos); 1012 SET_PT (pos);
1003 1013
@@ -1006,18 +1016,16 @@ The return value is the current column. */)
1006 if (!NILP (force) && col > goal) 1016 if (!NILP (force) && col > goal)
1007 { 1017 {
1008 int c; 1018 int c;
1009 ptrdiff_t pos_byte = PT_BYTE;
1010 1019
1011 pos_byte -= prev_char_len (pos_byte); 1020 c = FETCH_CHAR (prev_bpos);
1012 c = FETCH_CHAR (pos_byte); 1021 if (c == '\t' && prev_col < goal && prev_bpos < PT_BYTE)
1013 if (c == '\t' && prev_col < goal)
1014 { 1022 {
1015 ptrdiff_t goal_pt, goal_pt_byte; 1023 ptrdiff_t goal_pt, goal_pt_byte;
1016 1024
1017 /* Insert spaces in front of the tab to reach GOAL. Do this 1025 /* Insert spaces in front of the tab to reach GOAL. Do this
1018 first so that a marker at the end of the tab gets 1026 first so that a marker at the end of the tab gets
1019 adjusted. */ 1027 adjusted. */
1020 SET_PT_BOTH (PT - 1, PT_BYTE - 1); 1028 SET_PT_BOTH (prev_pos, prev_bpos);
1021 Finsert_char (make_fixnum (' '), make_fixnum (goal - prev_col), Qt); 1029 Finsert_char (make_fixnum (' '), make_fixnum (goal - prev_col), Qt);
1022 1030
1023 /* Now delete the tab, and indent to COL. */ 1031 /* Now delete the tab, and indent to COL. */
diff --git a/src/w16select.c b/src/w16select.c
index 5a68162e25c..b56ced4f2e5 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -224,7 +224,7 @@ set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
224 224
225 if (!Raw) 225 if (!Raw)
226 { 226 {
227 /* avoid using strchr because it recomputes the length everytime */ 227 /* avoid using strchr because it recomputes the length every time */
228 while ((dp = memchr (dp, '\n', Size - (dp - dstart))) != 0) 228 while ((dp = memchr (dp, '\n', Size - (dp - dstart))) != 0)
229 { 229 {
230 truelen++; 230 truelen++;
diff --git a/src/w32.c b/src/w32.c
index 38bbc496563..d4a8d2e6ffb 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -6520,7 +6520,8 @@ acl_get_file (const char *fname, acl_type_t type)
6520 { 6520 {
6521 xfree (psd); 6521 xfree (psd);
6522 err = GetLastError (); 6522 err = GetLastError ();
6523 if (err == ERROR_NOT_SUPPORTED) 6523 if (err == ERROR_NOT_SUPPORTED
6524 || err == ERROR_ACCESS_DENIED)
6524 errno = ENOTSUP; 6525 errno = ENOTSUP;
6525 else if (err == ERROR_FILE_NOT_FOUND 6526 else if (err == ERROR_FILE_NOT_FOUND
6526 || err == ERROR_PATH_NOT_FOUND 6527 || err == ERROR_PATH_NOT_FOUND
@@ -6538,7 +6539,11 @@ acl_get_file (const char *fname, acl_type_t type)
6538 be encoded in the current ANSI codepage. */ 6539 be encoded in the current ANSI codepage. */
6539 || err == ERROR_INVALID_NAME) 6540 || err == ERROR_INVALID_NAME)
6540 errno = ENOENT; 6541 errno = ENOENT;
6541 else if (err == ERROR_NOT_SUPPORTED) 6542 else if (err == ERROR_NOT_SUPPORTED
6543 /* ERROR_ACCESS_DENIED is what we get for a volume
6544 mounted by WebDAV, which evidently doesn't
6545 support ACLs. */
6546 || err == ERROR_ACCESS_DENIED)
6542 errno = ENOTSUP; 6547 errno = ENOTSUP;
6543 else 6548 else
6544 errno = EIO; 6549 errno = EIO;
diff --git a/src/w32select.c b/src/w32select.c
index 9a4b43bc69a..4e5bd6a00f0 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -956,7 +956,7 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data,
956 956
957 truelen = nbytes; 957 truelen = nbytes;
958 dst = src; 958 dst = src;
959 /* avoid using strchr because it recomputes the length everytime */ 959 /* avoid using strchr because it recomputes the length every time */
960 while ((dst = memchr (dst, '\r', nbytes - (dst - src))) != NULL) 960 while ((dst = memchr (dst, '\r', nbytes - (dst - src))) != NULL)
961 { 961 {
962 if (dst[1] == '\n') /* safe because of trailing '\0' */ 962 if (dst[1] == '\n') /* safe because of trailing '\0' */
diff --git a/src/xdisp.c b/src/xdisp.c
index 152946363ed..d9101592b2a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12400,12 +12400,12 @@ unwind_format_mode_line (Lisp_Object vector)
12400 mode_line_string_face_prop = AREF (vector, 5); 12400 mode_line_string_face_prop = AREF (vector, 5);
12401 12401
12402 /* Select window before buffer, since it may change the buffer. */ 12402 /* Select window before buffer, since it may change the buffer. */
12403 if (!NILP (old_window)) 12403 if (WINDOW_LIVE_P (old_window))
12404 { 12404 {
12405 /* If the operation that we are unwinding had selected a window 12405 /* If the operation that we are unwinding had selected a window
12406 on a different frame, reset its frame-selected-window. For a 12406 on a different frame, reset its frame-selected-window. For a
12407 text terminal, reset its top-frame if necessary. */ 12407 text terminal, reset its top-frame if necessary. */
12408 if (!NILP (target_frame_window)) 12408 if (WINDOW_LIVE_P (target_frame_window))
12409 { 12409 {
12410 Lisp_Object frame 12410 Lisp_Object frame
12411 = WINDOW_FRAME (XWINDOW (target_frame_window)); 12411 = WINDOW_FRAME (XWINDOW (target_frame_window));
@@ -12422,7 +12422,7 @@ unwind_format_mode_line (Lisp_Object vector)
12422 /* Restore point of target_frame_window's buffer (Bug#32777). 12422 /* Restore point of target_frame_window's buffer (Bug#32777).
12423 But do this only after old_window has been reselected to 12423 But do this only after old_window has been reselected to
12424 avoid that the window point of target_frame_window moves. */ 12424 avoid that the window point of target_frame_window moves. */
12425 if (!NILP (target_frame_window)) 12425 if (WINDOW_LIVE_P (target_frame_window))
12426 { 12426 {
12427 Lisp_Object buffer = AREF (vector, 10); 12427 Lisp_Object buffer = AREF (vector, 10);
12428 12428
@@ -12850,23 +12850,68 @@ update_menu_bar (struct frame *f, bool save_match_data, bool hooks_run)
12850 Tab-bars 12850 Tab-bars
12851 ***********************************************************************/ 12851 ***********************************************************************/
12852 12852
12853#ifdef HAVE_WINDOW_SYSTEM 12853/* Restore WINDOW as the selected window and its frame as the selected
12854 12854 frame. If WINDOW is dead but the selected frame is live, make the
12855/* Select `frame' temporarily without running all the code in 12855 latter's selected window the selected window. If both, WINDOW and
12856 do_switch_frame. 12856 the selected frame, are dead, assign selected frame and window from
12857 FIXME: Maybe do_switch_frame should be trimmed down similarly 12857 some arbitrary live frame. Abort if no such frame can be found. */
12858 when `norecord' is set. */
12859static void 12858static void
12860fast_set_selected_frame (Lisp_Object frame) 12859restore_selected_window (Lisp_Object window)
12861{ 12860{
12862 if (!EQ (selected_frame, frame)) 12861 if (WINDOW_LIVE_P (window))
12862 /* If WINDOW is live, make it the selected window and its frame's
12863 selected window and set the selected frame to its frame. */
12863 { 12864 {
12864 selected_frame = frame; 12865 selected_window = window;
12865 selected_window = XFRAME (frame)->selected_window; 12866 selected_frame = XWINDOW (window)->frame;
12867 FRAME_SELECTED_WINDOW (XFRAME (selected_frame)) = window;
12868 }
12869 else if (FRAMEP (selected_frame) && FRAME_LIVE_P (XFRAME (selected_frame)))
12870 /* If WINDOW is dead but the selected frame is still live, make the
12871 latter's selected window the selected one. */
12872 selected_window = FRAME_SELECTED_WINDOW (XFRAME (selected_frame));
12873 else
12874 /* If WINDOW and the selected frame are dead, choose some live,
12875 non-child and non-tooltip frame as the new selected frame and
12876 make its selected window the selected window. */
12877 {
12878 Lisp_Object tail;
12879 Lisp_Object frame UNINIT;
12880
12881 FOR_EACH_FRAME (tail, frame)
12882 {
12883 struct frame *f = XFRAME (frame);
12884
12885 if (!FRAME_PARENT_FRAME (f) && !FRAME_TOOLTIP_P (f))
12886 {
12887 selected_frame = frame;
12888 selected_window = FRAME_SELECTED_WINDOW (f);
12889
12890 return;
12891 }
12892 }
12893
12894 /* Abort if we cannot find a live frame. */
12895 emacs_abort ();
12866 } 12896 }
12867} 12897}
12868 12898
12869#endif /* HAVE_WINDOW_SYSTEM */ 12899/* Restore WINDOW, if live, as its frame's selected window. */
12900static void
12901restore_frame_selected_window (Lisp_Object window)
12902{
12903 if (WINDOW_LIVE_P (window))
12904 /* If WINDOW is live, make it its frame's selected window. If that
12905 frame is the selected frame, make WINDOW the selected window as
12906 well. */
12907 {
12908 Lisp_Object frame = XWINDOW (window)->frame;
12909
12910 FRAME_SELECTED_WINDOW (XFRAME (frame)) = window;
12911 if (EQ (frame, selected_frame))
12912 selected_window = window;
12913 }
12914}
12870 12915
12871/* Update the tab-bar item list for frame F. This has to be done 12916/* Update the tab-bar item list for frame F. This has to be done
12872 before we start to fill in any display lines. Called from 12917 before we start to fill in any display lines. Called from
@@ -12939,9 +12984,10 @@ update_tab_bar (struct frame *f, bool save_match_data)
12939 XFRAME (selected_frame)->selected_window)); 12984 XFRAME (selected_frame)->selected_window));
12940#ifdef HAVE_WINDOW_SYSTEM 12985#ifdef HAVE_WINDOW_SYSTEM
12941 Lisp_Object frame; 12986 Lisp_Object frame;
12942 record_unwind_protect (fast_set_selected_frame, selected_frame); 12987 record_unwind_protect (restore_selected_window, selected_window);
12943 XSETFRAME (frame, f); 12988 XSETFRAME (frame, f);
12944 fast_set_selected_frame (frame); 12989 selected_frame = frame;
12990 selected_window = FRAME_SELECTED_WINDOW (f);
12945#endif 12991#endif
12946 12992
12947 /* Build desired tab-bar items from keymaps. */ 12993 /* Build desired tab-bar items from keymaps. */
@@ -13873,9 +13919,10 @@ update_tool_bar (struct frame *f, bool save_match_data)
13873 /* Since we only explicitly preserve selected_frame, 13919 /* Since we only explicitly preserve selected_frame,
13874 check that selected_window would be redundant. */ 13920 check that selected_window would be redundant. */
13875 XFRAME (selected_frame)->selected_window)); 13921 XFRAME (selected_frame)->selected_window));
13876 record_unwind_protect (fast_set_selected_frame, selected_frame); 13922 record_unwind_protect (restore_selected_window, selected_window);
13877 XSETFRAME (frame, f); 13923 XSETFRAME (frame, f);
13878 fast_set_selected_frame (frame); 13924 selected_frame = frame;
13925 selected_window = FRAME_SELECTED_WINDOW (f);
13879 13926
13880 /* Build desired tool-bar items from keymaps. */ 13927 /* Build desired tool-bar items from keymaps. */
13881 new_tool_bar 13928 new_tool_bar
@@ -25217,11 +25264,14 @@ static int
25217display_mode_lines (struct window *w) 25264display_mode_lines (struct window *w)
25218{ 25265{
25219 Lisp_Object old_selected_window = selected_window; 25266 Lisp_Object old_selected_window = selected_window;
25220 Lisp_Object old_selected_frame = selected_frame;
25221 Lisp_Object new_frame = w->frame; 25267 Lisp_Object new_frame = w->frame;
25222 Lisp_Object old_frame_selected_window = XFRAME (new_frame)->selected_window; 25268 ptrdiff_t count = SPECPDL_INDEX ();
25223 int n = 0; 25269 int n = 0;
25224 25270
25271 record_unwind_protect (restore_selected_window, selected_window);
25272 record_unwind_protect
25273 (restore_frame_selected_window, XFRAME (new_frame)->selected_window);
25274
25225 if (window_wants_mode_line (w)) 25275 if (window_wants_mode_line (w))
25226 { 25276 {
25227 Lisp_Object window; 25277 Lisp_Object window;
@@ -25287,9 +25337,8 @@ display_mode_lines (struct window *w)
25287 ++n; 25337 ++n;
25288 } 25338 }
25289 25339
25290 XFRAME (new_frame)->selected_window = old_frame_selected_window; 25340 unbind_to (count, Qnil);
25291 selected_frame = old_selected_frame; 25341
25292 selected_window = old_selected_window;
25293 if (n > 0) 25342 if (n > 0)
25294 w->must_be_updated_p = true; 25343 w->must_be_updated_p = true;
25295 return n; 25344 return n;