aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2021-10-19 07:50:35 -0700
committerGlenn Morris2021-10-19 07:50:35 -0700
commit4d4b4017591c7fb4e37b7d1e0d6b2db565a56c66 (patch)
tree132fc64cbb5da9e0f5d0600edfcf189dd86e783d /src
parent41c262af322eab6c35a94d747dcaf776b0975f35 (diff)
parentd742cc3c204ba0adeb9600d236a0e454e35a42ff (diff)
downloademacs-4d4b4017591c7fb4e37b7d1e0d6b2db565a56c66.tar.gz
emacs-4d4b4017591c7fb4e37b7d1e0d6b2db565a56c66.zip
Merge from origin/emacs-28
d742cc3c20 (origin/emacs-28) ; etc/NEWS: Fix typos 28db29590f * admin/notes/unicode: Refer to Unicode's emoji-style.txt 9bd2f59db6 Handle VS-16 correctly for non-emoji codepoints e55e2d4a11 ; * etc/NEWS: Minor copyedit about 'repeat-mode'. 380981ddb5 Adjust bug-reference-bug-regexp default values to match on... c1cf95a0e1 ; * doc/emacs/windows.texi: Doc fix. 98eb6d783a Fix a typo in emacs-lisp-intro.texi f5b8f626e3 Fix some Tramp problems fc988a7113 Adapt Tramp manual 0c241043a8 Further fixes to Elisp manual 8e8a920246 * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): ... 5a3242301d Rename tab-bar-drag-maybe to tab-bar--dragging-in-progress bb4209a5a5 Fix xref elisp identifier namespace mistake # Conflicts: # etc/NEWS
Diffstat (limited to 'src')
-rw-r--r--src/composite.c11
-rw-r--r--src/font.c20
-rw-r--r--src/xdisp.c6
3 files changed, 32 insertions, 5 deletions
diff --git a/src/composite.c b/src/composite.c
index f456e7a835d..c170805d9dd 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -2124,6 +2124,17 @@ GSTRING, or modify GSTRING itself and return it.
2124See also the documentation of `auto-composition-mode'. */); 2124See also the documentation of `auto-composition-mode'. */);
2125 Vcomposition_function_table = Fmake_char_table (Qnil, Qnil); 2125 Vcomposition_function_table = Fmake_char_table (Qnil, Qnil);
2126 2126
2127 DEFVAR_LISP ("auto-composition-emoji-eligible-codepoints", Vauto_composition_emoji_eligible_codepoints,
2128 doc: /* List of codepoints for which auto-composition will check for an emoji font.
2129
2130These are codepoints which have Emoji_Presentation = No, and thus by
2131default are not displayed as emoji. In certain circumstances, such as
2132when followed by U+FE0F (VS-16) the emoji font should be used for
2133them anyway.
2134
2135This list is auto-generated, you should not need to modify it. */);
2136 Vauto_composition_emoji_eligible_codepoints = Qnil;
2137
2127 defsubr (&Scompose_region_internal); 2138 defsubr (&Scompose_region_internal);
2128 defsubr (&Scompose_string_internal); 2139 defsubr (&Scompose_string_internal);
2129 defsubr (&Sfind_composition_internal); 2140 defsubr (&Sfind_composition_internal);
diff --git a/src/font.c b/src/font.c
index 83f0f8296ad..6cd4a6b5c11 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3860,6 +3860,23 @@ font_at (int c, ptrdiff_t pos, struct face *face, struct window *w,
3860 3860
3861#ifdef HAVE_WINDOW_SYSTEM 3861#ifdef HAVE_WINDOW_SYSTEM
3862 3862
3863/* Check if CH is a codepoint for which we should attempt to use the
3864 emoji font, even if the codepoint itself has Emoji_Presentation =
3865 No. Vauto_composition_emoji_eligible_codepoints is filled in for
3866 us by admin/unidata/emoji-zwj.awk. */
3867static bool
3868codepoint_is_emoji_eligible (int ch)
3869{
3870 if (EQ (CHAR_TABLE_REF (Vchar_script_table, ch), Qemoji))
3871 return true;
3872
3873 if (! NILP (Fmemq (make_fixnum (ch),
3874 Vauto_composition_emoji_eligible_codepoints)))
3875 return true;
3876
3877 return false;
3878}
3879
3863/* Check how many characters after character/byte position POS/POS_BYTE 3880/* Check how many characters after character/byte position POS/POS_BYTE
3864 (at most to *LIMIT) can be displayed by the same font in the window W. 3881 (at most to *LIMIT) can be displayed by the same font in the window W.
3865 FACE, if non-NULL, is the face selected for the character at POS. 3882 FACE, if non-NULL, is the face selected for the character at POS.
@@ -3907,8 +3924,7 @@ font_range (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t *limit,
3907 /* If the composition was triggered by an emoji, use a character 3924 /* If the composition was triggered by an emoji, use a character
3908 from 'script-representative-chars', rather than the first 3925 from 'script-representative-chars', rather than the first
3909 character in the string, to determine the font to use. */ 3926 character in the string, to determine the font to use. */
3910 if (EQ (CHAR_TABLE_REF (Vchar_script_table, ch), 3927 if (codepoint_is_emoji_eligible (ch))
3911 Qemoji))
3912 { 3928 {
3913 Lisp_Object val = assq_no_quit (Qemoji, Vscript_representative_chars); 3929 Lisp_Object val = assq_no_quit (Qemoji, Vscript_representative_chars);
3914 if (CONSP (val)) 3930 if (CONSP (val))
diff --git a/src/xdisp.c b/src/xdisp.c
index 578458bd248..738f22abedd 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -33780,7 +33780,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
33780 if (EQ (window, f->tab_bar_window)) 33780 if (EQ (window, f->tab_bar_window))
33781 { 33781 {
33782 note_tab_bar_highlight (f, x, y); 33782 note_tab_bar_highlight (f, x, y);
33783 if (tab_bar_drag_maybe) 33783 if (tab_bar__dragging_in_progress)
33784 { 33784 {
33785 cursor = FRAME_OUTPUT_DATA (f)->hand_cursor; 33785 cursor = FRAME_OUTPUT_DATA (f)->hand_cursor;
33786 goto set_cursor; 33786 goto set_cursor;
@@ -35916,9 +35916,9 @@ When nil, mouse-movement events will not be generated as long as the
35916mouse stays within the extent of a single glyph (except for images). */); 35916mouse stays within the extent of a single glyph (except for images). */);
35917 mouse_fine_grained_tracking = false; 35917 mouse_fine_grained_tracking = false;
35918 35918
35919 DEFVAR_BOOL ("tab-bar-drag-maybe", tab_bar_drag_maybe, 35919 DEFVAR_BOOL ("tab-bar--dragging-in-progress", tab_bar__dragging_in_progress,
35920 doc: /* Non-nil when maybe dragging tab bar item. */); 35920 doc: /* Non-nil when maybe dragging tab bar item. */);
35921 tab_bar_drag_maybe = false; 35921 tab_bar__dragging_in_progress = false;
35922 35922
35923 DEFVAR_BOOL ("redisplay-skip-initial-frame", redisplay_skip_initial_frame, 35923 DEFVAR_BOOL ("redisplay-skip-initial-frame", redisplay_skip_initial_frame,
35924 doc: /* Non-nil to skip redisplay in initial frame. 35924 doc: /* Non-nil to skip redisplay in initial frame.