commit 0ac626f1d4eba84bd988a16991178ff25a07ece5 (HEAD, refs/remotes/origin/master) Author: Stefan Kangas Date: Tue Nov 15 08:45:02 2022 +0100 Use substitute-command-keys for buffer-menu help * lisp/buff-menu.el (buffer-menu--display-help): New function. (buffer-menu, buffer-menu-other-window): Fontify key bindings using substitute-command-keys. (Buffer-menu-delete): Advertise key binding as 'd'. (Buffer-menu-this-window): Advertise key binding as 'f'. diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index abf152f058..34221ee440 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -1,7 +1,6 @@ ;;; buff-menu.el --- Interface for viewing and manipulating buffers -*- lexical-binding: t -*- -;; Copyright (C) 1985-1987, 1993-1995, 2000-2022 Free Software -;; Foundation, Inc. +;; Copyright (C) 1985-2022 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Keywords: convenience @@ -133,10 +132,12 @@ commands.") "M-s a C-s" #'Buffer-menu-isearch-buffers "M-s a C-M-s" #'Buffer-menu-isearch-buffers-regexp "M-s a C-o" #'Buffer-menu-multi-occur - "" #'Buffer-menu-mouse-select "" 'mouse-face) +(put 'Buffer-menu-delete :advertised-binding "d") +(put 'Buffer-menu-this-window :advertised-binding "f") + (easy-menu-define Buffer-menu-mode-menu Buffer-menu-mode-map "Menu for `Buffer-menu-mode' buffers." '("Buffer-Menu" @@ -236,6 +237,26 @@ In Buffer Menu mode, the following commands are defined: (lambda (&optional _noconfirm) 'fast)) (add-hook 'tabulated-list-revert-hook 'list-buffers--refresh nil t)) +(defun buffer-menu--display-help () + (message "%s" + (substitute-command-keys + (concat + "Commands: " + "\\" + "\\[Buffer-menu-delete], " + "\\[Buffer-menu-save], " + "\\[Buffer-menu-execute], " + "\\[Buffer-menu-unmark]; " + "\\[Buffer-menu-this-window], " + "\\[Buffer-menu-other-window], " + "\\[Buffer-menu-1-window], " + "\\[Buffer-menu-2-window], " + "\\[Buffer-menu-mark], " + "\\[Buffer-menu-select]; " + "\\[Buffer-menu-not-modified], " + "\\[Buffer-menu-toggle-read-only]; " + "\\[quit-window] to quit; \\[describe-mode] for help")))) + (defun buffer-menu (&optional arg) "Switch to the Buffer Menu. By default, the Buffer Menu lists all buffers except those whose @@ -261,8 +282,7 @@ the `Buffer-menu-name-width', `Buffer-menu-size-width' and `Buffer-menu-mode-width' variables." (interactive "P") (switch-to-buffer (list-buffers-noselect arg)) - (message - "Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for help.")) + (buffer-menu--display-help)) (defun buffer-menu-other-window (&optional arg) "Display the Buffer Menu in another window. @@ -273,8 +293,7 @@ with a space (which are for internal use). With prefix argument ARG, show only buffers that are visiting files." (interactive "P") (switch-to-buffer-other-window (list-buffers-noselect arg)) - (message - "Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for help.")) + (buffer-menu--display-help)) ;;;###autoload (defun list-buffers (&optional arg) commit 222c2970323e72c174f7b47201863ec9092e9595 Author: Stefan Kangas Date: Tue Nov 15 05:09:10 2022 +0100 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index c754e72354..3f36cfbba5 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -10010,7 +10010,7 @@ If ERC is already connected to HOST:PORT, simply /join CHANNEL. Otherwise, connect to HOST:PORT as USER and /join CHANNEL. (fn HOST PORT CHANNEL USER PASSWORD)") -(register-definition-prefixes "erc" '("define-erc-module" "erc-")) +(register-definition-prefixes "erc" '("erc-")) ;;; Generated autoloads from erc/erc-autoaway.el @@ -10032,6 +10032,11 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL. (register-definition-prefixes "erc-capab" '("erc-capab-identify-")) + +;;; Generated autoloads from erc/erc-common.el + +(register-definition-prefixes "erc-common" '("define-erc-module" "erc-")) + ;;; Generated autoloads from erc/erc-compat.el @@ -10930,6 +10935,23 @@ Edit the hotlist of directory servers in a specialized buffer." t) (register-definition-prefixes "eudcb-bbdb" '("eudc-bbdb-")) + +;;; Generated autoloads from net/eudcb-ecomplete.el + +(autoload 'eudc-ecomplete-query-internal "eudcb-ecomplete" "\ +Query `ecomplete' with QUERY. +QUERY is a list of cons cells (ATTR . VALUE). Since `ecomplete' +does not provide attributes in the usual sense, the +back-end-specific attribute names in +`eudc-ecomplete-attributes-translation-alist' are used as the +KEY (that is, the \"type\" of match) when looking for matches in +`ecomplete-database'. + +RETURN-ATTRS is ignored. + +(fn QUERY &optional RETURN-ATTRS)") +(register-definition-prefixes "eudcb-ecomplete" '("eudc-ecomplete-attributes-translation-alist")) + ;;; Generated autoloads from net/eudcb-ldap.el @@ -10945,6 +10967,26 @@ Edit the hotlist of directory servers in a specialized buffer." t) (register-definition-prefixes "eudcb-macos-contacts" '("eudc-macos-contacts-")) + +;;; Generated autoloads from net/eudcb-mailabbrev.el + +(autoload 'eudc-mailabbrev-query-internal "eudcb-mailabbrev" "\ +Query `mailabbrev' with QUERY. +QUERY is a list of cons cells (ATTR . VALUE). Since `mailabbrev' +does not provide attributes in the usual sense, only the email, +name, and firstname attributes in the QUERY are considered, and +their values are matched against the alias names in the mailrc +file. When a mailrc alias is a distribution list, that is it +expands to more that one email address, the individual recipient +specifications are formatted using `eudc-rfc5322-make-address', +and returned as a comma-separated list in the email address +attribute. + +RETURN-ATTRS is a list of attributes to return, defaulting to +`eudc-default-return-attributes'. + +(fn QUERY &optional RETURN-ATTRS)") + ;;; Generated autoloads from emacs-lisp/ewoc.el @@ -11280,7 +11322,7 @@ See `text-scale-increase' for more details. (define-key ctl-x-map [(control ?0)] 'text-scale-adjust) (autoload 'text-scale-adjust "face-remap" "\ Adjust the font size in the current buffer by INC steps. -INC may be passed as a numeric prefix argument. +Interactively, INC is the prefix numeric argument, and defaults to 1. The actual adjustment made depends on the final component of the keybinding used to invoke the command, with all modifiers removed: @@ -11290,13 +11332,14 @@ keybinding used to invoke the command, with all modifiers removed: \\`0' Reset the font size to the global default After adjusting, continue to read input events and further adjust -the font size as long as the input event read -(with all modifiers removed) is one of the above characters. +the font size as long as the input event (with all modifiers removed) +is one of the above characters. -Each step scales the height of the default face by the variable -`text-scale-mode-step' (a negative number of steps decreases the -height by the same amount). As a special case, an argument of 0 -will remove any scaling currently active. +Each step scales the height of the default face by the factor that +is the value of `text-scale-mode-step' (a negative number of steps +decreases the height by that factor). As a special case, an argument +of 0 will remove any scaling currently active, thus resetting the +font size to the original value. This command is a special-purpose wrapper around the `text-scale-increase' command which makes repetition convenient @@ -11322,19 +11365,22 @@ Adjust the height of the default face by the scale in the pinch event EVENT. (define-key ctl-x-map [(control meta ?-)] 'global-text-scale-adjust) (define-key ctl-x-map [(control meta ?0)] 'global-text-scale-adjust) (autoload 'global-text-scale-adjust "face-remap" "\ -Globally adjust the font size by INCREMENT. +Change (a.k.a. \"adjust\") the font size of all faces by INCREMENT. -Interactively, INCREMENT may be passed as a numeric prefix argument. +Interactively, INCREMENT is the prefix numeric argument, and defaults +to 1. Positive values of INCREMENT increase the font size, negative +values decrease it. -The adjustment made depends on the final component of the key binding -used to invoke the command, with all modifiers removed: +When you invoke this command, it performs the initial change of the +font size, and after that allows further changes by typing one of the +following keys immediately after invoking the command: \\`+', \\`=' Globally increase the height of the default face \\`-' Globally decrease the height of the default face \\`0' Globally reset the height of the default face -After adjusting, further adjust the font size as long as the key, -with all modifiers removed, is one of the above characters. +(The change of the font size produced by these keys depends on the +final component of the key sequence, with all modifiers removed.) Buffer-local face adjustments have higher priority than global face adjustments. @@ -21217,6 +21263,9 @@ a greeting from the server. :nowait, if non-nil, says the connection should be made asynchronously, if possible. +:noquery - when exiting Emacs and the network process is running, +don't query the user if it's non-nil. + :shell-command is a `format-spec' string that can be used if :type is `shell'. It has two specs, %s for host and %p for port number. Example: \"ssh gateway nc %s %p\". @@ -23063,6 +23112,81 @@ Location of the file used to speed up activation of packages at startup." :type (custom-autoload 'package-quickstart-file "package" t) (register-definition-prefixes "package" '("bad-signature" "define-package" "describe-package-1" "package-")) + +;;; Generated autoloads from emacs-lisp/package-vc.el + +(defvar package-vc-selected-packages 'nil "\ +List of packages that must be installed. +Each member of the list is of the form (NAME . SPEC), where NAME +is a symbol designating the package and SPEC is one of: + +- nil, if any package version can be installed; +- a version string, if that specific revision is to be installed; +- a property list of the form described in + `package-vc-archive-spec-alist', giving a package + specification. + +This user option differs from `package-selected-packages' in that +it is meant to be specified manually. You can also use the +function `package-vc-selected-packages' to apply the changes.") +(custom-autoload 'package-vc-selected-packages "package-vc" nil) +(autoload 'package-vc-install "package-vc" "\ +Fetch a package NAME-OR-URL and set it up for using with Emacs. +If NAME-OR-URL is a URL, download the package from the repository +at that URL; the function will try to guess the name of the package +from the URL. Otherwise NAME-OR-URL should be a symbol whose name +is the package name, and the URL for the package will be taken from +the package's metadata. +By default, this function installs the last version of the package +available from its repository, but if REV is given and non-nil, it +specifies the revision to install. If REV has the special value +`:last-release' (interactively, the prefix argument), that stands +for the last released version of the package. +When calling from Lisp, optional argument NAME overrides the package +name as deduced from NAME-OR-URL. +Optional argument BACKEND specifies the VC backend to use for cloning +the package's repository; this is only possible if NAME-OR-URL is a URL, +a string. If BACKEND is omitted or nil, the function +uses `package-vc--guess-backend' to guess the backend. + +(fn NAME-OR-URL &optional NAME REV BACKEND)" t) +(autoload 'package-vc-checkout "package-vc" "\ +Clone the sources for PKG-DESC into DIRECTORY and visit that directory. +Unlike `package-vc-install', this does not yet set up the package +for use with Emacs; use `package-vc-link-directory' for setting +the package up after this function finishes. +Optional argument REV means to clone a specific version of the +package; it defaults to the last version available from the +package's repository. If REV has the special value +`:last-release' (interactively, the prefix argument), that stands +for the last released version of the package. + +(fn PKG-DESC DIRECTORY &optional REV)" t) +(autoload 'package-vc-install-from-checkout "package-vc" "\ +Set up the package NAME in DIR by linking it into the ELPA directory. +Interactively, prompt the user for DIR, which should be a directory +under version control, typically one created by `package-vc-checkout'. +If invoked interactively with a prefix argument, prompt the user +for the NAME of the package to set up. Otherwise infer the package +name from the base name of DIR. + +(fn DIR NAME)" t) +(autoload 'package-vc-refresh "package-vc" "\ +Refresh the installation for package given by PKG-DESC. +Interactively, prompt for the name of the package to refresh. + +(fn PKG-DESC)" t) +(autoload 'package-vc-prepare-patch "package-vc" "\ +Send patch for REVISIONS to maintainer of the package PKG using SUBJECT. +SUBJECT and REVISIONS are passed on to `vc-prepare-patch', which see. +PKG must be a package description. +Interactively, prompt for PKG, SUBJECT, and REVISIONS. However, +if the current buffer has marked commit log entries, REVISIONS +are the tags of the marked entries, see `log-view-get-marked'. + +(fn PKG SUBJECT REVISIONS)" t) +(register-definition-prefixes "package-vc" '("package-vc-")) + ;;; Generated autoloads from emacs-lisp/package-x.el @@ -24616,7 +24740,7 @@ Open profile FILENAME. ;;; Generated autoloads from progmodes/project.el -(push (purecopy '(project 0 8 2)) package--builtin-versions) +(push (purecopy '(project 0 8 3)) package--builtin-versions) (autoload 'project-current "project" "\ Return the project instance in DIRECTORY, defaulting to `default-directory'. @@ -26744,6 +26868,8 @@ Return ROT13 encryption of STRING. (fn STRING)") (autoload 'rot13-region "rot13" "\ ROT13 encrypt the region between START and END in current buffer. +If invoked interactively and the buffer is read-only, a message +will be printed instead. (fn START END)" t) (autoload 'rot13-other-window "rot13" "\ commit 9db6da54494e2835eb9e7f1854af7d40eea28d6e Author: Stefan Kangas Date: Tue Nov 15 04:17:58 2022 +0100 Add face to key bindings suggested by M-x * lisp/simple.el (execute-extended-command--describe-binding-msg): Use 'help-key-binding' face for keybinding. diff --git a/lisp/simple.el b/lisp/simple.el index a53b7b1d0d..0f44b14948 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2494,9 +2494,10 @@ Also see `suggest-key-bindings'." (defun execute-extended-command--describe-binding-msg (function binding shorter) (format-message "You can run the command `%s' with %s" function - (cond (shorter (concat "M-x " shorter)) - ((stringp binding) binding) - (t (key-description binding))))) + (propertize (cond (shorter (concat "M-x " shorter)) + ((stringp binding) binding) + (t (key-description binding))) + 'face 'help-key-binding))) (defun execute-extended-command (prefixarg &optional command-name typed) "Read a command name, then read the arguments and call the command. commit 723ceaca1d71850aed75431a503f8616cab8c103 Author: Po Lu Date: Mon Nov 14 19:06:12 2022 +0800 Make C-x 5 o work on GNOME Shell-like Wayland compositors * src/pgtkterm.c (pgtk_free_frame_resources) (fill_background_by_face) (pgtk_draw_glyphless_glyph_string_foreground) (pgtk_draw_window_cursor): Fix coding style. (pgtk_focus_frame): Use gtk_window_present_with_time whenever possible. (key_press_event): Set the last user time. (pgtk_display_info_for_display): New function. (key_release_event, construct_mouse_click, button_event): Set the last user time. (scroll_event, pgtk_parse_color, syms_of_pgtkterm) (pgtk_begin_cr_clip): Fix coding style. * src/pgtkterm.h (struct pgtk_output): New field `last_user_time'. diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 4f3e3697ba..13f6c6c3c4 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -511,16 +511,16 @@ pgtk_free_frame_resources (struct frame *f) if (FRAME_X_OUTPUT (f)->scrollbar_foreground_css_provider != NULL) { - GtkCssProvider *old = - FRAME_X_OUTPUT (f)->scrollbar_foreground_css_provider; + GtkCssProvider *old + = FRAME_X_OUTPUT (f)->scrollbar_foreground_css_provider; g_object_unref (old); FRAME_X_OUTPUT (f)->scrollbar_foreground_css_provider = NULL; } if (FRAME_X_OUTPUT (f)->scrollbar_background_css_provider != NULL) { - GtkCssProvider *old = - FRAME_X_OUTPUT (f)->scrollbar_background_css_provider; + GtkCssProvider *old + = FRAME_X_OUTPUT (f)->scrollbar_background_css_provider; g_object_unref (old); FRAME_X_OUTPUT (f)->scrollbar_background_css_provider = NULL; } @@ -1333,8 +1333,8 @@ fill_background_by_face (struct frame *f, struct face *face, int x, int y, if (face->stipple != 0) { - cairo_pattern_t *mask = - FRAME_DISPLAY_INFO (f)->bitmaps[face->stipple - 1].pattern; + cairo_pattern_t *mask + = FRAME_DISPLAY_INFO (f)->bitmaps[face->stipple - 1].pattern; double r = ((face->foreground >> 16) & 0xff) / 255.0; double g = ((face->foreground >> 8) & 0xff) / 255.0; @@ -1606,8 +1606,8 @@ pgtk_draw_glyphless_glyph_string_foreground (struct glyph_string *s) /* It is assured that all LEN characters in STR is ASCII. */ for (j = 0; j < len; j++) - char2b[j] = - s->font->driver->encode_char (s->font, str[j]) & 0xFFFF; + char2b[j] + = s->font->driver->encode_char (s->font, str[j]) & 0xFFFF; s->font->driver->draw (s, 0, upper_len, x + glyph->slice.glyphless.upper_xoff, s->ybase + glyph->slice.glyphless.upper_yoff, @@ -2958,8 +2958,8 @@ pgtk_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, if (w == XWINDOW (f->selected_window)) { - int frame_x = - WINDOW_TO_FRAME_PIXEL_X (w, x) + WINDOW_LEFT_FRINGE_WIDTH (w); + int frame_x = (WINDOW_TO_FRAME_PIXEL_X (w, x) + + WINDOW_LEFT_FRINGE_WIDTH (w)); int frame_y = WINDOW_TO_FRAME_PIXEL_Y (w, y); pgtk_im_set_cursor_location (f, frame_x, frame_y, w->phys_cursor_width, @@ -4518,16 +4518,29 @@ pgtk_free_pixmap (struct frame *f, Emacs_Pixmap pixmap) void pgtk_focus_frame (struct frame *f, bool noactivate) { - struct pgtk_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); + struct pgtk_display_info *dpyinfo; + GtkWidget *widget; + GtkWindow *window; - GtkWidget *wid = FRAME_WIDGET (f); + dpyinfo = FRAME_DISPLAY_INFO (f); - if (dpyinfo->x_focus_frame != f && wid != NULL) + if (FRAME_GTK_OUTER_WIDGET (f) && !noactivate) { - block_input (); - gtk_widget_grab_focus (wid); - unblock_input (); + /* The user says it is okay to activate the frame. Call + gtk_window_present_with_time. If the timestamp specified + (actually a display serial on Wayland) is new enough, then + any Wayland compositor supporting gtk_surface1_present will + cause the frame to be activated. */ + + window = GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)); + gtk_window_present_with_time (window, dpyinfo->last_user_time); + return; } + + widget = FRAME_WIDGET (f); + + if (widget) + gtk_widget_grab_focus (widget); } static void @@ -5144,13 +5157,15 @@ static gboolean key_press_event (GtkWidget *widget, GdkEvent *event, gpointer *user_data) { union buffered_input_event inev; - ptrdiff_t nbytes = 0; + ptrdiff_t nbytes; Mouse_HLInfo *hlinfo; struct frame *f; + struct pgtk_display_info *dpyinfo; f = pgtk_any_window_to_frame (gtk_widget_get_window (widget)); EVENT_INIT (inev.ie); hlinfo = MOUSE_HL_INFO (f); + nbytes = 0; /* If mouse-highlight is an integer, input clears out mouse highlighting. */ @@ -5181,6 +5196,12 @@ key_press_event (GtkWidget *widget, GdkEvent *event, gpointer *user_data) Lisp_Object c; guint state; + dpyinfo = FRAME_DISPLAY_INFO (f); + + /* Set the last user time for pgtk_focus_frame to work + correctly. */ + dpyinfo->last_user_time = event->key.time; + state = event->key.state; /* While super is pressed, the input method will always always @@ -5214,8 +5235,8 @@ key_press_event (GtkWidget *widget, GdkEvent *event, gpointer *user_data) /* Common for all keysym input events. */ XSETFRAME (inev.ie.frame_or_window, f); - inev.ie.modifiers = - pgtk_gtk_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), modifiers); + inev.ie.modifiers + = pgtk_gtk_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), modifiers); inev.ie.timestamp = event->key.time; /* First deal with keysyms which have defined @@ -5363,11 +5384,37 @@ key_press_event (GtkWidget *widget, GdkEvent *event, gpointer *user_data) return TRUE; } +static struct pgtk_display_info * +pgtk_display_info_for_display (GdkDisplay *dpy) +{ + struct pgtk_display_info *dpyinfo; + + for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next) + { + if (dpyinfo->display == dpy) + return dpyinfo; + } + + return NULL; +} + static gboolean key_release_event (GtkWidget *widget, GdkEvent *event, gpointer *user_data) { + GdkDisplay *display; + struct pgtk_display_info *dpyinfo; + + display = gtk_widget_get_display (widget); + dpyinfo = pgtk_display_info_for_display (display); + + if (dpyinfo) + /* This is needed on Wayland because of some brain dead + compositors. Without them, we would not have to keep track of + the serial of key release events. */ + dpyinfo->last_user_time = event->key.time; + return TRUE; } @@ -5904,9 +5951,10 @@ construct_mouse_click (struct input_event *result, result->kind = MOUSE_CLICK_EVENT; result->code = event->button - 1; result->timestamp = event->time; - result->modifiers = - (pgtk_gtk_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), event->state) | - (event->type == GDK_BUTTON_RELEASE ? up_modifier : down_modifier)); + result->modifiers = (pgtk_gtk_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), + event->state) + | (event->type == GDK_BUTTON_RELEASE + ? up_modifier : down_modifier)); XSETINT (result->x, event->x); XSETINT (result->y, event->y); @@ -5971,6 +6019,10 @@ button_event (GtkWidget *widget, GdkEvent *event, } } + /* Set the last user time, used to activate the frame in + pgtk_focus_frame. */ + dpyinfo->last_user_time = event->button.time; + if (f) { /* Is this in the tab-bar? */ @@ -5989,10 +6041,7 @@ button_event (GtkWidget *widget, GdkEvent *event, (f, x, y, event->type == GDK_BUTTON_PRESS, pgtk_gtk_to_emacs_modifiers (dpyinfo, event->button.state)); } - } - if (f) - { if (!(tab_bar_p && NILP (tab_bar_arg)) && !tool_bar_p) { if (ignore_next_mouse_click_timeout) @@ -6060,8 +6109,8 @@ scroll_event (GtkWidget *widget, GdkEvent *event, gpointer *user_data) inev.ie.kind = NO_EVENT; inev.ie.timestamp = event->scroll.time; - inev.ie.modifiers = - pgtk_gtk_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), event->scroll.state); + inev.ie.modifiers + = pgtk_gtk_to_emacs_modifiers (FRAME_DISPLAY_INFO (f), event->scroll.state); XSETINT (inev.ie.x, event->scroll.x); XSETINT (inev.ie.y, event->scroll.y); XSETFRAME (inev.ie.frame_or_window, f); @@ -6986,10 +7035,9 @@ pgtk_parse_color (struct frame *f, const char *color_name, color->red = rgba.red * 65535; color->green = rgba.green * 65535; color->blue = rgba.blue * 65535; - color->pixel = - (color->red >> 8) << 16 | - (color->green >> 8) << 8 | - (color->blue >> 8) << 0; + color->pixel = ((color->red >> 8) << 16 + | (color->green >> 8) << 8 + | (color->blue >> 8) << 0); return 1; } return 0; @@ -7118,10 +7166,9 @@ If set to a non-float value, there will be no wait at all. */); Vpgtk_wait_for_event_timeout = make_float (0.1); DEFVAR_LISP ("pgtk-keysym-table", Vpgtk_keysym_table, - doc: /* Hash table of character codes indexed by X keysym codes. */); - Vpgtk_keysym_table = - make_hash_table (hashtest_eql, 900, DEFAULT_REHASH_SIZE, - DEFAULT_REHASH_THRESHOLD, Qnil, false); + doc: /* Hash table of character codes indexed by X keysym codes. */); + Vpgtk_keysym_table = make_hash_table (hashtest_eql, 900, DEFAULT_REHASH_SIZE, + DEFAULT_REHASH_THRESHOLD, Qnil, false); window_being_scrolled = Qnil; staticpro (&window_being_scrolled); @@ -7159,13 +7206,13 @@ pgtk_begin_cr_clip (struct frame *f) if (!cr) { - cairo_surface_t *surface = - gdk_window_create_similar_surface (gtk_widget_get_window - (FRAME_GTK_WIDGET (f)), - CAIRO_CONTENT_COLOR_ALPHA, - FRAME_CR_SURFACE_DESIRED_WIDTH (f), - FRAME_CR_SURFACE_DESIRED_HEIGHT - (f)); + cairo_surface_t *surface + = gdk_window_create_similar_surface (gtk_widget_get_window + (FRAME_GTK_WIDGET (f)), + CAIRO_CONTENT_COLOR_ALPHA, + FRAME_CR_SURFACE_DESIRED_WIDTH (f), + FRAME_CR_SURFACE_DESIRED_HEIGHT + (f)); cr = FRAME_CR_CONTEXT (f) = cairo_create (surface); cairo_surface_destroy (surface); diff --git a/src/pgtkterm.h b/src/pgtkterm.h index fcc6c5310e..b6bd10dcb4 100644 --- a/src/pgtkterm.h +++ b/src/pgtkterm.h @@ -262,6 +262,13 @@ struct pgtk_output unsigned long background_color; void *toolbar; + /* The "time" of the last user interaction on this display. Set + upon button and key press and release events. + + Under the GDK Wayland backend, this is actually an event + serial. */ + guint32 last_user_time; + /* Cursors */ Emacs_Cursor current_cursor; Emacs_Cursor text_cursor; @@ -357,8 +364,8 @@ struct pgtk_output /* The tool bar in this frame */ GtkWidget *toolbar_widget; /* True if tool bar is packed into the hbox widget (i.e. vertical). */ - bool_bf toolbar_in_hbox:1; - bool_bf toolbar_is_packed:1; + bool_bf toolbar_in_hbox : 1; + bool_bf toolbar_is_packed : 1; GtkTooltip *ttip_widget; GtkWidget *ttip_lbl; commit 7e493b1773b8e7c5762af4e6f21dadec649ce4dc Author: Alan Mackenzie Date: Mon Nov 14 09:47:14 2022 +0000 CC Mode: Prevent over-eager recognition of a variable as a found type This fixes bug #59233. It occurred in the C source code fragment open_replies = alloca (nproviders ) , where typing a * before the closing parenthesis caused nproviders to be prematurely recognized as a type. * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): CASE 18 - set unsafe-maybe to t, when needed. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 5d3d240886..9139699b5b 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -11079,6 +11079,11 @@ This function might do hidden buffer changes." ;; `got-parens' or `got-suffix' is set it's "a()", "a[]", "a()[]", ;; or similar, which we accept only if the context rules out ;; expressions. + ;; + ;; If we've got at-type 'maybe, we cannot confidently promote the + ;; possible type to a found type. + (when (and (eq at-type 'maybe)) + (setq unsafe-maybe t)) (throw 'at-decl-or-cast t))) ;; If we had a complete symbol table here (which rules out