[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master be17ee7 4/7: Merge from origin/emacs-27
From: |
Glenn Morris |
Subject: |
master be17ee7 4/7: Merge from origin/emacs-27 |
Date: |
Mon, 23 Nov 2020 12:42:43 -0500 (EST) |
branch: master
commit be17ee78c659d0ddded4c536e10777cac2852884
Merge: a8c513b 86cbc9d
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>
Merge from origin/emacs-27
86cbc9d216 Make ignoring modifiers on IME input optional
32b97bb9e0 Ignore modifiers when processing WM_IME_CHAR messages
f641ef1a07 Improve documentation of 'font-spec'
# Conflicts:
# etc/NEWS
---
doc/lispref/display.texi | 14 ++++++++++++++
etc/NEWS.27 | 9 ++++++++-
src/font.c | 17 +++++++++++++++++
src/w32fns.c | 14 +++++++++++++-
4 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 6fc8587..f86baf5 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -3754,6 +3754,20 @@ Additional typographic style information for the font,
such as
The charset registry and encoding of the font, such as
@samp{iso8859-1}. The value should be a string or a symbol.
+@item :dpi
+The resolution in dots per inch for which the font is designed. The
+value must be a non-negative number.
+
+@item :spacing
+The spacing of the font: proportional, dual, mono, or charcell. The
+value should be either an integer (0 for proportional, 90 for dual,
+100 for mono, 110 for charcell) or a one-letter symbol (one of
+@code{P}, @code{D}, @code{M}, or @code{C}).
+
+@item :avgwidth
+The average width of the font in 1/10 pixel units. The value should
+be a non-negative number.
+
@item :script
The script that the font must support (a symbol).
diff --git a/etc/NEWS.27 b/etc/NEWS.27
index 61f9c0e..4855cd3 100644
--- a/etc/NEWS.27
+++ b/etc/NEWS.27
@@ -48,7 +48,7 @@ skip leading or trailing empty lines of the buffer.
** Tramp
-*** The user option 'tramp-completion-reread-directory-timeout' is made
obsolete.
+*** The user option 'tramp-completion-reread-directory-timeout' is now
obsolete.
* New Modes and Packages in Emacs 27.2
@@ -62,6 +62,13 @@ skip leading or trailing empty lines of the buffer.
* Changes in Emacs 27.2 on Non-Free Operating Systems
+** Emacs now ignores modifier keys when IME input is used.
+By default, pressing Ctrl, Shift, and Alt keys while using IME input
+will no longer apply the modifiers to the produced characters, as
+there are IMEs which use keys with modifiers to input some
+characters. Customize the variable 'w32-ignore-modifiers-on-IME-input'
+to nil to get back the old behavior.
+
* Installation Changes in Emacs 27.1
diff --git a/src/font.c b/src/font.c
index 8dbf8cb..5f9db2e 100644
--- a/src/font.c
+++ b/src/font.c
@@ -3945,6 +3945,23 @@ VALUE must be a non-negative integer or a floating point
number
specifying the font size. It specifies the font size in pixels (if
VALUE is an integer), or in points (if VALUE is a float).
+`:dpi'
+
+VALUE must be a non-negative number that specifies the resolution
+(dot per inch) for which the font is designed.
+
+`:spacing'
+
+VALUE specifies the spacing of the font: mono, proportional, charcell,
+or dual. It can be either a number (0 for proportional, 90 for dual,
+100 for mono, 110 for charcell) or a 1-letter symbol: `P', `D', `M',
+or `C' (lower-case variants are also accepted).
+
+`:avgwidth'
+
+VALUE must be a non-negative integer specifying the average width of
+the font in 1/10 pixel units.
+
`:name'
VALUE must be a string of XLFD-style or fontconfig-style font name.
diff --git a/src/w32fns.c b/src/w32fns.c
index 7bb9689..a840f0e 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -4448,7 +4448,10 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM
lParam)
int size, i;
W32Msg wmsg;
HIMC context = get_ime_context_fn (hwnd);
- wmsg.dwModifiers = w32_get_key_modifiers (wParam, lParam);
+ wmsg.dwModifiers =
+ w32_ignore_modifiers_on_IME_input
+ ? 0
+ : w32_get_key_modifiers (wParam, lParam);
/* Get buffer size. */
size = get_composition_string_fn (context, GCS_RESULTSTR, NULL, 0);
buffer = alloca (size);
@@ -10614,6 +10617,15 @@ tip frame. */);
doc: /* Non-nil means don't display the abort dialog when
aborting. */);
w32_disable_abort_dialog = 0;
+ DEFVAR_BOOL ("w32-ignore-modifiers-on-IME-input",
+ w32_ignore_modifiers_on_IME_input,
+ doc: /* Whether to ignore modifier keys when processing input
with IME.
+Some MS-Windows input methods use modifier keys such as Ctrl or Alt to input
+characters, in which case applying the modifiers will change the input.
+The default value of this variable is therefore t, to ignore modifier
+keys when IME input is received. */);
+ w32_ignore_modifiers_on_IME_input = true;
+
#if 0 /* TODO: Port to W32 */
defsubr (&Sx_change_window_property);
defsubr (&Sx_delete_window_property);
- master updated (c3edaa5 -> a19b29d), Glenn Morris, 2020/11/23
- master a228b9d 2/7: Merge from origin/emacs-27, Glenn Morris, 2020/11/23
- master f583cae 1/7: ; Merge from origin/emacs-27, Glenn Morris, 2020/11/23
- master be17ee7 4/7: Merge from origin/emacs-27,
Glenn Morris <=
- master 593c262 6/7: Merge from origin/emacs-27, Glenn Morris, 2020/11/23
- master a8c513b 3/7: ; Merge from origin/emacs-27, Glenn Morris, 2020/11/23
- master a19b29d 7/7: ; Merge from origin/emacs-27, Glenn Morris, 2020/11/23
- master 3401251 5/7: ; Merge from origin/emacs-27, Glenn Morris, 2020/11/23