aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2021-03-19 15:28:00 +0100
committerAndrea Corallo2021-03-19 15:28:00 +0100
commit6ca6c71cd0bf8fc970d9b1477ea61a670469f672 (patch)
tree98876b3f80794a8aad43293fbe005102e26e94f9 /src
parentb3ad62f8a35617366886be2a86e8641282824adf (diff)
parent3af2cee64b86e4ce59adb8e8720d92db35039cbc (diff)
downloademacs-6ca6c71cd0bf8fc970d9b1477ea61a670469f672.tar.gz
emacs-6ca6c71cd0bf8fc970d9b1477ea61a670469f672.zip
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c28
-rw-r--r--src/editfns.c6
-rw-r--r--src/frame.c4
-rw-r--r--src/gtkutil.c22
-rw-r--r--src/image.c3
-rw-r--r--src/keyboard.c9
6 files changed, 56 insertions, 16 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index b3e4587250f..f613f7b6568 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3588,6 +3588,7 @@ update_window (struct window *w, bool force_p)
3588 int yb; 3588 int yb;
3589 bool changed_p = 0, mouse_face_overwritten_p = 0; 3589 bool changed_p = 0, mouse_face_overwritten_p = 0;
3590 int n_updated = 0; 3590 int n_updated = 0;
3591 bool invisible_rows_marked = false;
3591 3592
3592#ifdef HAVE_WINDOW_SYSTEM 3593#ifdef HAVE_WINDOW_SYSTEM
3593 gui_update_window_begin (w); 3594 gui_update_window_begin (w);
@@ -3679,13 +3680,36 @@ update_window (struct window *w, bool force_p)
3679 tempted to optimize redisplay based on lines displayed 3680 tempted to optimize redisplay based on lines displayed
3680 in the first redisplay. */ 3681 in the first redisplay. */
3681 if (MATRIX_ROW_BOTTOM_Y (row) >= yb) 3682 if (MATRIX_ROW_BOTTOM_Y (row) >= yb)
3682 for (i = vpos + 1; i < w->current_matrix->nrows - 1; ++i) 3683 {
3683 SET_MATRIX_ROW_ENABLED_P (w->current_matrix, i, false); 3684 for (i = vpos + 1; i < w->current_matrix->nrows - 1; ++i)
3685 SET_MATRIX_ROW_ENABLED_P (w->current_matrix, i, false);
3686 invisible_rows_marked = true;
3687 }
3684 } 3688 }
3685 3689
3686 /* Was display preempted? */ 3690 /* Was display preempted? */
3687 paused_p = row < end; 3691 paused_p = row < end;
3688 3692
3693 if (!paused_p && !invisible_rows_marked)
3694 {
3695 /* If we didn't mark the invisible rows in the current
3696 matrix as invalid above, do that now. This can happen if
3697 scrolling_window updates the last visible rows of the
3698 current matrix, in which case the above loop doesn't get
3699 to examine the last visible row. */
3700 int i;
3701 for (i = 0; i < w->current_matrix->nrows - 1; ++i)
3702 {
3703 struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, i);
3704 if (current_row->enabled_p
3705 && MATRIX_ROW_BOTTOM_Y (current_row) >= yb)
3706 {
3707 for (++i ; i < w->current_matrix->nrows - 1; ++i)
3708 SET_MATRIX_ROW_ENABLED_P (w->current_matrix, i, false);
3709 }
3710 }
3711 }
3712
3689 set_cursor: 3713 set_cursor:
3690 3714
3691 /* Update the tab line after scrolling because a new tab 3715 /* Update the tab line after scrolling because a new tab
diff --git a/src/editfns.c b/src/editfns.c
index fb20fc96550..bc6553a7d2c 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -1697,7 +1697,11 @@ they can be in either order. */)
1697DEFUN ("buffer-string", Fbuffer_string, Sbuffer_string, 0, 0, 0, 1697DEFUN ("buffer-string", Fbuffer_string, Sbuffer_string, 0, 0, 0,
1698 doc: /* Return the contents of the current buffer as a string. 1698 doc: /* Return the contents of the current buffer as a string.
1699If narrowing is in effect, this function returns only the visible part 1699If narrowing is in effect, this function returns only the visible part
1700of the buffer. */) 1700of the buffer.
1701
1702This function copies the text properties of that part of the buffer
1703into the result string; if you don’t want the text properties,
1704use `buffer-substring-no-properties' instead. */)
1701 (void) 1705 (void)
1702{ 1706{
1703 return make_buffer_string_both (BEGV, BEGV_BYTE, ZV, ZV_BYTE, 1); 1707 return make_buffer_string_both (BEGV, BEGV_BYTE, ZV, ZV_BYTE, 1);
diff --git a/src/frame.c b/src/frame.c
index a62347c1fb2..cfdf3b61938 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -3595,7 +3595,7 @@ check_frame_pixels (Lisp_Object size, Lisp_Object pixelwise, int item_size)
3595} 3595}
3596 3596
3597DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 4, 3597DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 4,
3598 "(list (selected-frame) (prefix-numeric-value current-prefix-arg))", 3598 "(set-frame-property--interactive \"Frame height: \" (frame-height))",
3599 doc: /* Set text height of frame FRAME to HEIGHT lines. 3599 doc: /* Set text height of frame FRAME to HEIGHT lines.
3600Optional third arg PRETEND non-nil means that redisplay should use 3600Optional third arg PRETEND non-nil means that redisplay should use
3601HEIGHT lines but that the idea of the actual height of the frame should 3601HEIGHT lines but that the idea of the actual height of the frame should
@@ -3620,7 +3620,7 @@ If FRAME is nil, it defaults to the selected frame. */)
3620} 3620}
3621 3621
3622DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 4, 3622DEFUN ("set-frame-width", Fset_frame_width, Sset_frame_width, 2, 4,
3623 "(list (selected-frame) (prefix-numeric-value current-prefix-arg))", 3623 "(set-frame-property--interactive \"Frame width: \" (frame-width))",
3624 doc: /* Set text width of frame FRAME to WIDTH columns. 3624 doc: /* Set text width of frame FRAME to WIDTH columns.
3625Optional third arg PRETEND non-nil means that redisplay should use WIDTH 3625Optional third arg PRETEND non-nil means that redisplay should use WIDTH
3626columns but that the idea of the actual width of the frame should not 3626columns but that the idea of the actual width of the frame should not
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 11e59b9fae5..4634c35dd4c 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -5014,11 +5014,10 @@ update_frame_tool_bar (struct frame *f)
5014 GtkWidget *wbutton = NULL; 5014 GtkWidget *wbutton = NULL;
5015 Lisp_Object specified_file; 5015 Lisp_Object specified_file;
5016 bool vert_only = ! NILP (PROP (TOOL_BAR_ITEM_VERT_ONLY)); 5016 bool vert_only = ! NILP (PROP (TOOL_BAR_ITEM_VERT_ONLY));
5017 const char *label 5017 Lisp_Object label
5018 = (EQ (style, Qimage) || (vert_only && horiz)) ? NULL 5018 = (EQ (style, Qimage) || (vert_only && horiz))
5019 : STRINGP (PROP (TOOL_BAR_ITEM_LABEL)) 5019 ? Qnil
5020 ? SSDATA (PROP (TOOL_BAR_ITEM_LABEL)) 5020 : PROP (TOOL_BAR_ITEM_LABEL);
5021 : "";
5022 5021
5023 ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), j); 5022 ti = gtk_toolbar_get_nth_item (GTK_TOOLBAR (wtoolbar), j);
5024 5023
@@ -5131,8 +5130,11 @@ update_frame_tool_bar (struct frame *f)
5131 5130
5132 /* If there is an existing widget, check if it's stale; if so, 5131 /* If there is an existing widget, check if it's stale; if so,
5133 remove it and make a new tool item from scratch. */ 5132 remove it and make a new tool item from scratch. */
5134 if (ti && xg_tool_item_stale_p (wbutton, stock_name, icon_name, 5133 if (ti && xg_tool_item_stale_p (wbutton, stock_name, icon_name, img,
5135 img, label, horiz)) 5134 NILP (label)
5135 ? NULL
5136 : STRINGP (label) ? SSDATA (label) : "",
5137 horiz))
5136 { 5138 {
5137 gtk_container_remove (GTK_CONTAINER (wtoolbar), 5139 gtk_container_remove (GTK_CONTAINER (wtoolbar),
5138 GTK_WIDGET (ti)); 5140 GTK_WIDGET (ti));
@@ -5189,7 +5191,11 @@ update_frame_tool_bar (struct frame *f)
5189#else 5191#else
5190 if (w) gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin); 5192 if (w) gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
5191#endif 5193#endif
5192 ti = xg_make_tool_item (f, w, &wbutton, label, i, horiz, text_image); 5194 ti = xg_make_tool_item (f, w, &wbutton,
5195 NILP (label)
5196 ? NULL
5197 : STRINGP (label) ? SSDATA (label) : "",
5198 i, horiz, text_image);
5193 gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j); 5199 gtk_toolbar_insert (GTK_TOOLBAR (wtoolbar), ti, j);
5194 } 5200 }
5195 5201
diff --git a/src/image.c b/src/image.c
index 2f85e3035e8..576956d4dbb 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3392,6 +3392,7 @@ static int
3392xbm_scan (char **s, char *end, char *sval, int *ival) 3392xbm_scan (char **s, char *end, char *sval, int *ival)
3393{ 3393{
3394 unsigned char c UNINIT; 3394 unsigned char c UNINIT;
3395 char *sval_end = sval + BUFSIZ;
3395 3396
3396 loop: 3397 loop:
3397 3398
@@ -3451,7 +3452,7 @@ xbm_scan (char **s, char *end, char *sval, int *ival)
3451 else if (c_isalpha (c) || c == '_') 3452 else if (c_isalpha (c) || c == '_')
3452 { 3453 {
3453 *sval++ = c; 3454 *sval++ = c;
3454 while (*s < end 3455 while (*s < end && sval < sval_end
3455 && (c = *(*s)++, (c_isalnum (c) || c == '_'))) 3456 && (c = *(*s)++, (c_isalnum (c) || c == '_')))
3456 *sval++ = c; 3457 *sval++ = c;
3457 *sval = 0; 3458 *sval = 0;
diff --git a/src/keyboard.c b/src/keyboard.c
index 9ee4c4f6d68..266ebaa5fdf 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3614,6 +3614,12 @@ kbd_buffer_store_buffered_event (union buffered_input_event *event,
3614 case ICONIFY_EVENT: ignore_event = Qiconify_frame; break; 3614 case ICONIFY_EVENT: ignore_event = Qiconify_frame; break;
3615 case DEICONIFY_EVENT: ignore_event = Qmake_frame_visible; break; 3615 case DEICONIFY_EVENT: ignore_event = Qmake_frame_visible; break;
3616 case SELECTION_REQUEST_EVENT: ignore_event = Qselection_request; break; 3616 case SELECTION_REQUEST_EVENT: ignore_event = Qselection_request; break;
3617#ifdef USE_FILE_NOTIFY
3618 case FILE_NOTIFY_EVENT: ignore_event = Qfile_notify; break;
3619#endif
3620#ifdef HAVE_DBUS
3621 case DBUS_EVENT: ignore_event = Qdbus_event; break;
3622#endif
3617 default: ignore_event = Qnil; break; 3623 default: ignore_event = Qnil; break;
3618 } 3624 }
3619 3625
@@ -6679,6 +6685,7 @@ parse_solitary_modifier (Lisp_Object symbol)
6679 case 'c': 6685 case 'c':
6680 MULTI_LETTER_MOD (ctrl_modifier, "ctrl", 4); 6686 MULTI_LETTER_MOD (ctrl_modifier, "ctrl", 4);
6681 MULTI_LETTER_MOD (ctrl_modifier, "control", 7); 6687 MULTI_LETTER_MOD (ctrl_modifier, "control", 7);
6688 MULTI_LETTER_MOD (click_modifier, "click", 5);
6682 break; 6689 break;
6683 6690
6684 case 'H': 6691 case 'H':
@@ -12380,8 +12387,6 @@ syms_of_keyboard_for_pdumper (void)
12380 eassert (initial_kboard == NULL); 12387 eassert (initial_kboard == NULL);
12381 initial_kboard = allocate_kboard (Qt); 12388 initial_kboard = allocate_kboard (Qt);
12382 12389
12383 Vwhile_no_input_ignore_events = Qnil;
12384
12385 inhibit_record_char = false; 12390 inhibit_record_char = false;
12386} 12391}
12387 12392