diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispextern.h | 1 | ||||
| -rw-r--r-- | src/doc.c | 14 | ||||
| -rw-r--r-- | src/editfns.c | 4 | ||||
| -rw-r--r-- | src/keyboard.c | 46 | ||||
| -rw-r--r-- | src/keyboard.h | 5 | ||||
| -rw-r--r-- | src/process.c | 12 | ||||
| -rw-r--r-- | src/w32.c | 33 | ||||
| -rw-r--r-- | src/xdisp.c | 22 | ||||
| -rw-r--r-- | src/xfaces.c | 2 |
9 files changed, 96 insertions, 43 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index 37ebab04ddf..e5adeab0dc0 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -3245,6 +3245,7 @@ extern ptrdiff_t compute_display_string_end (ptrdiff_t, | |||
| 3245 | struct bidi_string_data *); | 3245 | struct bidi_string_data *); |
| 3246 | extern void produce_stretch_glyph (struct it *); | 3246 | extern void produce_stretch_glyph (struct it *); |
| 3247 | extern int merge_glyphless_glyph_face (struct it *); | 3247 | extern int merge_glyphless_glyph_face (struct it *); |
| 3248 | extern void forget_escape_and_glyphless_faces (void); | ||
| 3248 | 3249 | ||
| 3249 | extern void get_font_ascent_descent (struct font *, int *, int *); | 3250 | extern void get_font_ascent_descent (struct font *, int *, int *); |
| 3250 | 3251 | ||
| @@ -724,7 +724,7 @@ as the keymap for future \\=\\[COMMAND] substrings. | |||
| 724 | 724 | ||
| 725 | Each \\=‘ and \\=` is replaced by left quote, and each \\=’ and \\=' | 725 | Each \\=‘ and \\=` is replaced by left quote, and each \\=’ and \\=' |
| 726 | is replaced by right quote. Left and right quote characters are | 726 | is replaced by right quote. Left and right quote characters are |
| 727 | specified by ‘text-quoting-style’. | 727 | specified by `text-quoting-style'. |
| 728 | 728 | ||
| 729 | \\=\\= quotes the following character and is discarded; thus, | 729 | \\=\\= quotes the following character and is discarded; thus, |
| 730 | \\=\\=\\=\\= puts \\=\\= into the output, \\=\\=\\=\\[ puts \\=\\[ into the output, and | 730 | \\=\\=\\=\\= puts \\=\\= into the output, \\=\\=\\=\\[ puts \\=\\[ into the output, and |
| @@ -1024,15 +1024,15 @@ syms_of_doc (void) | |||
| 1024 | 1024 | ||
| 1025 | DEFVAR_LISP ("text-quoting-style", Vtext_quoting_style, | 1025 | DEFVAR_LISP ("text-quoting-style", Vtext_quoting_style, |
| 1026 | doc: /* Style to use for single quotes when generating text. | 1026 | doc: /* Style to use for single quotes when generating text. |
| 1027 | ‘curve’ means quote with curved single quotes \\=‘like this\\=’. | 1027 | `curve' means quote with curved single quotes \\=‘like this\\=’. |
| 1028 | ‘straight’ means quote with straight apostrophes \\='like this\\='. | 1028 | `straight' means quote with straight apostrophes \\='like this\\='. |
| 1029 | ‘grave’ means quote with grave accent and apostrophe \\=`like this\\='. | 1029 | `grave' means quote with grave accent and apostrophe \\=`like this\\='. |
| 1030 | The default value nil acts like ‘curve’ if curved single quotes are | 1030 | The default value nil acts like `curve' if curved single quotes are |
| 1031 | displayable, and like ‘grave’ otherwise. */); | 1031 | displayable, and like `grave' otherwise. */); |
| 1032 | Vtext_quoting_style = Qnil; | 1032 | Vtext_quoting_style = Qnil; |
| 1033 | 1033 | ||
| 1034 | DEFVAR_BOOL ("internal--text-quoting-flag", text_quoting_flag, | 1034 | DEFVAR_BOOL ("internal--text-quoting-flag", text_quoting_flag, |
| 1035 | doc: /* If nil, a nil ‘text-quoting-style’ is treated as ‘grave’. */); | 1035 | doc: /* If nil, a nil `text-quoting-style' is treated as `grave'. */); |
| 1036 | /* Initialized by ‘main’. */ | 1036 | /* Initialized by ‘main’. */ |
| 1037 | 1037 | ||
| 1038 | defsubr (&Sdocumentation); | 1038 | defsubr (&Sdocumentation); |
diff --git a/src/editfns.c b/src/editfns.c index e7d5dd89e51..831edb4c171 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3837,11 +3837,11 @@ DEFUN ("format-message", Fformat_message, Sformat_message, 1, MANY, 0, | |||
| 3837 | The first argument is a format control string. | 3837 | The first argument is a format control string. |
| 3838 | The other arguments are substituted into it to make the result, a string. | 3838 | The other arguments are substituted into it to make the result, a string. |
| 3839 | 3839 | ||
| 3840 | This acts like ‘format’, except it also replaces each left single | 3840 | This acts like `format', except it also replaces each left single |
| 3841 | quotation mark (\\=‘) and grave accent (\\=`) by a left quote, and each | 3841 | quotation mark (\\=‘) and grave accent (\\=`) by a left quote, and each |
| 3842 | right single quotation mark (\\=’) and apostrophe (\\=') by a right quote. | 3842 | right single quotation mark (\\=’) and apostrophe (\\=') by a right quote. |
| 3843 | The left and right quote replacement characters are specified by | 3843 | The left and right quote replacement characters are specified by |
| 3844 | ‘text-quoting-style’. | 3844 | `text-quoting-style'. |
| 3845 | 3845 | ||
| 3846 | usage: (format-message STRING &rest OBJECTS) */) | 3846 | usage: (format-message STRING &rest OBJECTS) */) |
| 3847 | (ptrdiff_t nargs, Lisp_Object *args) | 3847 | (ptrdiff_t nargs, Lisp_Object *args) |
diff --git a/src/keyboard.c b/src/keyboard.c index a8b1e9828bf..ccd340557dd 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -380,6 +380,11 @@ kset_echo_string (struct kboard *kb, Lisp_Object val) | |||
| 380 | kb->echo_string_ = val; | 380 | kb->echo_string_ = val; |
| 381 | } | 381 | } |
| 382 | static void | 382 | static void |
| 383 | kset_echo_prompt (struct kboard *kb, Lisp_Object val) | ||
| 384 | { | ||
| 385 | kb->echo_prompt_ = val; | ||
| 386 | } | ||
| 387 | static void | ||
| 383 | kset_kbd_queue (struct kboard *kb, Lisp_Object val) | 388 | kset_kbd_queue (struct kboard *kb, Lisp_Object val) |
| 384 | { | 389 | { |
| 385 | kb->kbd_queue_ = val; | 390 | kb->kbd_queue_ = val; |
| @@ -501,8 +506,9 @@ echo_dash (void) | |||
| 501 | return; | 506 | return; |
| 502 | 507 | ||
| 503 | /* Do nothing if we just printed a prompt. */ | 508 | /* Do nothing if we just printed a prompt. */ |
| 504 | if (current_kboard->echo_after_prompt | 509 | if (STRINGP (KVAR (current_kboard, echo_prompt)) |
| 505 | == SCHARS (KVAR (current_kboard, echo_string))) | 510 | && (SCHARS (KVAR (current_kboard, echo_prompt)) |
| 511 | == SCHARS (KVAR (current_kboard, echo_string)))) | ||
| 506 | return; | 512 | return; |
| 507 | 513 | ||
| 508 | /* Do nothing if we have already put a dash at the end. */ | 514 | /* Do nothing if we have already put a dash at the end. */ |
| @@ -534,8 +540,12 @@ echo_update (void) | |||
| 534 | if (current_kboard->immediate_echo) | 540 | if (current_kboard->immediate_echo) |
| 535 | { | 541 | { |
| 536 | ptrdiff_t i; | 542 | ptrdiff_t i; |
| 543 | Lisp_Object prompt = KVAR (current_kboard, echo_prompt); | ||
| 544 | Lisp_Object prefix = call0 (Qinternal_echo_keystrokes_prefix); | ||
| 537 | kset_echo_string (current_kboard, | 545 | kset_echo_string (current_kboard, |
| 538 | call0 (Qinternal_echo_keystrokes_prefix)); | 546 | NILP (prompt) ? prefix |
| 547 | : NILP (prefix) ? prompt | ||
| 548 | : concat2 (prompt, prefix)); | ||
| 539 | 549 | ||
| 540 | for (i = 0; i < this_command_key_count; i++) | 550 | for (i = 0; i < this_command_key_count; i++) |
| 541 | { | 551 | { |
| @@ -584,7 +594,7 @@ void | |||
| 584 | cancel_echoing (void) | 594 | cancel_echoing (void) |
| 585 | { | 595 | { |
| 586 | current_kboard->immediate_echo = false; | 596 | current_kboard->immediate_echo = false; |
| 587 | current_kboard->echo_after_prompt = -1; | 597 | kset_echo_prompt (current_kboard, Qnil); |
| 588 | kset_echo_string (current_kboard, Qnil); | 598 | kset_echo_string (current_kboard, Qnil); |
| 589 | ok_to_echo_at_next_pause = NULL; | 599 | ok_to_echo_at_next_pause = NULL; |
| 590 | echo_kboard = NULL; | 600 | echo_kboard = NULL; |
| @@ -693,11 +703,11 @@ force_auto_save_soon (void) | |||
| 693 | 703 | ||
| 694 | DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", | 704 | DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", |
| 695 | doc: /* Invoke the editor command loop recursively. | 705 | doc: /* Invoke the editor command loop recursively. |
| 696 | To get out of the recursive edit, a command can throw to ‘exit’ -- for | 706 | To get out of the recursive edit, a command can throw to `exit' -- for |
| 697 | instance ‘(throw \\='exit nil)’. | 707 | instance (throw \\='exit nil). |
| 698 | If you throw a value other than t, ‘recursive-edit’ returns normally | 708 | If you throw a value other than t, `recursive-edit' returns normally |
| 699 | to the function that called it. Throwing a t value causes | 709 | to the function that called it. Throwing a t value causes |
| 700 | ‘recursive-edit’ to quit, so that control returns to the command loop | 710 | `recursive-edit' to quit, so that control returns to the command loop |
| 701 | one level up. | 711 | one level up. |
| 702 | 712 | ||
| 703 | This function is called by the editor initialization to begin editing. */) | 713 | This function is called by the editor initialization to begin editing. */) |
| @@ -2942,7 +2952,7 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2942 | bool saved_immediate_echo = current_kboard->immediate_echo; | 2952 | bool saved_immediate_echo = current_kboard->immediate_echo; |
| 2943 | struct kboard *saved_ok_to_echo = ok_to_echo_at_next_pause; | 2953 | struct kboard *saved_ok_to_echo = ok_to_echo_at_next_pause; |
| 2944 | Lisp_Object saved_echo_string = KVAR (current_kboard, echo_string); | 2954 | Lisp_Object saved_echo_string = KVAR (current_kboard, echo_string); |
| 2945 | ptrdiff_t saved_echo_after_prompt = current_kboard->echo_after_prompt; | 2955 | Lisp_Object saved_echo_prompt = KVAR (current_kboard, echo_prompt); |
| 2946 | 2956 | ||
| 2947 | /* Save the this_command_keys status. */ | 2957 | /* Save the this_command_keys status. */ |
| 2948 | key_count = this_command_key_count; | 2958 | key_count = this_command_key_count; |
| @@ -2984,15 +2994,8 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2984 | 2994 | ||
| 2985 | cancel_echoing (); | 2995 | cancel_echoing (); |
| 2986 | ok_to_echo_at_next_pause = saved_ok_to_echo; | 2996 | ok_to_echo_at_next_pause = saved_ok_to_echo; |
| 2987 | /* Do not restore the echo area string when the user is | 2997 | kset_echo_string (current_kboard, saved_echo_string); |
| 2988 | introducing a prefix argument. Otherwise we end with | 2998 | kset_echo_prompt (current_kboard, saved_echo_prompt); |
| 2989 | repetitions of the partially introduced prefix | ||
| 2990 | argument. (bug#19875) */ | ||
| 2991 | if (NILP (intern ("prefix-arg"))) | ||
| 2992 | { | ||
| 2993 | kset_echo_string (current_kboard, saved_echo_string); | ||
| 2994 | } | ||
| 2995 | current_kboard->echo_after_prompt = saved_echo_after_prompt; | ||
| 2996 | if (saved_immediate_echo) | 2999 | if (saved_immediate_echo) |
| 2997 | echo_now (); | 3000 | echo_now (); |
| 2998 | 3001 | ||
| @@ -8870,8 +8873,8 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt, | |||
| 8870 | /* Install the string PROMPT as the beginning of the string | 8873 | /* Install the string PROMPT as the beginning of the string |
| 8871 | of echoing, so that it serves as a prompt for the next | 8874 | of echoing, so that it serves as a prompt for the next |
| 8872 | character. */ | 8875 | character. */ |
| 8873 | kset_echo_string (current_kboard, prompt); | 8876 | kset_echo_prompt (current_kboard, prompt); |
| 8874 | current_kboard->echo_after_prompt = SCHARS (prompt); | 8877 | current_kboard->immediate_echo = false; |
| 8875 | echo_now (); | 8878 | echo_now (); |
| 8876 | } | 8879 | } |
| 8877 | else if (cursor_in_echo_area | 8880 | else if (cursor_in_echo_area |
| @@ -10695,7 +10698,7 @@ init_kboard (KBOARD *kb, Lisp_Object type) | |||
| 10695 | kb->kbd_queue_has_data = false; | 10698 | kb->kbd_queue_has_data = false; |
| 10696 | kb->immediate_echo = false; | 10699 | kb->immediate_echo = false; |
| 10697 | kset_echo_string (kb, Qnil); | 10700 | kset_echo_string (kb, Qnil); |
| 10698 | kb->echo_after_prompt = -1; | 10701 | kset_echo_prompt (kb, Qnil); |
| 10699 | kb->kbd_macro_buffer = 0; | 10702 | kb->kbd_macro_buffer = 0; |
| 10700 | kb->kbd_macro_bufsize = 0; | 10703 | kb->kbd_macro_bufsize = 0; |
| 10701 | kset_defining_kbd_macro (kb, Qnil); | 10704 | kset_defining_kbd_macro (kb, Qnil); |
| @@ -11758,6 +11761,7 @@ mark_kboards (void) | |||
| 11758 | mark_object (KVAR (kb, Vlocal_function_key_map)); | 11761 | mark_object (KVAR (kb, Vlocal_function_key_map)); |
| 11759 | mark_object (KVAR (kb, Vdefault_minibuffer_frame)); | 11762 | mark_object (KVAR (kb, Vdefault_minibuffer_frame)); |
| 11760 | mark_object (KVAR (kb, echo_string)); | 11763 | mark_object (KVAR (kb, echo_string)); |
| 11764 | mark_object (KVAR (kb, echo_prompt)); | ||
| 11761 | } | 11765 | } |
| 11762 | { | 11766 | { |
| 11763 | union buffered_input_event *event; | 11767 | union buffered_input_event *event; |
diff --git a/src/keyboard.h b/src/keyboard.h index 3e4c475d285..0402e0a582c 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -175,9 +175,8 @@ struct kboard | |||
| 175 | /* True means echo each character as typed. */ | 175 | /* True means echo each character as typed. */ |
| 176 | bool_bf immediate_echo : 1; | 176 | bool_bf immediate_echo : 1; |
| 177 | 177 | ||
| 178 | /* If we have echoed a prompt string specified by the user, | 178 | /* If we have a prompt string specified by the user, this is it. */ |
| 179 | this is its length in characters. Otherwise this is -1. */ | 179 | Lisp_Object echo_prompt_; |
| 180 | ptrdiff_t echo_after_prompt; | ||
| 181 | }; | 180 | }; |
| 182 | 181 | ||
| 183 | INLINE void | 182 | INLINE void |
diff --git a/src/process.c b/src/process.c index 1ab83780914..f4613be28ed 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4859,6 +4859,10 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4859 | data is available in the buffers manually. */ | 4859 | data is available in the buffers manually. */ |
| 4860 | if (nfds == 0) | 4860 | if (nfds == 0) |
| 4861 | { | 4861 | { |
| 4862 | fd_set tls_available; | ||
| 4863 | int set = 0; | ||
| 4864 | |||
| 4865 | FD_ZERO (&tls_available); | ||
| 4862 | if (! wait_proc) | 4866 | if (! wait_proc) |
| 4863 | { | 4867 | { |
| 4864 | /* We're not waiting on a specific process, so loop | 4868 | /* We're not waiting on a specific process, so loop |
| @@ -4879,7 +4883,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4879 | { | 4883 | { |
| 4880 | nfds++; | 4884 | nfds++; |
| 4881 | eassert (p->infd == channel); | 4885 | eassert (p->infd == channel); |
| 4882 | FD_SET (p->infd, &Available); | 4886 | FD_SET (p->infd, &tls_available); |
| 4887 | set++; | ||
| 4883 | } | 4888 | } |
| 4884 | } | 4889 | } |
| 4885 | } | 4890 | } |
| @@ -4896,9 +4901,12 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 4896 | nfds = 1; | 4901 | nfds = 1; |
| 4897 | eassert (0 <= wait_proc->infd); | 4902 | eassert (0 <= wait_proc->infd); |
| 4898 | /* Set to Available. */ | 4903 | /* Set to Available. */ |
| 4899 | FD_SET (wait_proc->infd, &Available); | 4904 | FD_SET (wait_proc->infd, &tls_available); |
| 4905 | set++; | ||
| 4900 | } | 4906 | } |
| 4901 | } | 4907 | } |
| 4908 | if (set) | ||
| 4909 | Available = tls_available; | ||
| 4902 | } | 4910 | } |
| 4903 | #endif | 4911 | #endif |
| 4904 | } | 4912 | } |
| @@ -4534,6 +4534,8 @@ sys_rmdir (const char * path) | |||
| 4534 | int | 4534 | int |
| 4535 | sys_unlink (const char * path) | 4535 | sys_unlink (const char * path) |
| 4536 | { | 4536 | { |
| 4537 | int rmstatus, e; | ||
| 4538 | |||
| 4537 | path = map_w32_filename (path, NULL); | 4539 | path = map_w32_filename (path, NULL); |
| 4538 | 4540 | ||
| 4539 | if (w32_unicode_filenames) | 4541 | if (w32_unicode_filenames) |
| @@ -4541,9 +4543,18 @@ sys_unlink (const char * path) | |||
| 4541 | wchar_t path_w[MAX_PATH]; | 4543 | wchar_t path_w[MAX_PATH]; |
| 4542 | 4544 | ||
| 4543 | filename_to_utf16 (path, path_w); | 4545 | filename_to_utf16 (path, path_w); |
| 4544 | /* On Unix, unlink works without write permission. */ | 4546 | /* On Unix, unlink works without write permission. */ |
| 4545 | _wchmod (path_w, 0666); | 4547 | _wchmod (path_w, 0666); |
| 4546 | return _wunlink (path_w); | 4548 | rmstatus = _wunlink (path_w); |
| 4549 | e = errno; | ||
| 4550 | /* Symlinks to directories can only be deleted by _rmdir; | ||
| 4551 | _unlink returns EACCES. */ | ||
| 4552 | if (rmstatus != 0 | ||
| 4553 | && errno == EACCES | ||
| 4554 | && (is_symlink (path) & FILE_ATTRIBUTE_DIRECTORY) != 0) | ||
| 4555 | rmstatus = _wrmdir (path_w); | ||
| 4556 | else | ||
| 4557 | errno = e; | ||
| 4547 | } | 4558 | } |
| 4548 | else | 4559 | else |
| 4549 | { | 4560 | { |
| @@ -4551,8 +4562,17 @@ sys_unlink (const char * path) | |||
| 4551 | 4562 | ||
| 4552 | filename_to_ansi (path, path_a); | 4563 | filename_to_ansi (path, path_a); |
| 4553 | _chmod (path_a, 0666); | 4564 | _chmod (path_a, 0666); |
| 4554 | return _unlink (path_a); | 4565 | rmstatus = _unlink (path_a); |
| 4566 | e = errno; | ||
| 4567 | if (rmstatus != 0 | ||
| 4568 | && errno == EACCES | ||
| 4569 | && (is_symlink (path) & FILE_ATTRIBUTE_DIRECTORY) != 0) | ||
| 4570 | rmstatus = _rmdir (path_a); | ||
| 4571 | else | ||
| 4572 | errno = e; | ||
| 4555 | } | 4573 | } |
| 4574 | |||
| 4575 | return rmstatus; | ||
| 4556 | } | 4576 | } |
| 4557 | 4577 | ||
| 4558 | static FILETIME utc_base_ft; | 4578 | static FILETIME utc_base_ft; |
| @@ -5626,7 +5646,8 @@ symlink (char const *filename, char const *linkname) | |||
| 5626 | /* A quick inexpensive test of whether FILENAME identifies a file that | 5646 | /* A quick inexpensive test of whether FILENAME identifies a file that |
| 5627 | is a symlink. Returns non-zero if it is, zero otherwise. FILENAME | 5647 | is a symlink. Returns non-zero if it is, zero otherwise. FILENAME |
| 5628 | must already be in the normalized form returned by | 5648 | must already be in the normalized form returned by |
| 5629 | map_w32_filename. | 5649 | map_w32_filename. If the symlink is to a directory, the |
| 5650 | FILE_ATTRIBUTE_DIRECTORY bit will be set in the return value. | ||
| 5630 | 5651 | ||
| 5631 | Note: for repeated operations on many files, it is best to test | 5652 | Note: for repeated operations on many files, it is best to test |
| 5632 | whether the underlying volume actually supports symlinks, by | 5653 | whether the underlying volume actually supports symlinks, by |
| @@ -5684,6 +5705,8 @@ is_symlink (const char *filename) | |||
| 5684 | attrs_mean_symlink = | 5705 | attrs_mean_symlink = |
| 5685 | (wfdw.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0 | 5706 | (wfdw.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0 |
| 5686 | && (wfdw.dwReserved0 & IO_REPARSE_TAG_SYMLINK) == IO_REPARSE_TAG_SYMLINK; | 5707 | && (wfdw.dwReserved0 & IO_REPARSE_TAG_SYMLINK) == IO_REPARSE_TAG_SYMLINK; |
| 5708 | if (attrs_mean_symlink) | ||
| 5709 | attrs_mean_symlink |= (wfdw.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); | ||
| 5687 | } | 5710 | } |
| 5688 | else if (_mbspbrk (filename_a, "?")) | 5711 | else if (_mbspbrk (filename_a, "?")) |
| 5689 | { | 5712 | { |
| @@ -5697,6 +5720,8 @@ is_symlink (const char *filename) | |||
| 5697 | attrs_mean_symlink = | 5720 | attrs_mean_symlink = |
| 5698 | (wfda.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0 | 5721 | (wfda.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0 |
| 5699 | && (wfda.dwReserved0 & IO_REPARSE_TAG_SYMLINK) == IO_REPARSE_TAG_SYMLINK; | 5722 | && (wfda.dwReserved0 & IO_REPARSE_TAG_SYMLINK) == IO_REPARSE_TAG_SYMLINK; |
| 5723 | if (attrs_mean_symlink) | ||
| 5724 | attrs_mean_symlink |= (wfda.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY); | ||
| 5700 | } | 5725 | } |
| 5701 | if (fh == INVALID_HANDLE_VALUE) | 5726 | if (fh == INVALID_HANDLE_VALUE) |
| 5702 | return 0; | 5727 | return 0; |
diff --git a/src/xdisp.c b/src/xdisp.c index 9ff9f6ce399..82931b88e1c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -6787,6 +6787,18 @@ merge_glyphless_glyph_face (struct it *it) | |||
| 6787 | return face_id; | 6787 | return face_id; |
| 6788 | } | 6788 | } |
| 6789 | 6789 | ||
| 6790 | /* Forget the `escape-glyph' and `glyphless-char' faces. This should | ||
| 6791 | be called before redisplaying windows, and when the frame's face | ||
| 6792 | cache is freed. */ | ||
| 6793 | void | ||
| 6794 | forget_escape_and_glyphless_faces (void) | ||
| 6795 | { | ||
| 6796 | last_escape_glyph_frame = NULL; | ||
| 6797 | last_escape_glyph_face_id = (1 << FACE_ID_BITS); | ||
| 6798 | last_glyphless_glyph_frame = NULL; | ||
| 6799 | last_glyphless_glyph_face_id = (1 << FACE_ID_BITS); | ||
| 6800 | } | ||
| 6801 | |||
| 6790 | /* Load IT's display element fields with information about the next | 6802 | /* Load IT's display element fields with information about the next |
| 6791 | display element from the current position of IT. Value is false if | 6803 | display element from the current position of IT. Value is false if |
| 6792 | end of buffer (or C string) is reached. */ | 6804 | end of buffer (or C string) is reached. */ |
| @@ -10673,6 +10685,11 @@ display_echo_area_1 (ptrdiff_t a1, Lisp_Object a2) | |||
| 10673 | Lisp_Object window; | 10685 | Lisp_Object window; |
| 10674 | struct text_pos start; | 10686 | struct text_pos start; |
| 10675 | 10687 | ||
| 10688 | /* We are about to enter redisplay without going through | ||
| 10689 | redisplay_internal, so we need to forget these faces by hand | ||
| 10690 | here. */ | ||
| 10691 | forget_escape_and_glyphless_faces (); | ||
| 10692 | |||
| 10676 | /* Do this before displaying, so that we have a large enough glyph | 10693 | /* Do this before displaying, so that we have a large enough glyph |
| 10677 | matrix for the display. If we can't get enough space for the | 10694 | matrix for the display. If we can't get enough space for the |
| 10678 | whole text, display the last N lines. That works by setting w->start. */ | 10695 | whole text, display the last N lines. That works by setting w->start. */ |
| @@ -13326,10 +13343,7 @@ redisplay_internal (void) | |||
| 13326 | sw = w; | 13343 | sw = w; |
| 13327 | 13344 | ||
| 13328 | pending = false; | 13345 | pending = false; |
| 13329 | last_escape_glyph_frame = NULL; | 13346 | forget_escape_and_glyphless_faces (); |
| 13330 | last_escape_glyph_face_id = (1 << FACE_ID_BITS); | ||
| 13331 | last_glyphless_glyph_frame = NULL; | ||
| 13332 | last_glyphless_glyph_face_id = (1 << FACE_ID_BITS); | ||
| 13333 | 13347 | ||
| 13334 | /* If face_change, init_iterator will free all realized faces, which | 13348 | /* If face_change, init_iterator will free all realized faces, which |
| 13335 | includes the faces referenced from current matrices. So, we | 13349 | includes the faces referenced from current matrices. So, we |
diff --git a/src/xfaces.c b/src/xfaces.c index d89adca8c57..03032496381 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -4173,6 +4173,8 @@ free_realized_faces (struct face_cache *c) | |||
| 4173 | c->faces_by_id[i] = NULL; | 4173 | c->faces_by_id[i] = NULL; |
| 4174 | } | 4174 | } |
| 4175 | 4175 | ||
| 4176 | /* Forget the escape-glyph and glyphless-char faces. */ | ||
| 4177 | forget_escape_and_glyphless_faces (); | ||
| 4176 | c->used = 0; | 4178 | c->used = 0; |
| 4177 | size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets; | 4179 | size = FACE_CACHE_BUCKETS_SIZE * sizeof *c->buckets; |
| 4178 | memset (c->buckets, 0, size); | 4180 | memset (c->buckets, 0, size); |