commit fa598571adab4858282f337b45984517e197f8a9 (HEAD, refs/remotes/origin/master) Author: Po Lu Date: Sat May 13 10:27:57 2023 +0800 Fix detection of tab bar windows on PGTK * src/dispnew.c (adjust_frame_glyphs_for_window_redisplay): Adjust commentary. * src/pgtkfns.c (pgtk_set_doc_edited): Remove unused function. * src/pgtkterm.c (pgtk_clear_under_internal_border): Clean up X related code. * src/pgtkterm.h: Update prototypes. * src/window.h: Define WIDNOW_TAB_BAR_P on PGTK. (bug#63472) diff --git a/src/dispnew.c b/src/dispnew.c index fe661579daf..a928a5d1b14 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -2212,10 +2212,16 @@ adjust_frame_glyphs_for_window_redisplay (struct frame *f) w->pixel_left = 0; w->left_col = 0; - w->pixel_top = FRAME_MENU_BAR_HEIGHT (f) - + (!NILP (Vtab_bar_position) ? FRAME_TOOL_BAR_HEIGHT (f) : 0); - w->top_line = FRAME_MENU_BAR_LINES (f) - + (!NILP (Vtab_bar_position) ? FRAME_TOOL_BAR_LINES (f) : 0); + + /* Note that tab and tool bar windows appear above the internal + border, as enforced by WINDOW_TOP_EDGE_Y. */ + + w->pixel_top = (FRAME_MENU_BAR_HEIGHT (f) + + (!NILP (Vtab_bar_position) + ? FRAME_TOOL_BAR_HEIGHT (f) : 0)); + w->top_line = (FRAME_MENU_BAR_LINES (f) + + (!NILP (Vtab_bar_position) + ? FRAME_TOOL_BAR_LINES (f) : 0)); w->total_cols = FRAME_TOTAL_COLS (f); w->pixel_width = (FRAME_PIXEL_WIDTH (f) - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); diff --git a/src/pgtkfns.c b/src/pgtkfns.c index 6e5bb22375a..801f97d26d2 100644 --- a/src/pgtkfns.c +++ b/src/pgtkfns.c @@ -398,13 +398,6 @@ pgtk_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name) pgtk_set_name_internal (f, name); } - -void -pgtk_set_doc_edited (void) -{ -} - - static void pgtk_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) { diff --git a/src/pgtkterm.c b/src/pgtkterm.c index c00e13550bd..6cb1a3a4626 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -4954,22 +4954,19 @@ pgtk_clear_under_internal_border (struct frame *f) if (face) { -#define x_fill_rectangle(f, gc, x, y, w, h) \ - fill_background_by_face (f, face, x, y, w, h) - x_fill_rectangle (f, gc, 0, margin, width, border); - x_fill_rectangle (f, gc, 0, 0, border, height); - x_fill_rectangle (f, gc, width - border, 0, border, height); - x_fill_rectangle (f, gc, 0, height - border, width, border); -#undef x_fill_rectangle + fill_background_by_face (f, face, 0, margin, width, border); + fill_background_by_face (f, face, 0, 0, border, height); + fill_background_by_face (f, face, width - border, 0, border, + height); + fill_background_by_face (f, face, 0, height - border, width, + border); } else { -#define x_clear_area(f, x, y, w, h) pgtk_clear_area (f, x, y, w, h) - x_clear_area (f, 0, 0, border, height); - x_clear_area (f, 0, margin, width, border); - x_clear_area (f, width - border, 0, border, height); - x_clear_area (f, 0, height - border, width, border); -#undef x_clear_area + pgtk_clear_area (f, 0, 0, border, height); + pgtk_clear_area (f, 0, margin, width, border); + pgtk_clear_area (f, width - border, 0, border, height); + pgtk_clear_area (f, 0, height - border, width, border); } unblock_input (); diff --git a/src/pgtkterm.h b/src/pgtkterm.h index 202c6622ce3..8f2f00efdad 100644 --- a/src/pgtkterm.h +++ b/src/pgtkterm.h @@ -553,7 +553,6 @@ #define SELECTION_EVENT_TIME(eventp) \ extern char *pgtk_xlfd_to_fontname (const char *); /* Implemented in pgtkfns.c. */ -extern void pgtk_set_doc_edited (void); extern const char *pgtk_get_defaults_value (const char *); extern const char *pgtk_get_string_resource (XrmDatabase, const char *, const char *); extern void pgtk_implicitly_set_name (struct frame *, Lisp_Object, Lisp_Object); diff --git a/src/window.h b/src/window.h index 32b5fe14f4f..2f793ebe438 100644 --- a/src/window.h +++ b/src/window.h @@ -750,7 +750,7 @@ #define WINDOW_MENU_BAR_P(W) false #endif /* True if W is a tab bar window. */ -#if defined (HAVE_WINDOW_SYSTEM) && !defined (HAVE_PGTK) +#if defined (HAVE_WINDOW_SYSTEM) # define WINDOW_TAB_BAR_P(W) \ (WINDOWP (WINDOW_XFRAME (W)->tab_bar_window) \ && (W) == XWINDOW (WINDOW_XFRAME (W)->tab_bar_window)) commit d9f674aea50cf1fe6ac138f14b602ce2d0f5cf77 Author: Po Lu Date: Sat May 13 10:07:22 2023 +0800 Fix opaque region specification on no-toolkit builds * src/xterm.c (handle_one_xevent): Always specify opaque region on no-toolkit builds upon a configure event for any's window. diff --git a/src/xterm.c b/src/xterm.c index d621d94a2cf..0899fcdc2d6 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -21178,14 +21178,28 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_cr_update_surface_desired_size (any, configureEvent.xconfigure.width, configureEvent.xconfigure.height); - if (f || (any && configureEvent.xconfigure.window == FRAME_X_WINDOW (any))) - x_update_opaque_region (f ? f : any, &configureEvent); #endif + +#if !defined USE_X_TOOLKIT && !defined USE_GTK + + /* Make the new size of the frame its opaque region. This is a + region describing areas of the window which are always + guaranteed to be completely opaque and can be treated as such + by the compositor. It is set to the width and height of the + only window in no-toolkit builds when `alpha_background' is + not set, and is cleared otherwise. */ + + if (f || (any && configureEvent.xconfigure.window + == FRAME_OUTER_WINDOW (any))) + x_update_opaque_region (f ? f : any, &configureEvent); + +#endif /* !defined USE_X_TOOLKIT && !defined USE_GTK */ + #ifdef USE_GTK if (!f && (f = any) && configureEvent.xconfigure.window == FRAME_X_WINDOW (f) - && (FRAME_VISIBLE_P(f) + && (FRAME_VISIBLE_P (f) || !(configureEvent.xconfigure.width <= 1 && configureEvent.xconfigure.height <= 1))) { @@ -21212,10 +21226,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, f = 0; } #endif - if (f - && (FRAME_VISIBLE_P(f) - || !(configureEvent.xconfigure.width <= 1 - && configureEvent.xconfigure.height <= 1))) + if (f && (FRAME_VISIBLE_P (f) + || !(configureEvent.xconfigure.width <= 1 + && configureEvent.xconfigure.height <= 1))) { #ifdef USE_GTK /* For GTK+ don't call x_net_wm_state for the scroll bar commit 3e132b972e30c5b0cb75ed29d8ca5a845434d6fe Author: Eli Zaretskii Date: Fri May 12 14:07:36 2023 +0300 Fix files-tests broken by a recent change * test/lisp/files-tests.el (files-tests-safe-local-variable-directories): Fix this test: since we are now using 'file-equal-p' the directory used as a safe one should actually exist. (Bug#61901) diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index e87bb3cfa0a..f6c7be88b05 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -170,7 +170,7 @@ files-tests-safe-local-variable-directories ;; safe-local-variable-directories should be risky, ;; so use it as an arbitrary risky variable. (let ((test-alist '((safe-local-variable-directories . "some_val"))) - (fakedir "/test1/test2/") + (fakedir default-directory) (enable-local-eval t)) (with-temp-buffer (setq safe-local-variable-directories (list fakedir)) commit e535494491cb6266260e5adcbcbc9b7cd76cab2f Merge: 0b39e4daee4 cbb59267c75 Author: Eli Zaretskii Date: Fri May 12 14:07:29 2023 +0300 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs commit 0b39e4daee4383d9e535148a973e0d5701125ada Author: Antero Mejr Date: Thu May 11 19:22:49 2023 +0000 Handle case-insensitivity for safe-local-variable-directories. * lisp/emacs-lisp/files.el (hack-local-variables-filter): Use 'file-equal-p' when checking 'safe-local-variable-directories'. * doc/lispref/variables.texi (File Local Variables): Remove sentences in 'safe-local-variable-directories' description about case-sensitivity and trailing slash behaviors. * doc/emacs/custom.texi (Safe File Variables): Remove sentence about 'safe-local-variable-directories' trailing slash behavior. (Bug#61901) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index d8abf81c75f..d8221f51425 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1359,10 +1359,9 @@ Safe File Variables variables are loaded from those directories, even if the variables are risky. The variable @code{safe-local-variable-directories} holds the list of such directories. The names of the directories in this list -must be full absolute file names, and should end in a slash. If the -variable @code{enable-remote-dir-locals} has a non-@code{nil} value, -the list can include remote directories as well (@pxref{Remote -Files}). +must be full absolute file names. If the variable +@code{enable-remote-dir-locals} has a non-@code{nil} value, the list +can include remote directories as well (@pxref{Remote Files}). @vindex enable-local-variables The variable @code{enable-local-variables} allows you to change the diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index b3a8cd8110c..4eda035473e 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -1982,11 +1982,9 @@ File Local Variables enabled. Directory-local variables loaded from these directories, such as the variables in @file{.dir-locals.el}, will be enabled even if they are risky. The directories in this list must be -fully-expanded absolute file names that end in a directory separator -character. They may also be remote directories if the variable -@code{enable-remote-dir-locals} is set non-@code{nil}. Directories in -this list are matched case-sensitively, even if the filesystem is -case-sensitive. +fully-expanded absolute file names. They may also be remote +directories if the variable @code{enable-remote-dir-locals} is set +non-@code{nil}. @end defvar @defun hack-local-variables &optional handle-mode diff --git a/lisp/files.el b/lisp/files.el index 35d794f6dcf..148f47cbc97 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3934,7 +3934,10 @@ hack-local-variables-filter (null unsafe-vars) (null risky-vars)) (memq enable-local-variables '(:all :safe)) - (member dir-name safe-local-variable-directories) + (delq nil (mapcar (lambda (dir) + (and dir-name dir + (file-equal-p dir dir-name))) + safe-local-variable-directories)) (hack-local-variables-confirm all-vars unsafe-vars risky-vars dir-name)) (dolist (elt all-vars) commit cbb59267c757b747c48a2690f96073614e8b4fd4 Author: Michael Albinus Date: Fri May 12 12:45:32 2023 +0200 Add trailing space to PROMPT in yes-or-no-p * doc/lispref/minibuf.texi (Yes-or-No Queries): Describe PROMPT massage for y-or-n-p and yes-or-no-p. * lisp/subr.el (y-or-n-p): Adapt docstring. * src/fns.c (Fyes_or_no_p): Add trailing space to PROMPT if needed. (Bug#63399) diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 5d59387fb1f..ff12808762f 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -2200,6 +2200,9 @@ Yes-or-No Queries @kbd{@key{DEL}}, or something that quits), the function responds @samp{Please answer y or n.}, and repeats the request. +If @var{prompt} is a non-empty string, and it ends with a non-space +character, a @samp{SPC} character will be appended to it. + This function actually uses the minibuffer, but does not allow editing of the answer. The cursor moves to the minibuffer while the question is being asked. @@ -2240,6 +2243,9 @@ Yes-or-No Queries responses; otherwise, the function responds @w{@samp{Please answer yes or no.}}, waits about two seconds and repeats the request. +If @var{prompt} is a non-empty string, and it ends with a non-space +character, a @samp{SPC} character will be appended to it. + @code{yes-or-no-p} requires more work from the user than @code{y-or-n-p} and is appropriate for more crucial decisions. diff --git a/lisp/subr.el b/lisp/subr.el index 0501fc67a3e..a52abb38772 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3590,7 +3590,9 @@ y-or-n-p Return t if answer is \"y\" and nil if it is \"n\". PROMPT is the string to display to ask the question; `y-or-n-p' -adds \"(y or n) \" to it. +adds \"(y or n) \" to it. If PROMPT is a non-empty string, and +it ends with a non-space character, a space character will be +appended to it. If you bind the variable `help-form' to a non-nil value while calling this function, then pressing `help-char' diff --git a/src/fns.c b/src/fns.c index bb6efdda655..561f526f8d0 100644 --- a/src/fns.c +++ b/src/fns.c @@ -26,6 +26,7 @@ Copyright (C) 1985-2023 Free Software Foundation, Inc. #include #include #include +#include #include "lisp.h" #include "bignum.h" @@ -3202,7 +3203,9 @@ DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, 1, 0, Return t if answer is yes, and nil if the answer is no. PROMPT is the string to display to ask the question; `yes-or-no-p' -appends `yes-or-no-prompt' (default \"(yes or no) \") to it. +appends `yes-or-no-prompt' (default \"(yes or no) \") to it. If +PROMPT is a non-empty string, and it ends with a non-space character, +a space character will be appended to it. The user must confirm the answer with RET, and can edit it until it has been confirmed. @@ -3234,6 +3237,12 @@ DEFUN ("yes-or-no-p", Fyes_or_no_p, Syes_or_no_p, 1, 1, 0, if (use_short_answers) return call1 (intern ("y-or-n-p"), prompt); + { + char *s = SSDATA (prompt); + ptrdiff_t len = strlen (s); + if ((len > 0) && !isspace (s[len - 1])) + prompt = CALLN (Fconcat, prompt, build_string (" ")); + } prompt = CALLN (Fconcat, prompt, Vyes_or_no_prompt); specpdl_ref count = SPECPDL_INDEX (); commit c9cf673d505b2dd9a666fed50d7f3b2f7dff163f Author: Alan Mackenzie Date: Fri May 12 10:33:15 2023 +0000 CC Mode: Fontify function names after long stretches of macros. This fixes bug#63322. * lisp/progmodes/cc-engine.el (c-find-decl-spots): When a search back over syntactic whitespace hits its limit, set cfd-match-pos and cfd-continue-pos to cfd-start-pos. * lisp/progmodes/cc-mode.el (c-fl-decl-start): Remove an unneeded (and harmful) condition on (point)'s position in the main loop. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 8b34daf03c2..d21e082d0b6 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -6244,6 +6244,9 @@ c-find-decl-prefix-search ;; prefix". The declaration prefix is the earlier of `cfd-prop-match' and ;; `cfd-re-match'. `cfd-match-pos' is set to the decl prefix. ;; + ;; The variables which this macro should set for `c-find-decl-spots' are + ;; `cfd-match-pos' and `cfd-continue-pos'. + ;; ;; This macro might do hidden buffer changes. '(progn @@ -6586,11 +6589,17 @@ c-find-decl-spots ;; and so we can continue the search from this point. If we ;; didn't hit `c-find-decl-syntactic-pos' then we're now in ;; the right spot to begin searching anyway. - (if (and (eq (point) c-find-decl-syntactic-pos) - c-find-decl-match-pos) - (setq cfd-match-pos c-find-decl-match-pos - cfd-continue-pos syntactic-pos) - + (cond + ((and (eq (point) c-find-decl-syntactic-pos) + c-find-decl-match-pos) + (setq cfd-match-pos c-find-decl-match-pos + cfd-continue-pos syntactic-pos)) + ((save-excursion (c-beginning-of-macro)) + ;; The `c-backward-syntactic-ws' ~40 lines up failed to find non + ;; syntactic-ws and hit its limit, leaving us in a macro. + (setq cfd-match-pos cfd-start-pos + cfd-continue-pos cfd-start-pos)) + (t (setq c-find-decl-syntactic-pos syntactic-pos) (when (if (bobp) @@ -6608,7 +6617,7 @@ c-find-decl-spots (c-find-decl-prefix-search)) ; sets cfd-continue-pos (setq c-find-decl-match-pos (and (< cfd-match-pos cfd-start-pos) - cfd-match-pos))))) ; end of `cond' + cfd-match-pos)))))) ; end of `cond' ;; Advance `cfd-continue-pos' if it's before the start position. ;; The closest continue position that might have effect at or diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 330202bb5f9..11a1d3fe6c2 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -2444,8 +2444,6 @@ c-fl-decl-start (setq pseudo (c-cheap-inside-bracelist-p (c-parse-state))))))) (goto-char pseudo)) t) - (or (> (point) bod-lim) - (eq bod-lim (point-min))) ;; Move forward to the start of the next declaration. (progn (c-forward-syntactic-ws) ;; Have we got stuck in a comment at EOB? commit 6234c3e0411a1d70bed2c85bbfb438d4479be51b Author: Thomas Fitzsimmons Date: Fri May 12 05:10:50 2023 -0400 soap-client.el: Bump version to 3.2.3 * lisp/net/soap-client.el: Bump version to 3.2.3. diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 2991d29f870..010e86354b6 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -5,7 +5,7 @@ ;; Author: Alexandru Harsanyi ;; Author: Thomas Fitzsimmons ;; Created: December, 2009 -;; Version: 3.2.2 +;; Version: 3.2.3 ;; Keywords: soap, web-services, comm, hypermedia ;; Package: soap-client ;; URL: https://github.com/alex-hhh/emacs-soap-client