[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a280a6d 1/3: Merge from origin/emacs-27
From: |
Glenn Morris |
Subject: |
master a280a6d 1/3: Merge from origin/emacs-27 |
Date: |
Mon, 16 Nov 2020 12:05:40 -0500 (EST) |
branch: master
commit a280a6d7caa715d911f3041fe074bf36b3a4df8c
Merge: 82d0b88 19da602
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>
Merge from origin/emacs-27
19da602991 Fix input method translation near read-only text
5aabf2cc7f Fix display of truncated R2L lines on TTY frames
daff3bda10 Avoid crashes when a reversed glyph row starts with a comp...
b697bb91a1 ; * .gitignore: src/fingerprint.c not generated since 2019...
---
.gitignore | 1 -
doc/emacs/mule.texi | 6 ++++++
lisp/international/quail.el | 3 ++-
src/dispnew.c | 10 +++++++---
src/xdisp.c | 18 +++++++++---------
5 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/.gitignore b/.gitignore
index c969dca..bf7e934 100644
--- a/.gitignore
+++ b/.gitignore
@@ -198,7 +198,6 @@ src/bootstrap-emacs
src/emacs
src/emacs-[0-9]*
src/temacs
-src/fingerprint.c
src/dmpstruct.h
src/*.pdmp
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index 72ae769..bf7088d 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -563,6 +563,12 @@ method's keys by defining key bindings in the keymap
returned by the
function @code{quail-translation-keymap}, using @code{define-key}.
@xref{Init Rebinding}.
+ Input methods are inhibited when the text in the buffer is read-only
+for some reason. This is so single-character key bindings work in
+modes that make buffer text or parts of it read-only, such as
+@code{read-only-mode} and @code{image-mode}, even when an input method
+is active.
+
Another facility for typing characters not on your keyboard is by
using @kbd{C-x 8 @key{RET}} (@code{insert-char}) to insert a single
character based on its Unicode name or code-point; see @ref{Inserting
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 5abd668..e94b422 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -1330,7 +1330,8 @@ If STR has `advice' text property, append the following
special event:
(defun quail-input-method (key)
(if (or (and (or buffer-read-only
- (get-char-property (point) 'read-only))
+ (and (get-char-property (point) 'read-only)
+ (get-char-property (point) 'front-sticky)))
(not (or inhibit-read-only
(get-char-property (point) 'inhibit-read-only))))
(and overriding-terminal-local-map
diff --git a/src/dispnew.c b/src/dispnew.c
index 479fccb..89dd32a 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -2558,11 +2558,15 @@ build_frame_matrix_from_leaf_window (struct
glyph_matrix *frame_matrix, struct w
the corresponding frame row to be updated. */
frame_row->enabled_p = true;
- /* Maybe insert a vertical border between horizontally adjacent
+ /* Maybe insert a vertical border between horizontally adjacent
windows. */
- if (GLYPH_CHAR (right_border_glyph) != 0)
+ if (GLYPH_CHAR (right_border_glyph) != 0)
{
- struct glyph *border = window_row->glyphs[LAST_AREA] - 1;
+ struct glyph *border = window_row->glyphs[LAST_AREA] - 1;
+ /* It's a subtle bug if we are overwriting some non-char
+ glyph with the vertical border glyph. */
+ eassert (border->type == CHAR_GLYPH);
+ border->type = CHAR_GLYPH;
SET_CHAR_GLYPH_FROM_GLYPH (*border, right_border_glyph);
}
diff --git a/src/xdisp.c b/src/xdisp.c
index 2344fe7..e49cc43 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -22272,14 +22272,15 @@ extend_face_to_end_of_line (struct it *it)
default_face->id : face->id);
/* Display fill-column indicator if needed. */
- /* We need to subtract 1 to the indicator_column here because we
- will add the indicator IN the column indicator number, not
- after it. We compare the variable it->current_x before
- producing the glyph. When FRAME_WINDOW_P we subtract
- CHAR_WIDTH calculating STRETCH_WIDTH for the same reason. */
- const int indicator_column =
- fill_column_indicator_column (it, 1) - 1;
- do
+ const int indicator_column = fill_column_indicator_column (it, 1);
+
+ /* Make sure our idea of current_x is in sync with the glyphs
+ actually in the glyph row. They might differ because
+ append_space_for_newline can insert one glyph without
+ updating current_x. */
+ it->current_x = it->glyph_row->used[TEXT_AREA];
+
+ while (it->current_x <= it->last_visible_x)
{
if (it->current_x != indicator_column)
PRODUCE_GLYPHS (it);
@@ -22297,7 +22298,6 @@ extend_face_to_end_of_line (struct it *it)
it->c = it->char_to_display = ' ';
}
}
- while (it->current_x <= it->last_visible_x);
if (WINDOW_RIGHT_MARGIN_WIDTH (it->w) > 0
&& (it->glyph_row->used[RIGHT_MARGIN_AREA]