diff --git a/.gitignore b/.gitignore index c969dcadf96..bf7e9349813 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 72ae7697677..bf7088d8db1 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 5abd668db89..e94b42230be 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 479fccb45e0..89dd32ad0fb 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 2344fe70601..e49cc433308 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]