commit b074c55a97f5ab4eaba09dbb3a5d15c9a27a1469 (HEAD, refs/remotes/origin/master) Author: Juanma Barranquero Date: Thu Nov 3 03:49:08 2022 +0100 ; * doc/lispref/control.texi (Generators): Fix typo. diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 9035e7f6bb..3c874ee3fe 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -1534,7 +1534,7 @@ iterator with @code{iter-next} for anything interesting to happen. Each call to a generator function produces a @emph{different} iterator, each with its own state. -@defun iter-next iterator value +@defun iter-next iterator &optional value Retrieve the next value from @var{iterator}. If there are no more values to be generated (because @var{iterator}'s generator function returned), @code{iter-next} signals the @code{iter-end-of-sequence} commit 05f5d978ae70c4849a5c47865d62301d27317a8a Author: Paul Eggert Date: Wed Nov 2 13:24:26 2022 -0700 Initialize child signal handling before posix_spawn too. Problem reported by Tino Calancha (Bug#58960). * src/callproc.c (call_process): Initialize SIGCHLD handling before possibly creating a child with emacs_span. This need not be in the critical section that calls emacs_spawn, so do it outside the critical section. * src/process.c (child_signal_init): Now extern. diff --git a/src/callproc.c b/src/callproc.c index 4d4b86629c..f9f840e544 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -648,6 +648,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd, #ifndef MSDOS + child_signal_init (); block_input (); block_child_signal (&oldset); diff --git a/src/lisp.h b/src/lisp.h index d87f954938..eafa241adf 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4915,6 +4915,7 @@ extern bool running_asynch_code; /* Defined in process.c. */ struct Lisp_Process; +extern void child_signal_init (void); extern void kill_buffer_processes (Lisp_Object); extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object, struct Lisp_Process *, int); diff --git a/src/process.c b/src/process.c index 358899cded..5144c5d6c9 100644 --- a/src/process.c +++ b/src/process.c @@ -292,7 +292,6 @@ static int child_signal_read_fd = -1; descriptor to notify `wait_reading_process_output' of process status changes. */ static int child_signal_write_fd = -1; -static void child_signal_init (void); #ifndef WINDOWSNT static void child_signal_read (int, void *); #endif @@ -7323,7 +7322,7 @@ process has been transmitted to the serial port. */) /* Set up `child_signal_read_fd' and `child_signal_write_fd'. */ -static void +void child_signal_init (void) { /* Either both are initialized, or both are uninitialized. */ commit 195f0e00d743e59c2e5ab0a6fa0ac564e6221578 Author: Juri Linkov Date: Wed Nov 2 20:36:49 2022 +0200 ; Fix typo diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index cf961e9e7c..4454188cc4 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -484,7 +484,7 @@ is a multibyte string, we recommend to make sure @var{string} is also multibyte, even if it's pure-@acronym{ASCII}. Since it is impossible to change the number of characters in an -existing string, it is en error if @var{obj} consists of more +existing string, it is an error if @var{obj} consists of more characters than would fit in @var{string} starting at character index @var{idx}. @end defun commit 969d71d11c62ae085f094a96ecea2fb504bb4602 Author: Juri Linkov Date: Wed Nov 2 20:22:10 2022 +0200 Add the parameter :noquery to open-network-stream (bug#58948) * doc/lispref/processes.texi (Network): Add :noquery for open-network-stream. * lisp/net/network-stream.el (open-network-stream): Pass the parameter :noquery to make-network-process. Doc fix. * lisp/progmodes/eglot.el (eglot--connect): Pass `:noquery t' to eglot--inferior-bootstrap to use in open-network-stream call, like `:noquery t' is passed to make-process in other places. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index da8df96854..adc6909aca 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -2585,6 +2585,10 @@ that are mainly relevant to encrypted connections: @item :nowait @var{boolean} If non-@code{nil}, try to make an asynchronous connection. +@item :noquery @var{query-flag} +Initialize the process query flag to @var{query-flag}. +@xref{Query Before Exit}. + @item :coding @var{coding} Use this to set the coding systems used by the network process, in preference to binding @code{coding-system-for-read} or diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index 38a5e14c94..2b7e539392 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el @@ -173,6 +173,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\". @@ -195,6 +198,7 @@ gnutls-boot (as returned by `gnutls-boot-parameters')." (make-network-process :name name :buffer buffer :host (puny-encode-domain host) :service service :nowait (plist-get parameters :nowait) + :noquery (plist-get parameters :noquery) :tls-parameters (plist-get parameters :tls-parameters) :coding (plist-get parameters :coding)) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 0a0d73eb6d..204121045a 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1200,7 +1200,8 @@ This docstring appeases checkdoc, that's all." (pcase-let ((`(,connection . ,inferior) (eglot--inferior-bootstrap readable-name - contact))) + contact + '(:noquery t)))) (setq autostart-inferior-process inferior) connection)))) ((stringp (car contact)) commit 62d40f27b2467a5eeaefec37fea305bda54f6524 Author: Juanma Barranquero Date: Wed Nov 2 17:19:46 2022 +0100 ; * doc/misc/cl.texi (Mapping over Sequences): Fix typos. diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index e4b344f267..41499d1953 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi @@ -3381,9 +3381,9 @@ true for all elements. @defun cl-reduce function seq @t{&key :from-end :start :end :initial-value :key} This function returns the result of calling @var{function} on the -first and second element of @var{seq}, then calling @var{function} +first and second elements of @var{seq}, then calling @var{function} with that result and the third element of @var{seq}, then with that -result and the third element of @var{seq}, etc. +result and the fourth element of @var{seq}, etc. Here is an example. Suppose @var{function} is @code{*} and @var{seq} is the list @code{(2 3 4 5)}. The first two elements of the list are commit b035db7a313ce541cb49f9a4f57167a6a44b80c9 Author: Gregory Heytings Date: Wed Nov 2 14:20:39 2022 +0000 ; * admin/git-bisect-start: Improve commentary. diff --git a/admin/git-bisect-start b/admin/git-bisect-start index 18dca4bef8..cf0c8cde41 100755 --- a/admin/git-bisect-start +++ b/admin/git-bisect-start @@ -1,31 +1,40 @@ #!/bin/bash -# Start a git bisection, and prune the branches that are the result of -# merging external trees into the Emacs repository. +### Start a git bisection, and prune the branches that are the result of +### merging external trees into the Emacs repository. -# Copyright (C) 2022 Free Software Foundation, Inc. +## Copyright (C) 2022 Free Software Foundation, Inc. -# This file is part of GNU Emacs. +## This file is part of GNU Emacs. -# GNU Emacs is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +## GNU Emacs is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. -# GNU Emacs is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +## GNU Emacs is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with GNU Emacs. If not, see . +## You should have received a copy of the GNU General Public License +## along with GNU Emacs. If not, see . + +### Commentary: + +## Marking the last commits of external tree merges as "good" ensures +## that all the commits between the external tree root and the merge +## (excluding the merge-commit itself) are regarded as "good", so "git +## bisect" will never descend into these branches, which only have the +## files of the external tree, and in which Emacs can therefore not be +## built. The last commit is the parent of the merge commit in the +## external tree, that is, the parent of the merge commit that is not +## on master. + +### Code: git bisect start # Prune commits 1e5b753bf4..806734c1b1 introduced by 0186faf2a1 (Eglot # merge on Oct 20 2022) -# The following tells Git that all the commits between Eglot's root -# and its merge to master (excluding the merge-commit itself) are -# regarded as "good", so "git bisect" will never descend into the -# Eglot's branch, because that branch doesn't have all the files. git bisect good 806734c1b1f433de43d59d9a5e3a1e89d64315f6 commit 1f1dac9b3b35c38676358d440be88bea477c1bb3 Author: Stefan Kangas Date: Wed Nov 2 15:06:43 2022 +0100 * lisp/man.el (Man-mode-map): Prefer defvar-keymap. diff --git a/lisp/man.el b/lisp/man.el index 7ba7bee417..6c50f017e3 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -451,50 +451,45 @@ Otherwise, the value is whatever the function table) "Syntax table used in Man mode buffers.") -(defvar Man-mode-map - (let ((map (make-sparse-keymap))) - (suppress-keymap map) - (set-keymap-parent map - (make-composed-keymap button-buffer-map special-mode-map)) - - (define-key map "n" 'Man-next-section) - (define-key map "p" 'Man-previous-section) - (define-key map "\en" 'Man-next-manpage) - (define-key map "\ep" 'Man-previous-manpage) - (define-key map "." 'beginning-of-buffer) - (define-key map "r" 'Man-follow-manual-reference) - (define-key map "g" 'Man-goto-section) - (define-key map "s" 'Man-goto-see-also-section) - (define-key map "k" 'Man-kill) - (define-key map "u" 'Man-update-manpage) - (define-key map "m" 'man) - ;; Not all the man references get buttons currently. The text in the - ;; manual page can contain references to other man pages - (define-key map "\r" 'man-follow) - - (easy-menu-define nil map - "`Man-mode' menu." - '("Man" - ["Next Section" Man-next-section t] - ["Previous Section" Man-previous-section t] - ["Go To Section..." Man-goto-section t] - ["Go To \"SEE ALSO\" Section" Man-goto-see-also-section - :active (cl-member Man-see-also-regexp Man--sections - :test #'string-match-p)] - ["Follow Reference..." Man-follow-manual-reference - :active Man--refpages - :help "Go to a manpage referred to in the \"SEE ALSO\" section"] - "--" - ["Next Manpage" Man-next-manpage - :active (> (length Man-page-list) 1)] - ["Previous Manpage" Man-previous-manpage - :active (> (length Man-page-list) 1)] - "--" - ["Man..." man t] - ["Kill Buffer" Man-kill t] - ["Quit" quit-window t])) - map) - "Keymap for Man mode.") +(defvar-keymap Man-mode-map + :doc "Keymap for Man mode." + :suppress t + :parent (make-composed-keymap button-buffer-map special-mode-map) + "n" #'Man-next-section + "p" #'Man-previous-section + "M-n" #'Man-next-manpage + "M-p" #'Man-previous-manpage + "." #'beginning-of-buffer + "r" #'Man-follow-manual-reference + "g" #'Man-goto-section + "s" #'Man-goto-see-also-section + "k" #'Man-kill + "u" #'Man-update-manpage + "m" #'man + ;; Not all the man references get buttons currently. The text in the + ;; manual page can contain references to other man pages + "RET" #'man-follow + + :menu + '("Man" + ["Next Section" Man-next-section t] + ["Previous Section" Man-previous-section t] + ["Go To Section..." Man-goto-section t] + ["Go To \"SEE ALSO\" Section" Man-goto-see-also-section + :active (cl-member Man-see-also-regexp Man--sections + :test #'string-match-p)] + ["Follow Reference..." Man-follow-manual-reference + :active Man--refpages + :help "Go to a manpage referred to in the \"SEE ALSO\" section"] + "--" + ["Next Manpage" Man-next-manpage + :active (> (length Man-page-list) 1)] + ["Previous Manpage" Man-previous-manpage + :active (> (length Man-page-list) 1)] + "--" + ["Man..." man t] + ["Kill Buffer" Man-kill t] + ["Quit" quit-window t])) ;; buttons (define-button-type 'Man-abstract-xref-man-page commit a762cb4f8cde35cf3318c2bde1a98b046324aaff Author: Eli Zaretskii Date: Wed Nov 2 15:47:58 2022 +0200 ; * admin/git-bisect-start: Improve commentary. diff --git a/admin/git-bisect-start b/admin/git-bisect-start index a68d7f36a7..18dca4bef8 100755 --- a/admin/git-bisect-start +++ b/admin/git-bisect-start @@ -24,4 +24,8 @@ git bisect start # Prune commits 1e5b753bf4..806734c1b1 introduced by 0186faf2a1 (Eglot # merge on Oct 20 2022) +# The following tells Git that all the commits between Eglot's root +# and its merge to master (excluding the merge-commit itself) are +# regarded as "good", so "git bisect" will never descend into the +# Eglot's branch, because that branch doesn't have all the files. git bisect good 806734c1b1f433de43d59d9a5e3a1e89d64315f6 commit bec2b542c520c661ddcf9ac1b2465b06b96b5034 Author: Gregory Heytings Date: Wed Nov 2 13:07:09 2022 +0000 ; * admin/git-bisect-start: Use a full reference. diff --git a/admin/git-bisect-start b/admin/git-bisect-start index 889c959875..a68d7f36a7 100755 --- a/admin/git-bisect-start +++ b/admin/git-bisect-start @@ -24,4 +24,4 @@ git bisect start # Prune commits 1e5b753bf4..806734c1b1 introduced by 0186faf2a1 (Eglot # merge on Oct 20 2022) -git bisect good 806734c1b1 +git bisect good 806734c1b1f433de43d59d9a5e3a1e89d64315f6 commit a5d4c29a7fac505254576515704f7943afad18b3 Author: Po Lu Date: Wed Nov 2 18:27:16 2022 +0800 Improve commentary in some parts of xterm.c * src/xterm.c (x_probe_xfixes_extension): Rename to `x_fixes_pointer_blanking_supported', as fixes is now used for selection tracking as well. All callers changed. (x_focus_changed): Document where this code is used. diff --git a/src/xterm.c b/src/xterm.c index bd60a04c6c..17ff35a671 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11414,15 +11414,18 @@ x_new_focus_frame (struct x_display_info *dpyinfo, struct frame *frame) x_frame_rehighlight (dpyinfo); } +#ifdef HAVE_XFIXES + /* True if the display in DPYINFO supports a version of Xfixes sufficient for pointer blanking. */ -#ifdef HAVE_XFIXES + static bool -x_probe_xfixes_extension (struct x_display_info *dpyinfo) +x_fixes_pointer_blanking_supported (struct x_display_info *dpyinfo) { return (dpyinfo->xfixes_supported_p && dpyinfo->xfixes_major >= 4); } + #endif /* HAVE_XFIXES */ /* Toggle mouse pointer visibility on frame F using the XFixes @@ -11493,7 +11496,7 @@ x_toggle_visible_pointer (struct frame *f, bool invisible) /* But if Xfixes is available, try using it instead. */ if (dpyinfo->invisible_cursor == None) { - if (x_probe_xfixes_extension (dpyinfo)) + if (x_fixes_pointer_blanking_supported (dpyinfo)) { dpyinfo->fixes_pointer_blanking = true; xfixes_toggle_visible_pointer (f, invisible); @@ -11521,7 +11524,7 @@ XTtoggle_invisible_pointer (struct frame *f, bool invisible) block_input (); #ifdef HAVE_XFIXES if (FRAME_DISPLAY_INFO (f)->fixes_pointer_blanking - && x_probe_xfixes_extension (FRAME_DISPLAY_INFO (f))) + && x_fixes_pointer_blanking_supported (FRAME_DISPLAY_INFO (f))) xfixes_toggle_visible_pointer (f, invisible); else #endif @@ -11529,13 +11532,16 @@ XTtoggle_invisible_pointer (struct frame *f, bool invisible) unblock_input (); } -/* Handle FocusIn and FocusOut state changes for FRAME. - If FRAME has focus and there exists more than one frame, puts - a FOCUS_IN_EVENT into *BUFP. */ +/* Handle FocusIn and FocusOut state changes for FRAME. If FRAME has + focus and there exists more than one frame, puts a FOCUS_IN_EVENT + into *BUFP. Note that this code is not used to handle focus + changes on builds that can use the X Input extension for handling + input focus when it is available (currently the no toolkit and GTK + 3 toolkits). */ static void -x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct frame *frame, - struct input_event *bufp) +x_focus_changed (int type, int state, struct x_display_info *dpyinfo, + struct frame *frame, struct input_event *bufp) { if (type == FocusIn) {