From 0cb86a348c79176464b9bacccb000607d9cbc9cd Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 10 Apr 2023 01:44:40 -0400 Subject: ; Update ChangeLog.4. --- ChangeLog.4 | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 67 insertions(+), 1 deletion(-) diff --git a/ChangeLog.4 b/ChangeLog.4 index e57f59fdb51..106444e41a7 100644 --- a/ChangeLog.4 +++ b/ChangeLog.4 @@ -1,3 +1,69 @@ +2023-04-10 Eli Zaretskii + + * lisp/ldefs-boot.el: Regenerate. + +2023-04-10 Eli Zaretskii + + Bump Emacs version to 29.0.90 + + * README: + * configure.ac: + * nt/README.W32: + * msdos/sed2v2.inp: Bump version to 29.0.90. + +2023-04-09 Dmitry Gutov + + Fix some cases of incomplete code's indentation [c/c++-ts-mode] + + * lisp/progmodes/c-ts-mode.el (c-ts-base--before-indent): Try to + guess when the parse tree is incomplete, and provide a better node + to indent against (bug#62717). + (c-ts-base-mode): Set up advice for local treesit-indent-function. + +2023-04-09 Dmitry Gutov + + project-search: Pipe the list of files through 'file-regular-p' + + * lisp/progmodes/project.el (project-search): Pipe the list of + files through 'file-regular-p' to skip directories (bug#62735). + +2023-04-09 Eli Zaretskii + + Update ChangeLog and AUTHORS for Emacs 29 + + * admin/authors.el: Update for Emacs 29. + + * etc/AUTHORS: Re-generate for Emacs 29. + + * ChangeLog.4: New generated file. + * Makefile.in (PREFERRED_BRANCH): Update to emacs-29. + (CHANGELOG_HISTORY_INDEX_MAX): Bump to 4. + +2023-04-09 João Távora + + Backport: Eglot: no more tests based on Pylsp (bug#62694) + + The functionality under test in eglot.el is exactly the same, but use + the clangd server only, as that is used in more tests, and it is much + easier to check if it misbehaves or not. + + Tests pass with clangd version 15. + + * test/lisp/progmodes/eglot-tests.el (python): Don't require it. + (eglot--call-with-fixture): Simplify. + (eglot--wait-for-clangd): New helper. + (eglot-test-basic-completions) + (eglot-test-non-unique-completions, eglot-test-basic-xref) + (eglot-test-snippet-completions) + (eglot-test-snippet-completions-with-company) + (eglot-test-eldoc-after-completions, eglot-test-multiline-eldoc): + Use clangd, not pylsp. + (eglot-test-formatting): Renamed from + eglot-test-python-autopep-formatting. + (eglot-test-python-yapf-formatting): Remove. + + (cherry picked from commit fc8230f3362b12955152f48565a6c670b4c4cc88) + 2023-04-08 Eli Zaretskii Fix 'C-h k' for "Paste from Kill Menu" in context menus @@ -114256,7 +114322,7 @@ This file records repository revisions from commit f2ae39829812098d8269eafbc0fcb98959ee5bb7 (exclusive) to -commit 5ef7ff05736b9d1b4d806cfe04ec5d99c090e748 (inclusive). +commit 5e039d5a6e99d8380044f410673b8ee51dbc1711 (inclusive). See ChangeLog.3 for earlier changes. ;; Local Variables: -- cgit v1.2.3 From 9b0bf694da4aca1689895975450c82f836346e8f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 10 Apr 2023 01:54:17 -0400 Subject: ; Fix ldefs-boot.el. --- lisp/ldefs-boot.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index dde1404916a..15308c298f8 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -37150,6 +37150,7 @@ run a specific program. The program must be a member of (provide 'loaddefs) ;; Local Variables: +;; no-byte-compile: t ;; version-control: never ;; no-update-autoloads: t ;; no-native-compile: t -- cgit v1.2.3 From d4d0da96f0b474ccab64349c12d5a7638b81bbdb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 10 Apr 2023 10:31:44 +0300 Subject: ; Update make-tarball.txt for Emacs 29. --- admin/make-tarball.txt | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 232053e5e96..00516a0edd7 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -68,16 +68,25 @@ General steps (for each step, check for possible errors): PREFERRED_BRANCH = emacs-NN where NN is the version on the release branch from which you are - producing the tarball. If NN is incorrect, update Makefile.in and - re-run 'configure' to update Makefile. + producing the tarball. If NN is incorrect (which it usually is + when starting a pretest of a new major release), update + Makefile.in and re-run 'configure' to update Makefile. - If the versioned ChangeLog.N file is too large, start a new one - by bumping N, and also update the line in top-level Makefile.in - which says + For the first pretest of a new major release, consider starting a + new top-level ChangeLog.N file if the last versioned ChangeLog.N + file is too large. A good point to start a new ChangeLog.N file + is when the last one gets larger than 1.5 MiB. If so, start a new + one by bumping N, and also update the line in top-level + Makefile.in which says CHANGELOG_HISTORY_INDEX_MAX = N by incrementing the value of N by 1; then regenerate Makefile. + After bumping N, you need to actually create and commit + ChangeLog.N with the updated N, otherwise "M-x authors" below will + fail. The easiest way of creating the new ChangeLog.N is to + rename the file ChangeLog (without the .N suffix) left over from + the last major release (it is usually unversioned) and commit it. Now: @@ -99,11 +108,12 @@ General steps (for each step, check for possible errors): the relevant entry. If a file was deleted or renamed, consider adding an appropriate entry to variables authors-ignored-files, authors-valid-file-names, or authors-renamed-files-alist in - authors.el. + authors.el. If some authors are "ignored", consider adding + entries to the author-aliases variable. If necessary, repeat 'C-u M-x authors' after making those changes. Save the "*Authors*" buffer as etc/AUTHORS. - Check the diff looks reasonable. Maybe add entries to + Check the diff looks reasonable. Maybe add more entries to authors-ambiguous-files or authors-aliases, and repeat. Commit any fixes to authors.el. @@ -169,7 +179,13 @@ General steps (for each step, check for possible errors): messages from TeX, but those seem to be harmless, as the result looks just fine.) -5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. +5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. After copying, edit + ldefs-boot.el to add + + ;; no-byte-compile: t + + to its file-local variables section, otherwise make-dist will + complain. Commit ChangeLog.N, etc/AUTHORS, lisp/ldefs-boot.el, and the files changed by M-x set-version. Note that the set-version changes -- cgit v1.2.3 From 2445100d7d6dd698d561e554a35fe2c9f87edc9f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 10 Apr 2023 12:30:23 +0300 Subject: ; Improve documentation of 'match-buffers' * doc/lispref/buffers.texi (Buffer List): * lisp/subr.el (match-buffers): Fix documentation of 'buffer-match-p' and 'match-buffers'. --- doc/lispref/buffers.texi | 24 +++++++++++++----------- lisp/subr.el | 13 +++++++------ 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index b56006e5aa9..86c47ae7310 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -959,9 +959,9 @@ infinite recursion. @defun buffer-match-p condition buffer-or-name &optional arg This function checks if a buffer designated by @code{buffer-or-name} -satisfies a @code{condition}. Optional third argument @var{arg} is -passed to the predicate function in @var{condition}. A condition can -be one of the following: +satisfies the specified @code{condition}. Optional third argument +@var{arg} is passed to the predicate function in @var{condition}. A +valid @var{condition} can be one of the following: @itemize @bullet{} @item A string, interpreted as a regular expression. The buffer @@ -990,21 +990,23 @@ Satisfied if @emph{all} the conditions in @var{conds} satisfy Satisfied if the buffer's major mode derives from @var{expr}. @item major-mode Satisfied if the buffer's major mode is equal to @var{expr}. Prefer -using @code{derived-mode} instead when both can work. +using @code{derived-mode} instead, when both can work. @end table @item t Satisfied by any buffer. A convenient alternative to @code{""} (empty -string), @code{(and)} (empty conjunction) or @code{always}. +string) or @code{(and)} (empty conjunction). @end itemize @end defun @defun match-buffers condition &optional buffer-list arg -This function returns a list of all buffers that satisfy a -@code{condition}, as defined for @code{buffer-match-p}. By default -all buffers are considered, but this can be restricted via the second -optional @code{buffer-list} argument. Optional third argument -@var{arg} will be used by @var{condition} in the same way as -@code{buffer-match-p} does. +This function returns a list of all buffers that satisfy the +@code{condition}. If no buffers match, the function returns +@code{nil}. The argument @var{condition} is as defined in +@code{buffer-match-p} above. By default, all the buffers are +considered, but this can be restricted via the optional argument +@code{buffer-list}, which should be a list of buffers to consider. +Optional third argument @var{arg} will be passed to @var{condition} in +the same way as @code{buffer-match-p} does. @end defun @node Creating Buffers diff --git a/lisp/subr.el b/lisp/subr.el index 46dcd97d829..d4428aef765 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -7128,12 +7128,13 @@ CONDITION is either: (funcall match (list condition)))) (defun match-buffers (condition &optional buffers arg) - "Return a list of buffers that match CONDITION. -See `buffer-match-p' for details on CONDITION. By default all -buffers are checked, this can be restricted by passing an -optional argument BUFFERS, set to a list of buffers to check. -ARG is passed to `buffer-match', for predicate conditions in -CONDITION." + "Return a list of buffers that match CONDITION, or nil if none match. +See `buffer-match-p' for various supported CONDITIONs. +By default all buffers are checked, but the optional +argument BUFFERS can restrict that: its value should be +an explicit list of buffers to check. +Optional argument ARG is passed to `buffer-match-p', for +predicate conditions in CONDITION." (let (bufs) (dolist (buf (or buffers (buffer-list))) (when (buffer-match-p condition (get-buffer buf) arg) -- cgit v1.2.3 From b4afee03193575c3812c6f9704cd08d0dc852e5a Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Mon, 10 Apr 2023 13:49:32 +0100 Subject: Fix ff-quiet-mode doc * lisp/find-file.el (ff-quiet-mode, ff-find-other-file): Say that ff-quiet-mode disables tracing, not the inverse. --- lisp/find-file.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/find-file.el b/lisp/find-file.el index e98ea621d6a..05459c3643d 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -167,7 +167,7 @@ To override this, give an argument to `ff-find-other-file'." :type 'boolean) (defcustom ff-quiet-mode nil - "If non-nil, trace which directories are being searched." + "If non-nil, do not trace which directories are being searched." :type 'boolean) ;;;###autoload @@ -351,7 +351,7 @@ Variables of interest include: If non-nil, always attempt to create the other file if it was not found. - `ff-quiet-mode' - If non-nil, traces which directories are being searched. + If non-nil, does not trace which directories are being searched. - `ff-special-constructs' A list of regular expressions specifying how to recognize special -- cgit v1.2.3 From 338b3718b6cf14ef13b9390928e2b13b5d4f1797 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 10 Apr 2023 16:09:58 +0300 Subject: Fix visiting RPM files We cannot call 'sh-set-shell' inside 'sh-base-mode', since various settings of 'sh-mode', in particular the syntax table, is not yet set. Likewise with various hooks: since 'sh-base-mode' is not a mode any file should be visited with, it makes no sense to set up stuff like 'hack-local-variables-hook' in 'sh-base-mode'; it should be set in the descendant modes instead. * lisp/progmodes/sh-script.el (sh-base-mode): Move the call to 'sh-set-shell' from here... (sh-mode): ...to here... (bash-ts-mode): ...with a copy here. (Bug#62748) --- lisp/progmodes/sh-script.el | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 5493e68d5bd..54da1e0468e 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1537,13 +1537,7 @@ implementations. Currently there are two: `sh-mode' and (lambda (terminator) (if (eq terminator ?') "'\\'" - "\\"))) - ;; Parse or insert magic number for exec, and set all variables depending - ;; on the shell thus determined. - (sh-set-shell (sh--guess-shell) nil nil) - (add-hook 'flymake-diagnostic-functions #'sh-shellcheck-flymake nil t) - (add-hook 'hack-local-variables-hook - #'sh-after-hack-local-variables nil t)) + "\\")))) ;;;###autoload (define-derived-mode sh-mode sh-base-mode "Shell-script" @@ -1603,7 +1597,13 @@ with your script for an edit-interpret-debug cycle." nil nil ((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w")) nil (font-lock-syntactic-face-function - . ,#'sh-font-lock-syntactic-face-function)))) + . ,#'sh-font-lock-syntactic-face-function))) + ;; Parse or insert magic number for exec, and set all variables depending + ;; on the shell thus determined. + (sh-set-shell (sh--guess-shell) nil nil) + (add-hook 'flymake-diagnostic-functions #'sh-shellcheck-flymake nil t) + (add-hook 'hack-local-variables-hook + #'sh-after-hack-local-variables nil t)) ;;;###autoload (defalias 'shell-script-mode 'sh-mode) @@ -1615,6 +1615,10 @@ This mode automatically falls back to `sh-mode' if the buffer is not written in Bash or sh." :syntax-table sh-mode-syntax-table (when (treesit-ready-p 'bash) + (sh-set-shell "bash" nil nil) + (add-hook 'flymake-diagnostic-functions #'sh-shellcheck-flymake nil t) + (add-hook 'hack-local-variables-hook + #'sh-after-hack-local-variables nil t) (treesit-parser-create 'bash) (setq-local treesit-font-lock-feature-list '(( comment function) -- cgit v1.2.3 From f2d212c696692879254b7fc7ca2a9b0a2999e557 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Tue, 11 Apr 2023 07:29:49 +0100 Subject: Fix a couple of eglot-tests * test/lisp/progmodes/eglot-tests.el (eglot-test-rust-analyzer-watches-files): Bump timeout. (eglot-test-json-basic): Check for yas-minor-mode before using it, like other tests do (bug#61637). --- test/lisp/progmodes/eglot-tests.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/lisp/progmodes/eglot-tests.el b/test/lisp/progmodes/eglot-tests.el index 984c1bf9916..7ce0116636d 100644 --- a/test/lisp/progmodes/eglot-tests.el +++ b/test/lisp/progmodes/eglot-tests.el @@ -404,7 +404,7 @@ Pass TIMEOUT to `eglot--with-timeout'." ) (should (eglot--tests-connect)) (let (register-id) - (eglot--wait-for (s-requests 1) + (eglot--wait-for (s-requests 3) (&key id method &allow-other-keys) (setq register-id id) (string= method "client/registerCapability")) @@ -801,6 +801,7 @@ int main() { (ert-deftest eglot-test-json-basic () "Test basic autocompletion in vscode-json-languageserver." (skip-unless (executable-find "vscode-json-languageserver")) + (skip-unless (fboundp 'yas-minor-mode)) (eglot--with-fixture '(("project" . (("p.json" . "{\"foo.b") -- cgit v1.2.3 From c62afb10cf0bbeae6a540f4e05b7a23536636cd0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 11 Apr 2023 10:33:32 +0300 Subject: Fix wallpaper-tests on MS-Windows * test/lisp/image/wallpaper-tests.el (wallpaper--find-setter) (wallpaper--find-setter/call-predicate) (wallpaper--find-setter/set-current-setter) (wallpaper-set/calls-init-action) (wallpaper-set/calls-wallpaper-set-function) (wallpaper-set/runs-command, wallpaper-set/runs-command/detach): Skip these tests if native functions are used for changing wallpaper. These tests are irrelevant in that case. --- test/lisp/image/wallpaper-tests.el | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/test/lisp/image/wallpaper-tests.el b/test/lisp/image/wallpaper-tests.el index 94b4d8b2dbb..2e4e36030d4 100644 --- a/test/lisp/image/wallpaper-tests.el +++ b/test/lisp/image/wallpaper-tests.el @@ -24,7 +24,8 @@ (require 'wallpaper) (ert-deftest wallpaper--find-setter () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (let (wallpaper--current-setter (wallpaper--default-setters (wallpaper--default-methods-create @@ -32,7 +33,8 @@ (should (wallpaper--find-setter)))) (ert-deftest wallpaper--find-setter/call-predicate () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (let* ( wallpaper--current-setter called (wallpaper--default-setters (wallpaper--default-methods-create @@ -43,7 +45,8 @@ (should called))) (ert-deftest wallpaper--find-setter/set-current-setter () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (let (wallpaper--current-setter (wallpaper--default-setters (wallpaper--default-methods-create @@ -52,7 +55,8 @@ (should wallpaper--current-setter))) (ert-deftest wallpaper-set/runs-command () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (ert-with-temp-file fil-jpg :suffix ".jpg" (ert-with-temp-file fil @@ -70,7 +74,8 @@ (should (file-exists-p fil))))))) (ert-deftest wallpaper-set/runs-command/detach () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (ert-with-temp-file fil-jpg :suffix ".jpg" (ert-with-temp-file fil @@ -89,7 +94,8 @@ (should (file-exists-p fil)))))) (ert-deftest wallpaper-set/calls-init-action () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (ert-with-temp-file fil-jpg :suffix ".jpg" (ert-with-temp-file fil @@ -108,7 +114,8 @@ (should called))))) (ert-deftest wallpaper-set/calls-wallpaper-set-function () - (skip-unless (executable-find "touch")) + (skip-unless (and (executable-find "touch") + (wallpaper--use-default-set-function-p))) (ert-with-temp-file fil-jpg :suffix ".jpg" (let* ( wallpaper--current-setter called -- cgit v1.2.3