From a24e9e3fee59435422af0473b7ec585de2c13b4e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 18 Jun 2023 07:15:29 -0400 Subject: [PATCH 01/14] ; Update ChangeLog.4 and etc/AUTHORS. --- ChangeLog.4 | 999 +++++++++++++++++++++++++++++++++++++++++++++++++++- etc/AUTHORS | 52 +-- 2 files changed, 1025 insertions(+), 26 deletions(-) diff --git a/ChangeLog.4 b/ChangeLog.4 index 2ce1351286e..b8efa20cdf9 100644 --- a/ChangeLog.4 +++ b/ChangeLog.4 @@ -1,3 +1,1000 @@ +2023-06-18 Mattias Engdegård + + Describe primarily the Emacs s-exp dialect for treesit queries + + * doc/lispref/parsing.texi (Pattern Matching, Multiple Languages): + Writing tree-sitter queries as Emacs s-expressions is much more + convenient than using the native query notation inside a string, + so it makes sense to base the documentation on the former dialect + (bug#64017). + +2023-06-18 Eli Zaretskii + + Fix documentation of :predicate in 'define-globalized-minor-mode' + + * doc/lispref/modes.texi (Defining Minor Modes): + * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): + Document that :predicate creates a customizable user option. + (Bug#64048) + +2023-06-17 Basil L. Contovounesios + + Revert "Fix some tree-sitter :match regexps" + + This reverts commit 95091b77f0bbb2ae1aa94ef4a413626e7d434d58 + of 2023-06-17, mistakenly pushed to emacs-29. + + The patch will be installed on master instead, and backported later, + after Emacs 29.1 is released (bug#64019). + + Do not merge to master. + +2023-06-17 Michael Albinus + + Require ls-lisp in Tramp only when needed + + * lisp/net/tramp-compat.el (ls-lisp): Require only on MS Windows. + (Bug#64124) + + * lisp/net/tramp-sh.el (ls-lisp-use-insert-directory-program): Declare. + (tramp-sh-handle-insert-directory): Simplify. + + * lisp/net/tramp.el (ls-lisp-use-insert-directory-program): Declare. + (tramp-handle-insert-directory): Require ls-lisp. Simplify. + +2023-06-17 Alan Mackenzie + + After minibuffer action, don't make the minibuffer current + + This fixes bug#63967. + + * src/minibuf.c (minibuffer_unwind): After restoring the next + minibuffer outwards to the mini window (when + enable-recursive-minibuffers is non-nil), don't call + Fset_frame_selected_window, which used to set the current + window to be the mini window. + +2023-06-17 Basil L. Contovounesios + + Fix some tree-sitter :match regexps + + The shy groups were caught by modified versions of the GNU ELPA + packages xr and relint: + - https://github.com/mattiase/xr/pull/6 + - https://github.com/mattiase/relint/pull/14 + + * lisp/progmodes/ruby-ts-mode.el (ruby-ts--s-p-query): Quote special + character in regexp. + * lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings): + * lisp/progmodes/js.el (js--plain-method-re): + (js--treesit-font-lock-settings): + * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings): + * lisp/progmodes/typescript-ts-mode.el + (typescript-ts-mode--font-lock-settings): Replace character + alternative [\\d], which matches '\' or 'd', with the most likely + intention [0-9]. Fix shy groups mistyped as optional colons. + Remove unneeded numbered :match group in rust-ts-mode (bug#64019). + +2023-06-17 João Távora + + Eglot: fix relative position of coinciding inlay hint overlays (bug#64101) + + Only seems to happen on certain platforms, like Mac OS. Reason + unknown reason so far, but this defensive fix seems safe. + + * lisp/progmodes/eglot.el (eglot--update-hints-1): Explicitly put + priority in inlay hint overalys. + +2023-06-17 Eli Zaretskii + + Fix documentation of comment-dwim (bug#64104) + + * lisp/newcomment.el (comment-dwim): Doc fix. + + * doc/emacs/programs.texi (Comment Commands): More accurate + description of what 'M-;' does when there's no active region. + +2023-06-17 Jens Schmidt + + Fix parsing of dn line if WITHDN is non-nil + + Function `ldap-search' errors out with `wrong-type-argument listp' + when called with WITHDN non-nil. + * lisp/net/ldap.el (ldap-search-internal): Parse the dn line + correctly so that `ldap-search' can grok it. (Bug#64089) + +2023-06-15 Andreas Schwab + + * doc/misc/calc.texi (Advanced Math Functions): Correct calc + algebraic syntax. + +2023-06-15 Eli Zaretskii + + Consider 'dired-kill-when-opening-new-dired-buffer' in mouse clicks + + * lisp/dired.el (dired-mouse-find-file): Honor the value of + 'dired-kill-when-opening-new-dired-buffer'. (Bug#64079) + +2023-06-15 Eli Zaretskii + + Fix Gamma function definition in calc.texi + + * doc/misc/calc.texi (Advanced Math Functions): Fix definition + of Gamma function. Use @sup in @infoline lines. (Bug#64077) + +2023-06-15 Eli Zaretskii + + Fix subscripts in the Calc manual + + * doc/misc/calc.texi (Musical Notes): Use @sub instead of TeX-only + '_' notation. For the details, see the discussion in + https://lists.gnu.org/archive/html/emacs-devel/2023-06/msg00096.html. + +2023-06-15 Eli Zaretskii + + Improve documentation of 'declare' forms + + * lisp/simple.el (read-extended-command-predicate): Mention the + '(declare completion ...' form in the doc string. + + * doc/lispref/functions.texi (Declare Form): Clarify + 'completion-predicate' and 'modes'; add cross-references. + (Bug#64045) + +2023-06-13 Basil L. Contovounesios + + Improve tree-sitter docs + + * doc/lispref/positions.texi (List Motion): Incorporate more + accurate description of treesit-defun-type-regexp from + '(elisp) Tree-sitter Major Modes', replacing that duplicate + entry (bug#64018). + + * doc/lispref/parsing.texi (Parsing Program Source) + (Language Grammar, Using Parser, Retrieving Nodes) + (Accessing Node Information, Pattern Matching, Multiple Languages): + (Tree-sitter Major Modes): + * doc/lispref/modes.texi (Parser-based Font Lock): Improve wording, + grammar, punctuation, and markup. Fix typos. + (Parser-based Indentation): Ditto. Document indent rule presets + field-is, catch-all, nth-sibling, grand-parent, and + great-grand-parent. + + * lisp/treesit.el (treesit-simple-indent-presets): Mention field-is, + catch-all, nth-sibling, grand-parent, great-grand-parent in + docstring. + (treesit-major-mode-setup, treesit-explore-mode): Improve + docstring/commentary grammar. + +2023-06-13 Basil L. Contovounesios + + Fix some Texinfo markup in manuals + + * doc/emacs/macos.texi (Mac / GNUstep Customization): + * doc/lispintro/emacs-lisp-intro.texi (condition-case): + * doc/lispref/control.texi (pcase Macro): + * doc/lispref/debugging.texi (Internals of Debugger): + * doc/lispref/internals.texi (Building Emacs): + * doc/lispref/modes.texi (Imenu): + (Parser-based Font Lock, Parser-based Indentation): + * doc/lispref/parsing.texi (Retrieving Nodes, Tree-sitter C API): + * doc/lispref/processes.texi (Network, Bindat Types): + * doc/lispref/searching.texi (Rx Functions): + * doc/lispref/text.texi (Replacing): + * doc/lispref/windows.texi (Textual Scrolling): + * doc/misc/calc.texi (Killing From Stack, Customizing Calc): + * doc/misc/cc-mode.texi (Misc Font Locking, List Line-Up): + * doc/misc/ede.texi (ede-cpp-root-project) + (ede-proj-target-makefile, ede-sourcecode): + * doc/misc/ert.texi (Running Tests in Batch Mode): + * doc/misc/eudc.texi (Emacs-only Configuration, The Server Hotlist): + * doc/misc/eww.texi (Advanced): + * doc/misc/flymake.texi (Starting Flymake) + (Proc customization variables): + * doc/misc/tramp.texi (File name completion): + * doc/misc/gnus.texi (Summary Buffer Lines, Gnus Registry Setup) + (Fancy splitting to parent, Customizing the IMAP Connection) + (Mail Source Specifiers, Agent as Cache): Consistently mark up nil + and t as @code. Also fix the markup and wording of some surrounding + text (bug#64016). + + * doc/lispref/display.texi (SVG Images, Icons): + * doc/lispref/modes.texi (Customizing Keywords): Prefer ASCII + apostrophe over Unicode right single quotation mark. + +2023-06-13 Basil L. Contovounesios + + Fix bol/bos anchors in tree-sitter :match regexps + + Further regexp fixes to follow separately (bug#64019#29). + + * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): + * lisp/progmodes/cmake-ts-mode.el + (cmake-ts-mode--font-lock-settings): + * lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings): + * lisp/progmodes/js.el (js--treesit-font-lock-settings): + * lisp/progmodes/python.el (python--treesit-settings): + * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--font-lock-settings): + * lisp/progmodes/sh-script.el (sh-mode--treesit-settings): + * lisp/progmodes/typescript-ts-mode.el + (typescript-ts-mode--font-lock-settings): + * test/src/treesit-tests.el (treesit-query-api): Anchor :match + regexps at beginning/end of string, not line. + +2023-06-12 Stefan Monnier + + * lisp/subr.el (with-restriction): Tweak indent rule + +2023-06-12 Eli Zaretskii + + Fix setting region in the minibuffer + + * lisp/minibuffer.el (minibuffer-beginning-of-buffer): Fix setting + region. (Bug#64022) + +2023-06-12 Michael Albinus + + Fix setting $DBUS_SESSION_BUS_ADDRESS after Emacs has started + + * doc/misc/dbus.texi (Alternative Buses): Explain using + $DBUS_SESSION_BUS_ADDRESS after Emacs has started. + + * src/dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Use egetenv. + +2023-06-11 Eli Zaretskii + + Fix tex-mode display-buffer issues + + * lisp/window.el (display-tex-shell-buffer-action): New defcustom. + * lisp/textmodes/tex-mode.el (tex-display-shell) + (tex-cmd-doc-view, tex-recenter-output-buffer): Use it. + (Bug#63956) + +2023-06-10 Morgan Smith + + Add test for when 'completion-auto-help' is 'visible' + + * test/lisp/minibuffer-tests.el (completion-auto-help-test): Add + test for when 'completion-auto-help' is 'visible'. Also test + for successful completion message. (Bug#63913) + +2023-06-10 Eli Zaretskii + + Avoid errors in 'apropos-documentation' after 'eval-buffer' + + * lisp/apropos.el (apropos--map-preloaded-atoms): Support the case + where an element of 'load-history' has nil as its car. (Bug#63881) + +2023-06-10 Daniel Martín + + Mention indent-rigidly in the Emacs manual + + * doc/emacs/indent.texi (Indentation Commands): Rewrite the first + sentence of 'C-x TAB' to mention the command that it executes, and + without using passive voice. (Bug#63997) + +2023-06-10 Morgan Smith + + Don't ding when completion succeeded + + * lisp/minibuffer.el (minibuffer-completion-help): Ensure 'ding' + is not called on a successful completion. Ensure 'ding' is not + called on a failure if 'completion-fail-discreetly' is set. + Also change "No completions" to "No match" as that is what is + used elsewhere. (Bug#63913) + +2023-06-09 Eli Zaretskii + + Improve documentation of color-related functions + + * doc/lispref/frames.texi (Color Names): Document + 'color-name-to-rgb' and 'color-dark-p'. + +2023-06-08 Eli Zaretskii + + Revert "* package.el (package--get-activatable-pkg): Prefer source packages" + + This reverts commit fb87d5008e21d1bc03547c1edf2280fb4cb8311e. + It caused problems when new versions of packages are installed + without deleting old versions. (Bug#63757) + +2023-06-08 Michael Albinus + + Fix connection-local user options handling (bug#63300) + + * lisp/files-x.el (connection-local-set-profiles) + (connection-local-set-profile-variables): Avoid saving the changed + user option to file unless triggered explicitly by user. (Bug#63300) + +2023-06-08 Eli Zaretskii + + Document 'startup-redirect-eln-cache' + + * doc/lispref/compile.texi (Native Compilation) + (Native-Compilation Functions): Document + 'startup-redirect-eln-cache'. + + * etc/PROBLEMS: Fix last change. + * etc/NEWS: Mark 'startup-redirect-eln-cache' as documented. + +2023-06-06 Andrea Corallo + + Fix `emacs-lisp-native-compile-and-load' for C-h f (bug#58314) + + * lisp/emacs-lisp/comp.el (comp-write-bytecode-file): New function + spilling code from `batch-byte+native-compile'. + (batch-byte+native-compile): Make use of. + * lisp/progmodes/elisp-mode.el + (emacs-lisp-native-compile-and-load): Produce the elc file and ask + to have it loaded. + +2023-06-06 Theodor Thornhill + + Add 'infer' as a keyword to typescript-ts-mode (bug#63880) + + * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--keywords): + New keyword. + +2023-06-04 Philip Kaludercic + + Revert changes to the order in which package descs are loaded + + * lisp/emacs-lisp/package.el (package-load-all-descriptors): Remove + NOSORT argument to 'directory-files', reverting back to the behaviour + as of Emacs 28. (Bug#63757) + +2023-06-04 Spencer Baugh + + Handle point in last file-name component in minibuffer completion + + This is a followup to commit e338a8ac41d4a9fd798dda90275abe75ac071335 + (Handle point not at EOB in minibuffer-choose-completion). + That commit added a heuristic, but the heuristic was insufficient: + It still had the original wrong behavior when completing the last + file-name component (i.e., the completion category is 'file' and + there's no slash after point). This patch makes the heuristic + cover that case as well. + * lisp/minibuffer.el (minibuffer-next-completion) + (minibuffer-choose-completion): If in file completion and there's no + slash after point, clear what's after point when we complete. + (Bug#62700) + +2023-06-03 Eli Zaretskii + + Avoid asking redundant question in emacsbug.el + + * lisp/mail/emacsbug.el (report-emacs-bug-hook): Don't ask the + question about saving email setup if we cannot save it anyway. + (Bug#63816) + +2023-06-03 Michael Albinus + + * test/infra/Dockerfile.emba (emacs-base): Don't install gawk. + +2023-06-03 Dmitry Gutov + + typescript-ts-mode: Add a rule for function_signature + + * lisp/progmodes/typescript-ts-mode.el + (typescript-ts-mode--font-lock-settings): + Add a rule for function_signature (bug#63867) + +2023-06-03 Mattias Engdegård + + * admin/unidata/emoji-zwj.awk: Avoid sprint buffer overflow + + Some AWK implementations have a fixed buffer for sprintf; for mawk the + default size is 8192 bytes. Hoist a string concatenation from + a sprintf call to avoid running into that limit. See discussion at + https://lists.gnu.org/archive/html/emacs-devel/2023-06/msg00090.html . + + (cherry picked from commit b5f17fe07c6624380ba8d0c7a400a6b89f225209) + +2023-06-03 Йордан Миладинов (tiny change) + + Fix apostrophe handling in rust-ts-mode and go-ts-mode (Bug#63708) + + * lisp/progmodes/rust-ts-mode.el (rust-ts-mode--syntax-propertize): + Treat apostrophes as strings if used to define character literals. + Treat LT and GT as pairs if used to define type parameters (formerly + they were treated as pairs only for type arguments). + * lisp/progmodes/go-ts-mode.el (go-ts-mode--syntax-table): Treat + apostrophes as strings if used to define rune literals. + +2023-06-03 Michael Albinus + + * test/infra/Dockerfile.emba (emacs-base): Install also gawk. + +2023-06-03 Eli Zaretskii + + Fix 'python-util-clone-local-variables' + + * lisp/progmodes/python.el (python-util-clone-local-variables): + Avoid signaling an error when a local variable is unbound. + Patch by Ernesto Alfonso . (Bug#63818) + +2023-06-03 kobarity + + Revert "Enhance Python font-lock to support multilines" + + This reverts commit 4915ca5dd4245a909c046e6691e8d4a1919890c8. + + We have found that there are performance issues when editing a large + file. The issue can be reproduced as follows: + + 1. emacs -Q + 2. Open large Python file (e.g. turtle.py in Python) + 3. Near the top of the buffer, enter open paren and some characters. + + The above commit extends the region to be font-locked using + `python-nav-end-of-statement'. However, if there are unbalanced + parens, it may move point to the end of the buffer. This causes + almost the entire buffer to be font-locked, which is not acceptable + for large files. + +2023-06-03 Eli Zaretskii + + Fix typo in calc.texi + + * doc/misc/calc.texi (Programming Tutorial): Fix a typo. + Suggested by Vladimir Nikishkin . + +2023-06-02 Jonas Bernoulli + + Update to Transient v0.4.1 + +2023-06-02 Eli Zaretskii + + Avoid errors in 'delete-forward-char' deleting static compositions + + * lisp/simple.el (delete-forward-char): Fix recognition of static + compositions. (Bug#63837) + +2023-06-02 Robert Pluim + + Make VS-15 and VS-16 compositions work correctly + + There is a conflict between forward matching and backward matching + composition rules involving the same codepoint, which can cause the + backward matching ones not to be invoked. Ensure that VS-15 (U+FE0E) + and VS-16 (U+FE0F) are composed by forward matching rules instead in + order to avoid this issue. + + * admin/unidata/emoji-zwj.awk: Add rules for CHAR+VS-15 and CHAR+VS-16. + * lisp/composite.el: remove backward matching rule for VS-15. (Bug#63731) + +2023-06-01 Dmitry Gutov + + Fix project-name for vc-aware backend in non-file buffers + + * lisp/progmodes/project.el (project-name): Make sure + project-vc-name is picked up from dir-locals in all + non-file-visiting buffers too (mentioned in bug#63469). + +2023-05-31 Theodor Thornhill + + Add type_predicate 'is' as keyword in typescript-ts-mode (bug#63810) + + * lisp/progmodes/typescript-ts-mode.el (typescript-ts-mode--keywords): + New keyword 'is'. + +2023-05-31 Eli Zaretskii + + Fix infloop in info-look.el + + * lisp/info-look.el (info-lookup-guess-gdb-script-symbol): Fix + infloop when there are no completions. (Bug#63808) + +2023-05-31 Stephen Berman + + Fix several todo-mode.el item editing bugs (bug#63811) + + * lisp/calendar/todo-mode.el (todo-insert-item--basic): With + insertion type 'here', ensure item is inserted on the todo-mode + line where the command was invoked. + (todo-edit-item--cat, todo-edit-item--pos): New variables. + (todo-edit-item--text): Restrict the scope of nil-valued + buffer-read-only to the functions that change buffer text. If + user moved point while editing a single-line todo item or a done + item comment, or while inserting a done item comment, restore + point, and for comments, make sure the done items section is + displayed. For multiline items, set the new variables so + todo-edit-quit can use them. + (todo-edit-quit): Use the values of the new variables to restore + point in the todo-mode buffer if it had been moved while editing. + (todo-edit-item--header): Avoid clobbering match data when editing + a todo item header. + +2023-05-31 Randy Taylor + + dockerfile-ts-mode: Prevent empty categories in imenu (Bug#63759) + + * lisp/progmodes/dockerfile-ts-mode.el (dockerfile-ts-mode--imenu): + Don't include empty categories. + +2023-05-31 Jens Schmidt + + Brush up doc strings and terminology in plstore.el + + * lisp/plstore.el (plstore-encoded, plstore-passphrase-callback-function) + (plstore--init-from-buffer, plstore-revert, plstore-close) + (plstore--merge-secret, plstore--decrypt, plstore--match, plstore-find) + (plstore-get, plstore-put, plstore-delete, plstore--insert-buffer) + (plstore-save, plstore--encode, plstore--decode) + (plstore--write-contents-functions, plstore-mode-decoded) + (plstore-mode): Brush up doc strings and documentation in general. + Fix terminology, in particular spurious occurences of all uppercase + "PLSTORE". (Bug#63627) + +2023-05-31 Jens Schmidt + + Add internal documentation on plstore.el + + * lisp/plstore.el: Add internal documentation and some words of + warning in the user documentation. (Bug#63627) + +2023-05-30 Theodor Thornhill + + Add compact_constructor_declaration font-locking to java-ts-mode + + * lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings): + New pattern. + +2023-05-29 Juri Linkov + + * lisp/tmm.el (tmm-completion-delete-prompt): Add more checks (bug#63754). + + In case when 'completions-header-format' is nil, the first 'mouse-face' + property is at the beginning of the buffer. So first use 'get-text-property' + at point-min. + +2023-05-29 Eli Zaretskii + + Allow to disable the DWIMish behavior of 'x' in package menu + + * lisp/emacs-lisp/package.el + (package-menu-use-current-if-no-marks): New defcustom. + (package-menu-execute): Use it. (Bug#62563) + + * etc/NEWS: Announce the new option. + +2023-05-29 Robert Pluim + + Allow dired to invoke secondary browser + + 'browse-url-of-dired-file' always invokes the primary browser, but + sometimes it's handy to call a different browser, which is why + 'browse-url-secondary-browser-function' exists. + + * lisp/net/browse-url.el (browse-url-of-dired-file): Call + 'browse-url-secondary-browser-function' when invoked with a prefix + argument. + * etc/NEWS: Announce the change. + +2023-05-29 Robert Pluim + + Add a binding for enriched-toggle-markup + + * lisp/textmodes/enriched.el (enriched-mode-map): Bind + 'enriched-toggle-markup' to 'M-o m'. + * etc/NEWS: Announce the change. + +2023-05-29 Eli Zaretskii + + Fix order of tmm-menubar when 'tmm-mid-prompt' is nil + + * lisp/tmm.el (tmm-prompt): Reverse 'tmm-km-list' when + 'tmm-mid-prompt' is nil, to present the menu in the correct order. + Suggested by Thiago Melo . + +2023-05-29 Michael Albinus + + Fix regression when saving tramp-default-proxies-alist (Do not merge) + + * lisp/net/tramp.el (tramp-add-hops): Suppress `signal-hook-function'. + Save `tramp-default-proxies-alist' only when changed. + +2023-05-28 Yuan Fu + + Save the tree-sitter grammar recipe when installing a grammar + + Raised in bug#63750, but not the main subject of it. + + * lisp/treesit.el (treesit-install-language-grammar): Save the recipe + to treesit-language-source-alist when installation is successful. + +2023-05-28 Robert Pluim + + Add instructions and test file for VS-15/VS-16 + + * admin/notes/unicode: Add instructions for emoji-variation-sequences.txt + * admin/unidata/emoji-variation-sequences.txt: New file, imported from + Unicode 15. + +2023-05-28 Michael Heerdegen + + A better fix for "Fix cancellation of Wdired" + + * lisp/wdired.el (wdired-abort-changes): Call + `dired-build-subdir-alist' instead of `dired-revert'. + (Bug#63676) + +2023-05-27 Eli Zaretskii + + Fix tmm-menubar when 'tmm-completion-prompt' is nil + + * lisp/tmm.el (tmm-prompt): Handle nil value of 'tmm-mid-prompt'. + (tmm-completion-delete-prompt): Don't rely on the exact text of + the completion heading line, as it is now a customizable format + string, and can be nil, meaning no heading line is inserted at + all. Instead, search for the first character of the menu based on + text properties used for it. (Bug#63754) + +2023-05-26 kobarity + + Use 'font-lock-extend-region-functions' in python-mode + + * lisp/progmodes/python.el (python-font-lock-extend-region): Change + arguments and return value for 'font-lock-extend-region-functions'. + (python-mode): Change from + 'font-lock-extend-after-change-region-function' to + 'font-lock-extend-region-functions'. (Bug#63622) + +2023-05-26 kobarity + + Fix python-info-docstring-p + + * lisp/progmodes/python.el (python-info-docstring-p): Stop using + python-rx string-delimiter. + + * test/lisp/progmodes/python-tests.el + (python-font-lock-escape-sequence-bytes-newline) + (python-font-lock-escape-sequence-hex-octal) + (python-font-lock-escape-sequence-unicode) + (python-font-lock-raw-escape-sequence): Mark as expected failures + until another bug in 'python-info-docstring-p' is corrected. + (python-info-docstring-p-7): New test. (Bug#63622) + +2023-05-26 Eli Zaretskii + + Fix cancellation of Wdired + + * lisp/wdired.el (wdired-abort-changes): Call 'dired-revert'. + Patch by Stephen Berman . (Bug#63676) + +2023-05-26 Mattias Engdegård + + Handle #@00 in new reader in a compatible way (bug#63722) + + This was a regression from Emacs 28. + + * src/lread.c (skip_lazy_string, read0): Make #@00 read as nil, which + is a quirk from the old reader that we preserve for compatibility. + * test/src/lread-tests.el (lread-skip-to-eof): Verify it. + + Reported by Richard Newton. + +2023-05-25 Po Lu + + Don't mark selection request events + + * src/pgtkterm.c (mark_pgtkterm): Prevent crash by not marking + selection request events, which don't have Lisp_Object members. + +2023-05-25 Po Lu + + Disable cairo-xcb support by default + + * INSTALL (--with-cairo-xcb): Document new option. + * configure.ac (USE_CAIRO_XCB): Implement new option. + +2023-05-25 Juri Linkov + + * lisp/progmodes/project.el: Move :safe from defcustom to autoload (bug#63469) + + (project-vc-ignores, project-vc-merge-submodules) + (project-vc-include-untracked, project-vc-name) + (project-vc-extra-root-markers, project-kill-buffers-display-buffer-list): + Autoload the line that puts 'safe-local-variable' property on defcustom symbol + instead of using the :safe keyword. + +2023-05-25 Juri Linkov + + * lisp/vc/vc-annotate.el (vc-annotate-mode-menu): Quote vc-annotate-backend. + + When unquoted it might get the nil value when vc-annotate.el is loaded + in non-vc-controlled buffer (bug#63689). + +2023-05-25 Juri Linkov + + Add vc-create/switch/print-branch to menu and update documentation (bug#63690) + + * doc/emacs/maintaining.texi (VC Change Log): + Add 'C-x v b l' (vc-print-branch-log). + (Creating Branches): Add @kindex and @findex for vc-create-branch. + (Switching Branches): Add @kindex and @findex for vc-switch-branch. + + * lisp/vc/vc-hooks.el (vc-menu-map): Add menu items for new + commands vc-create-branch and vc-switch-branch, and also + vc-print-branch-log. + + * lisp/vc/vc.el (vc-print-branch-log): Improve docstring. + +2023-05-25 Eli Zaretskii + + Fix rare crashes in 'try_window_reusing_current_matrix' + + * src/xdisp.c (try_window_reusing_current_matrix): Make sure we + never use a mode-line glyph row to start displaying scrolled-in + rows. (Bug#63711) + +2023-05-25 Michael Albinus + + Make last Tramp change less invasive + + * lisp/net/tramp.el (tramp-dissect-file-name): Revert last change. + (tramp-handle-file-name-as-directory) + (tramp-handle-file-name-directory): Let-bind `tramp-default-proxies-alist'. + +2023-05-23 Eli Zaretskii + + Fix 'use-dialog-box-p' and friends + + * lisp/subr.el (use-dialog-box-p): Use dialog boxes also when + invoked from some window-system gesture. (Bug#63655) + (y-or-n-p): Fix the description in the doc string of conditions + under which a dialog box will be used. + + * src/fns.c (Fyes_or_no_p): Use the same condition for dialog + boxes as in 'use-dialog-box-p'. Fix the description in the doc + string of conditions under which a dialog box will be used. + + * doc/lispref/minibuf.texi (Multiple Queries, Yes-or-No Queries): + Fix the description of conditions under which a dialog box will be + used. + +2023-05-23 Stefan Monnier + + Avoid duplicates when adding package dirs to load-path + + Do not merge to master, we're going to delete this code there. + + * lisp/emacs-lisp/package.el (package-activate-1): Check if the path + we're about to add is already in 'load-path', since package autoload + files have been updating 'load-path' for a decade. + +2023-05-23 Robert Pluim + + Avoid duplicate load-path entry when generating package autoloads + + 'file-name-directory' produces a path ending in '/', so that needs to be + run through 'directory-file-name' to avoid duplicate entries in + 'load-path'. (Bug#63625) + + * lisp/emacs-lisp/package.el (package-generate-autoloads): Call + 'directory-file-name' on the directory of 'load-file-name'. + +2023-05-23 Eli Zaretskii + + Disable loading SQLite3 extensions when SQLite3 version is too old + + * src/sqlite.c (HAVE_LOAD_EXTENSION): Define to 1 only if + enabling/disabling extension loading is supported as well. + (load_dll_functions, Fsqlite_load_extension): Condition on + HAVE_LOAD_EXTENSION, not on HAVE_SQLITE3_LOAD_EXTENSION. + (Bug#63653) + +2023-05-22 Eli Zaretskii + + Fix visiting HTML files encoded in iso-2022 variants + + * lisp/international/mule.el (sgml-xml-auto-coding-function) + (sgml-html-meta-auto-coding-function): Handle coding-systems whose + coding-system-type is iso-2022. (Bug#63644) + +2023-05-22 Eli Zaretskii + + Support 'isearch-allow-scroll' in 'pixel-scroll-precision-mode' + + * lisp/pixel-scroll.el (pixel-scroll-precision) + (pixel-scroll-down, pixel-scroll-up): Put the 'scroll-command' + property on these commands. (Bug#63640) + +2023-05-22 Andreas Schwab + + shr: allow moving between adjacent anchors + + * lisp/net/shr.el (shr-urlify): Put shr-tab-stop only over first + position. + +2023-05-22 Michael Albinus + + Fix multihop file name expansion in Tramp + + * lisp/net/tramp.el (tramp-dissect-file-name): Set hop to nil if + NODEFAULT. (Bug#63578) + +2023-05-21 Jens Schmidt + + Remove obsolete information from Gnus manual + + The Gnus manual was still referencing long-removed external + marks in section "Archiving Mails". Without external marks, + that section is almost pointless, so remove it completely. + * doc/misc/gnus.texi (Archiving Mail): Remove section. + (Top, Browsing the Web): Remove references to "Archiving + Mail". (Bug#63497) + +2023-05-21 Jens Schmidt + + Preserve mark in comint-history-isearch + + This preserves mark in `comint-history-isearch-backward' and + friends, which tend to set the mark on completion of the isearch + to unexpected positions. + * lisp/comint.el (comint-history-isearch-end): Set `isearch-opoint' + to point. (Bug#63616) + +2023-05-20 Liu Hui + + Fix systemd unit completion for old versions of systemd + + * lisp/pcmpl-linux.el (pcmpl-linux--systemd-units): Use '--no-legend' + for compatibility with older versions of systemctl. (Bug#63411) + +2023-05-20 Eli Zaretskii + + Fix Skeletons menu-bar menu in Python modes + + * lisp/progmodes/python.el (python-mode, python-ts-mode): Call + 'python-skeleton-add-menu-items' here, not in 'python-base-mode', + since the "Python" menu is not yet set up in the latter. + (Bug#63598) + +2023-05-20 Eli Zaretskii + + Fix loading SQLite extensions + + * src/sqlite.c (sqlite3_db_config) [WINDOWSNT]: Load from the DLL. + (Fsqlite_load_extension): Use 'sqlite3_db_config' to enable and + disable loading of extensions. Add a few free extensions to the + allow-list. Fix testing for the ".dll" extension. (Bug#63590) + + * test/src/sqlite-tests.el (sqlite-load-extension): Fix the test + to require successful load if the extension does exist. + +2023-05-20 Mattias Engdegård + + * etc/NEWS: Note dotimes loop variable scoping change (bug#63586) + +2023-05-20 Yuan Fu + + Fix c-ts-mode--top-level-declarator + + * lisp/progmodes/c-ts-mode.el: + (c-ts-mode--top-level-declarator): Don't use treesit-node-match-p. + +2023-05-19 Yuan Fu + + Improve c-ts-mode font-lock for function names (bug#63390) + + When a function definition has preproc directives in its body, it + can't correctly parse into a function_definition. This fix tries to + recognize this case and highlight the function_declarator correctly. + + * lisp/progmodes/c-ts-mode.el: + (c-ts-mode--font-lock-settings): New rule. + (c-ts-mode--top-level-declarator): New function. + +2023-05-19 Juri Linkov + + * lisp/tab-bar.el: Don't use 'minibuffer-selected-window' (bug#62427). + + (tab-bar-select-tab, tab-bar-new-tab-to): + Use 'window-minibuffer-p' instead of 'minibuffer-selected-window'. + And switch to 'get-mru-window' instead of 'minibuffer-selected-window'. + +2023-05-19 Juri Linkov + + Split windows horizontally in places that use split to create a new window. + + * lisp/tab-bar.el (tab-bar-new-tab-to): + * lisp/window.el (window-state-put): + To create a new window, split horizontally instead of vertically. + Use 'window-safe-min-width' for the SIZE arg of 'split-window'. + (bug#62592) + +2023-05-18 Yuan Fu + + Fix tree-sitter test (bug#63481) + + * test/src/treesit-tests.el (treesit-basic-parsing): Latest json + parser doesn't return an error on empty buffer or multiple objects + anymore [1]. + + https://github.com/tree-sitter/tree-sitter-json/commit/40a81c01a40ac48744e0c8ccabbaba1920441199 + +2023-05-18 Aaron Jensen + + Attempt to fix redisplay problems on macOS + + * src/nsterm.m (ns_scroll_run): Attempt to fix redisplay + artifacts. (Bug#63187) + +2023-05-18 Jens Schmidt (tiny change) + + Clarify misleading comment in isearch.el + + Clarify a misleading comment in isearch.el as to whether frame events + should exit an isearch or not (Bug#62032, Bug#41338 for background + information). + * lisp/isearch.el (isearch-mode-map): Replace the misleading comment. + (Bug#62032) + +2023-05-18 Eli Zaretskii + + Improve documentation of package-menu commands + + * doc/emacs/package.texi (Package Menu): Document that some + package-menu filters accept lists of values interactively. + + * lisp/emacs-lisp/package.el (package-menu-execute) + (package-menu-hide-package, package-menu-describe-package) + (package-menu-mark-delete, package-menu-mark-install) + (package-menu-mark-unmark, package-menu-backup-unmark) + (package-menu-quick-help, package-menu-get-status) + (package-menu--find-upgrades, package-menu-mark-upgrades) + (package-menu-filter-by-archive) + (package-menu-filter-by-description) + (package-menu-filter-by-keyword) + (package-menu-filter-by-name-or-description) + (package-menu-filter-by-name, package-menu-filter-by-status) + (package-menu-filter-by-version, package-menu-filter-marked) + (package-menu-describe-package): Doc fixes. + +2023-05-17 Basil L. Contovounesios + + Fix M-x completion-predicate under python-ts-mode + + * lisp/progmodes/python.el (python--completion-predicate) + (python-shell--completion-predicate): Filter M-x completion based on + python-base-mode instead of python-mode. This allows for + python-ts-mode as well (bug#63552). + +2023-05-17 Andrea Corallo + + * Account for `byte-compile-warnings' during native compilation (bug#63302). + + * lisp/emacs-lisp/comp.el (comp-final, comp-run-async-workers): + Forward `byte-compile-warnings' to child processes. + +2023-05-16 Philip Kaludercic + + Avoid duplicate VC packages in 'package-selected-packages' + + * lisp/emacs-lisp/package-vc.el (package-vc--unpack-1): Check if + 'package-selected-packages' already contains the package name. + (bug#63338) + +2023-05-15 Juri Linkov + + * lisp/tab-bar.el (tab-bar-new-tab-to): Set 'window-side' to nil (bug#62427). + + This is still needed for the case when tab-bar-new-tab-choice is 'window'. + +2023-05-14 Kyle Meyer + + Update to Org 9.6.6 + +2023-05-14 Eli Zaretskii + + Bump Emacs version for next pretest + + * README: + * configure.ac: + * nt/README.W32: + * msdos/sed2v2.inp: Bump Emacs version to 29.0.91. + 2023-05-14 Gabriel do Nascimento Ribeiro Ignore current-prefix-arg in async-shell-command @@ -115654,7 +116651,7 @@ This file records repository revisions from commit f2ae39829812098d8269eafbc0fcb98959ee5bb7 (exclusive) to -commit ce7d18cbc07886b0d62110a6d26e25271017cd2a (inclusive). +commit 8f62e7b85f69bb4026e9cf2971668b0d77077792 (inclusive). See ChangeLog.3 for earlier changes. ;; Local Variables: diff --git a/etc/AUTHORS b/etc/AUTHORS index 05c6ac03bac..9bd490dd3f8 100644 --- a/etc/AUTHORS +++ b/etc/AUTHORS @@ -9,7 +9,7 @@ Aaron Ecay: changed ob-R.el ob-core.el org-src.el ox-latex.el nsterm.m ob-awk.el ob-exp.el ob-python.el ob-tangle.el org-bibtex.el org-id.el org.el org.texi package.el paren.el -Aaron Jensen: changed frameset.el nsterm.m xdisp-tests.el xdisp.c +Aaron Jensen: changed nsterm.m frameset.el xdisp-tests.el xdisp.c Info.plist.in flyspell.el icomplete.el mouse.el server.el systhread.c w32term.c xterm.c @@ -297,7 +297,7 @@ Andrea Corallo: wrote comp-cstr-tests.el comp-cstr.el comp-tests.el comp.el and changed comp.c pdumper.c lread.c bytecomp.el startup.el configure.ac comp.h loadup.el lisp.h data.c alloc.c emacs.c .gitlab-ci.yml - cl-macs.el nadvice.el comp-test-funcs.el elisp-mode.el lisp/Makefile.in + cl-macs.el elisp-mode.el nadvice.el comp-test-funcs.el lisp/Makefile.in subr.el Makefile.in advice.el and 70 other files André A. Gomes: changed ispell.el @@ -347,7 +347,7 @@ Andreas Rottmann: changed emacsclient.1 emacsclient.c misc.texi server.el Andreas Schwab: changed configure.ac lisp.h xdisp.c process.c alloc.c coding.c Makefile.in emacs.c files.el fileio.c keyboard.c fns.c lread.c xterm.c src/Makefile.in editfns.c print.c eval.c font.c xfns.c sysdep.c - and 662 other files + and 663 other files Andreas Seltenreich: changed nnweb.el gnus.texi message.el gnus-sum.el gnus.el nnslashdot.el gnus-srvr.el gnus-util.el mm-url.el mm-uu.el @@ -577,10 +577,9 @@ Bartosz Duszel: changed allout.el bib-mode.el cc-cmds.el hexl.el icon.el xscheme.el Basil L. Contovounesios: changed simple.el subr.el message.el eww.el - custom.el bibtex.el text.texi gnus-sum.el modes.texi customize.texi - files.texi gnus-group.el gnus-win.el gravatar.el internals.texi json.el - map.el shr.el subr-tests.el window.c battery-tests.el - and 324 other files + modes.texi custom.el text.texi bibtex.el gnus-sum.el internals.texi + customize.texi display.texi files.texi gnus-group.el gnus-win.el + gnus.texi gravatar.el js.el json.el map.el shr.el and 345 other files Bastian Beischer: changed semantic/complete.el calc-yank.el include.el mru-bookmark.el refs.el senator.el @@ -1191,7 +1190,7 @@ Daniel Martín: changed c-ts-mode.el nsterm.m shortdoc.el ns-win.el simple.el diff-mode-tests.el erc.texi files.el files.texi indent.erts msdos-xtra.texi progmodes/python.el search.texi .lldbinit basic.texi c-ts-mode-tests.el cmacexp.el compilation.txt compile-tests.el - compile.texi configure.ac and 42 other files + compile.texi configure.ac and 43 other files Daniel McClanahan: changed lisp-mode.el @@ -1663,7 +1662,7 @@ and co-wrote help-tests.el and changed xdisp.c display.texi w32.c msdos.c simple.el w32fns.c files.el fileio.c keyboard.c emacs.c text.texi w32term.c dispnew.c configure.ac frames.texi w32proc.c files.texi xfaces.c window.c - dispextern.h lisp.h and 1327 other files + dispextern.h lisp.h and 1329 other files Eliza Velasquez: changed server.el @@ -2687,6 +2686,8 @@ and changed mml-sec.el gnus-util.el message.texi mml-smime.el mml1991.el Jens Petersen: wrote find-func.el and changed mule-cmds.el pcmpl-rpm.el +Jens Schmidt: changed plstore.el comint.el gnus.texi isearch.el ldap.el + Jens Toivo Berger Thielemann: changed word-help.el Jens-Ulrik Holger Petersen: changed cus-edit.el ffap.el find-func.el @@ -3121,7 +3122,7 @@ Juri Linkov: wrote compose.el emoji.el files-x.el misearch.el repeat-tests.el replace-tests.el tab-bar-tests.el tab-bar.el tab-line.el and changed isearch.el simple.el info.el replace.el dired.el dired-aux.el - minibuffer.el progmodes/grep.el subr.el window.el vc.el mouse.el + minibuffer.el progmodes/grep.el window.el subr.el vc.el mouse.el outline.el diff-mode.el repeat.el image-mode.el files.el menu-bar.el search.texi startup.el progmodes/compile.el and 472 other files @@ -3584,7 +3585,7 @@ Lin Sun: changed calc.el package.el Lin Zhou: changed w32fns.c w32term.h -Liu Hui: changed eglot.el +Liu Hui: changed eglot.el pcmpl-linux.el Lixin Chin: changed bibtex.el @@ -3962,7 +3963,7 @@ Mattias Engdegård: changed byte-opt.el rx.el bytecomp.el bytecomp-tests.el rx-tests.el searching.texi fns.c subr.el bytecode.c eval.c calc-tests.el lread.c progmodes/compile.el lisp.h files.el fns-tests.el print.c autorevert.el gdb-mi.el alloc.c - regex-emacs-tests.el and 675 other files + regex-emacs-tests.el and 677 other files Mattias M: changed asm-mode-tests.el asm-mode.el @@ -4006,9 +4007,9 @@ Michael Albinus: wrote autorevert-tests.el dbus-tests.el dbus.el and co-wrote tramp-cache.el tramp-sh.el tramp.el and changed tramp.texi tramp-adb.el trampver.el trampver.texi dbusbind.c files.el ange-ftp.el files.texi file-notify-tests.el dbus.texi - gitlab-ci.yml autorevert.el tramp-fish.el kqueue.c os.texi - Dockerfile.emba tramp-gw.el test/Makefile.in README shell.el - tramp-imap.el and 308 other files + gitlab-ci.yml autorevert.el tramp-fish.el kqueue.c Dockerfile.emba + os.texi tramp-gw.el test/Makefile.in README shell.el files-x.el + and 308 other files Michael Ben-Gershon: changed acorn.h configure.ac riscix1-1.h riscix1-2.h unexec.c @@ -4254,7 +4255,8 @@ Mon Key: changed animate.el imap.el syntax.el Morgan J. Smith: changed gnus-group-tests.el -Morgan Smith: changed image-dired.el vc-git.el window.el +Morgan Smith: changed image-dired.el minibuffer-tests.el minibuffer.el + vc-git.el window.el Morten Welinder: wrote [many MS-DOS files] arc-mode.el desktop.el dosfns.c internal.el msdos.h pc-win.el @@ -4936,8 +4938,8 @@ Randall Smith: changed dired.el Randal Schwartz: wrote pp.el -Randy Taylor: changed build.sh eglot.el batch.sh rust-ts-mode.el - dockerfile-ts-mode.el go-ts-mode.el c-ts-mode.el cmake-ts-mode.el +Randy Taylor: changed build.sh eglot.el batch.sh dockerfile-ts-mode.el + rust-ts-mode.el go-ts-mode.el c-ts-mode.el cmake-ts-mode.el cus-theme.el font-lock.el java-ts-mode.el js.el json-ts-mode.el modes.texi progmodes/python.el project.el sh-script.el typescript-ts-mode.el yaml-ts-mode.el @@ -5084,10 +5086,10 @@ Robert P. Goldman: changed org.texi ob-exp.el org.el ox-latex.el Robert Pluim: wrote nsm-tests.el and changed configure.ac process.c blocks.awk keymap.el font.c - network-stream-tests.el processes.texi custom.texi ftfont.c gtkutil.c - process-tests.el vc-git.el emoji-zwj.awk terminal.c unicode + network-stream-tests.el processes.texi custom.texi emoji-zwj.awk + ftfont.c gtkutil.c process-tests.el unicode vc-git.el terminal.c char-fold.el gnutls.el keymaps.texi network-stream.el nsm.el nsterm.m - and 188 other files + and 191 other files Robert Thorpe: changed cus-start.el indent.el rmail.texi @@ -5484,8 +5486,8 @@ Skip Collins: changed w32fns.c w32term.c w32term.h Sławomir Nowaczyk: changed emacs.py progmodes/python.el TUTORIAL.pl flyspell.el ls-lisp.el w32proc.c -Spencer Baugh: changed data-tests.el alloc.c autorevert.el mini.texi - minibuffer.el processes.texi +Spencer Baugh: changed data-tests.el minibuffer.el alloc.c autorevert.el + mini.texi processes.texi Spencer Thomas: changed dabbrev.el emacsclient.c gnus.texi server.el unexcoff.c @@ -5530,7 +5532,7 @@ and co-wrote font-lock.el gitmerge.el pcvs.el and changed subr.el simple.el keyboard.c bytecomp.el cl-macs.el files.el lisp.h vc.el xdisp.c alloc.c eval.c buffer.c sh-script.el progmodes/compile.el tex-mode.el keymap.c window.c help-fns.el lread.c - lisp-mode.el newcomment.el and 1660 other files + lisp-mode.el package.el and 1660 other files Stefano Facchini: changed gtkutil.c @@ -6436,7 +6438,7 @@ Zoran Milojevic: changed avoid.el Дядов Васил Стоянов: changed org-docview.el -Йордан Миладинов: changed cyrillic.el +Йордан Миладинов: changed cyrillic.el go-ts-mode.el rust-ts-mode.el समीर सिंह Sameer Singh: wrote indonesian.el misc-lang.el philippine.el and changed fontset.el HELLO language/indian.el quail/indian.el loadup.el From 6f211bc57b922d55c9452bbfa7d01e50e82da25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Mon, 19 Jun 2023 23:31:03 +0100 Subject: [PATCH 02/14] Eglot: again fix positions of coinciding inlay hint overlays (bug#64101) This bug originated from the previous fix, and is reproducible on non Mac OS platforms, as long as the very latest version (at time of writing) of the rust-analyzer server is used. * lisp/progmodes/eglot.el (eglot--update-hints-1): Reverse priorities when pegging overlays after (i.e. when before-string is used). --- lisp/progmodes/eglot.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 352a6ffd6b0..00f2e547e05 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -3644,7 +3644,7 @@ If NOERROR, return predicate, else erroring function." (if peg-after-p (make-overlay (point) (1+ (point)) nil t) (make-overlay (1- (point)) (point) nil nil nil))) - (do-it (label lpad rpad i) + (do-it (label lpad rpad i n) (let* ((firstp (zerop i)) (tweak-cursor-p (and firstp peg-after-p)) (ov (make-ov)) @@ -3657,18 +3657,18 @@ If NOERROR, return predicate, else erroring function." (1 'eglot-type-hint-face) (2 'eglot-parameter-hint-face) (_ 'eglot-inlay-hint-face)))) - (overlay-put ov 'priority i) + (overlay-put ov 'priority (if peg-after-p i (- n i))) (overlay-put ov 'eglot--inlay-hint t) (overlay-put ov 'evaporate t) (overlay-put ov 'eglot--overlay t)))) - (if (stringp label) (do-it label left-pad right-pad 0) + (if (stringp label) (do-it label left-pad right-pad 0 1) (cl-loop for i from 0 for ldetail across label do (eglot--dbind ((InlayHintLabelPart) value) ldetail (do-it value (and (zerop i) left-pad) (and (= i (1- (length label))) right-pad) - i))))))))) + i (length label)))))))))) (jsonrpc-async-request (eglot--current-server-or-lose) :textDocument/inlayHint From 2591eb1190a24074357a2f178bc02ddc86c94b43 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 20 Jun 2023 15:31:57 +0300 Subject: [PATCH 03/14] Improve documentation of 'minibuffer-message' * doc/lispref/minibuf.texi (Minibuffer Misc): Clarify that 'minibuffer-message' behaves like 'message' if called from a buffer that is not a minibuffer. * lisp/minibuffer.el (minibuffer-message) (set-minibuffer-message, clear-minibuffer-message): Doc fixes. (Bug#64165) --- doc/lispref/minibuf.texi | 24 +++++++++++++++++------- lisp/minibuffer.el | 24 +++++++++++++++++------- 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 9a386ff310d..52eea3b9535 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -2805,13 +2805,23 @@ minibuffer window, it returns @code{nil}. @vindex minibuffer-message-timeout @defun minibuffer-message string &rest args -This function displays @var{string} temporarily at the end of the -minibuffer text, for a few seconds, or until the next input event -arrives, whichever comes first. The variable -@code{minibuffer-message-timeout} specifies the number of seconds to -wait in the absence of input. It defaults to 2. If @var{args} is -non-@code{nil}, the actual message is obtained by passing @var{string} -and @var{args} through @code{format-message}. @xref{Formatting Strings}. +This function is like @code{message} (@pxref{Displaying Messages}), +but it displays the messages specially when the user types in the +minibuffer, typically because Emacs prompted the user for some input. +When the minibuffer is the current buffer, this function displays the +message specified by @var{string} temporarily at the end of the +minibuffer text, and thus avoids hiding the minibuffer text by the +echo-area display of the message. It leaves the message on display +for a few seconds, or until the next input event arrives, whichever +comes first. The variable @code{minibuffer-message-timeout} specifies +the number of seconds to wait in the absence of input. It defaults to +2. If @var{args} is non-@code{nil}, the actual message is obtained by +passing @var{string} and @var{args} through @code{format-message}. +@xref{Formatting Strings}. + +If called when the minibuffer is not the current buffer, this function +just calls @code{message}, and thus @var{string} will be shown in the +echo-area. @end defun @deffn Command minibuffer-inactive-mode diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 41eb95fd20f..4aa1ab3e890 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -715,11 +715,21 @@ for use at QPOS." "Text properties added to the text shown by `minibuffer-message'.") (defun minibuffer-message (message &rest args) - "Temporarily display MESSAGE at the end of the minibuffer. -The text is displayed for `minibuffer-message-timeout' seconds, -or until the next input event arrives, whichever comes first. -Enclose MESSAGE in [...] if this is not yet the case. -If ARGS are provided, then pass MESSAGE through `format-message'." + "Temporarily display MESSAGE at the end of minibuffer text. +This function is designed to be called from the minibuffer, i.e., +when Emacs prompts the user for some input, and the user types +into the minibuffer. If called when the current buffer is not +the minibuffer, this function just calls `message', and thus +displays MESSAGE in the echo-area. +When called from the minibuffer, this function displays MESSAGE +at the end of minibuffer text for `minibuffer-message-timeout' +seconds, or until the next input event arrives, whichever comes first. +It encloses MESSAGE in [...] if it is not yet enclosed. +The intent is to show the message without hiding what the user typed. +If ARGS are provided, then the function first passes MESSAGE +through `format-message'. +If some of the minibuffer text has the `minibuffer-message' text +property, MESSAGE is shown at that position instead of EOB." (if (not (minibufferp (current-buffer) t)) (progn (if args @@ -796,7 +806,7 @@ The minibuffer message functions include `minibuffer-message' and (next-single-property-change pt 'minibuffer-message nil (point-max))))) (defun set-minibuffer-message (message) - "Temporarily display MESSAGE at the end of the minibuffer. + "Temporarily display MESSAGE at the end of the active minibuffer window. If some part of the minibuffer text has the `minibuffer-message' property, the message will be displayed before the first such character, instead of at the end of the minibuffer. @@ -954,7 +964,7 @@ is at its default value `grow-only'." multi-message-separator))) (defun clear-minibuffer-message () - "Clear minibuffer message. + "Clear message temporarily shown in the minibuffer. Intended to be called via `clear-message-function'." (when (not noninteractive) (when (timerp minibuffer-message-timer) From 7637e361d3baeefc7e6ab147ccfccfcc774dcd01 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 20 Jun 2023 16:35:09 +0300 Subject: [PATCH 04/14] Don't truncate filenames with "emacs.el" in them * lisp/emacs-lisp/find-func.el (find-function-search-for-symbol): Avoid false positives when looking for "emacs.el" matches the likes of "emacs.elpa". (Bug#64143) --- lisp/emacs-lisp/find-func.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index f9f919afb1b..bf890fc35a9 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -407,7 +407,7 @@ The search is done in the source for library LIBRARY." (setq library (substring library 0 (match-beginning 1)))) ;; Strip extension from .emacs.el to make sure symbol is searched in ;; .emacs too. - (when (string-match "\\.emacs\\(.el\\)" library) + (when (string-match "\\.emacs\\(.el\\)\\'" library) (setq library (substring library 0 (match-beginning 1)))) (let* ((filename (find-library-name library)) (regexp-symbol (cdr (assq type find-function-regexp-alist)))) From 2bad5829ff76538774676f7274f40ce7baf04c73 Mon Sep 17 00:00:00 2001 From: Filipp Gunbin Date: Tue, 20 Jun 2023 18:25:24 +0300 Subject: [PATCH 05/14] Revert "Fix parsing of dn line if WITHDN is non-nil" This reverts commits 71b27779a9a and d2246b26275, because they change the return value of "ldap-search" in an incompatible way. The fix (a different one) will be done on master instead (bug#64089). --- lisp/net/ldap.el | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 8897c3b6d54..78405414a28 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -703,17 +703,7 @@ an alist of attribute/value pairs." (while (progn (skip-chars-forward " \t\n") (not (eobp))) - ;; Ignore first (dn) line if WITHDN equals nil. If WITHDN - ;; is non-nil, check syntax of the line and split it into a - ;; pair as expected by `ldap-decode-attribute' (Bug#64089). - ;; If the syntax is wrong, better throw an error here, since - ;; otherwise `ldap-decode-attribute' would throw a much less - ;; comprehensible error later. - (cond ((not withdn)) - ((looking-at "dn[=:\t ]+\\(.*\\)$") - (setq dn (list "dn" (match-string 1)))) - (t (error "Incorrect dn line \"%s\" in ldapsearch result" - (buffer-substring (point) (line-end-position))))) + (setq dn (buffer-substring (point) (line-end-position))) (forward-line 1) (while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\ \\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\ From a0ccf1859cc636998403c52cb25d5aaf43744d47 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 21 Jun 2023 16:10:52 +0300 Subject: [PATCH 06/14] Disable target-async by default in gdb-mi.el * lisp/progmodes/gdb-mi.el (gdb-non-stop-setting): Disable until bug#63084 is fixed. (Bug#64186) --- lisp/progmodes/gdb-mi.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 27f04e07e80..4ad73823b64 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -453,7 +453,9 @@ valid signal handlers.") (const :tag "Unlimited" nil)) :version "22.1") -(defcustom gdb-non-stop-setting (not (eq system-type 'windows-nt)) +;; This is disabled by default because we don't really support +;; asynchronous execution of the debuggee; see bug#63084. FIXME. +(defcustom gdb-non-stop-setting nil "If non-nil, GDB sessions are expected to support the non-stop mode. When in the non-stop mode, stopped threads can be examined while other threads continue to execute. @@ -468,7 +470,7 @@ don't support the non-stop mode. GDB session needs to be restarted for this setting to take effect." :type 'boolean :group 'gdb-non-stop - :version "26.1") + :version "29.1") (defcustom gdb-debuginfod-enable-setting ;; debuginfod servers are only for ELF executables, and elfutils, of From 4ca371e9cc7178572cc25cbe47371c0075405ff7 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Wed, 21 Jun 2023 14:23:14 +0000 Subject: [PATCH 07/14] Fix bug#64152 (Minibuffer sometimes goes "modal") In particular, when a frame has no minibuffer and is using that of a different "normal" frame, C-x 5 o, etc., and GUI operations fail. Fix by partially reverting the commit from 2022-07-07 15:38:09 +0000 "Remove obscure, obsolete code from do_switch_frame". As a consequent change, also revert the commit from 2022-07-08 20:19:03 +0000 "Remove now unused parameter TRACK from do_switch_frame". * src/frame.c (do_switch_frame): Restore the TRACK parameter. Restore the code which redirects the frame focus when a new frame gets selected. * src/frame.c (Fselect_frame, Fhandle_switch_frame) (delete_frame) * src/keyboard.c (quit_throw_to_read_char) * src/lisp.h (do_switch_frame prototype) * src/minibuf.c (read_minibuf_unwind) * src/window.c (Fset_window_configuration): Restore the TRACK argument to do_switch_frame. * src/xterm.c (x_try_restore_frame): Add a zero TRACK argument to do_switch_frame. --- src/frame.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- src/keyboard.c | 2 +- src/lisp.h | 2 +- src/minibuf.c | 6 +++--- src/window.c | 2 +- src/xterm.c | 2 +- 6 files changed, 53 insertions(+), 11 deletions(-) diff --git a/src/frame.c b/src/frame.c index 38a6583605c..fc6a3459482 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1444,6 +1444,10 @@ affects all frames on the same terminal device. */) If FRAME is a switch-frame event `(switch-frame FRAME1)', use FRAME1 as frame. + If TRACK is non-zero and the frame that currently has the focus + redirects its focus to the selected frame, redirect that focused + frame's focus to FRAME instead. + FOR_DELETION non-zero means that the selected frame is being deleted, which includes the possibility that the frame's terminal is dead. @@ -1451,7 +1455,7 @@ affects all frames on the same terminal device. */) The value of NORECORD is passed as argument to Fselect_window. */ Lisp_Object -do_switch_frame (Lisp_Object frame, int for_deletion, Lisp_Object norecord) +do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object norecord) { struct frame *sf = SELECTED_FRAME (), *f; @@ -1473,6 +1477,44 @@ do_switch_frame (Lisp_Object frame, int for_deletion, Lisp_Object norecord) else if (f == sf) return frame; + /* If the frame with GUI focus has had it's Emacs focus redirected + toward the currently selected frame, we should change the + redirection to point to the newly selected frame. This means + that if the focus is redirected from a minibufferless frame to a + surrogate minibuffer frame, we can use `other-window' to switch + between all the frames using that minibuffer frame, and the focus + redirection will follow us around. This code is necessary when + we have a minibufferless frame using the MB in another (normal) + frame (bug#64152) (ACM, 2023-06-20). */ +#ifdef HAVE_WINDOW_SYSTEM + if (track && FRAME_WINDOW_P (f) && FRAME_TERMINAL (f)->get_focus_frame) + { + Lisp_Object gfocus; /* The frame which still has focus on the + current terminal, according to the GUI + system. */ + Lisp_Object focus; /* The frame to which Emacs has redirected + the focus from `gfocus'. This might be a + frame with a minibuffer when `gfocus' + doesn't have a MB. */ + + gfocus = FRAME_TERMINAL (f)->get_focus_frame (f); + if (FRAMEP (gfocus)) + { + focus = FRAME_FOCUS_FRAME (XFRAME (gfocus)); + if (FRAMEP (focus) && XFRAME (focus) == SELECTED_FRAME ()) + /* Redirect frame focus also when FRAME has its minibuffer + window on the selected frame (see Bug#24500). + + Don't do that: It causes redirection problem with a + separate minibuffer frame (Bug#24803) and problems + when updating the cursor on such frames. + || (NILP (focus) + && EQ (FRAME_MINIBUF_WINDOW (f), sf->selected_window))) */ + Fredirect_frame_focus (gfocus, frame); + } + } +#endif /* HAVE_X_WINDOWS */ + if (!for_deletion && FRAME_HAS_MINIBUF_P (sf)) resize_mini_window (XWINDOW (FRAME_MINIBUF_WINDOW (sf)), 1); @@ -1574,7 +1616,7 @@ This function returns FRAME, or nil if FRAME has been deleted. */) /* Do not select a tooltip frame (Bug#47207). */ error ("Cannot select a tooltip frame"); else - return do_switch_frame (frame, 0, norecord); + return do_switch_frame (frame, 1, 0, norecord); } DEFUN ("handle-switch-frame", Fhandle_switch_frame, @@ -1590,7 +1632,7 @@ necessarily represent user-visible input focus. */) kset_prefix_arg (current_kboard, Vcurrent_prefix_arg); run_hook (Qmouse_leave_buffer_hook); - return do_switch_frame (event, 0, Qnil); + return do_switch_frame (event, 0, 0, Qnil); } DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0, @@ -2108,7 +2150,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) Fraise_frame (frame1); #endif - do_switch_frame (frame1, 1, Qnil); + do_switch_frame (frame1, 0, 1, Qnil); sf = SELECTED_FRAME (); } else diff --git a/src/keyboard.c b/src/keyboard.c index b1ccf4acde4..99f886821e2 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11561,7 +11561,7 @@ quit_throw_to_read_char (bool from_signal) if (FRAMEP (internal_last_event_frame) && !EQ (internal_last_event_frame, selected_frame)) do_switch_frame (make_lispy_switch_frame (internal_last_event_frame), - 0, Qnil); + 0, 0, Qnil); sys_longjmp (getcjmp, 1); } diff --git a/src/lisp.h b/src/lisp.h index 9c02d975a74..bf91a1559bf 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4878,7 +4878,7 @@ extern void syms_of_indent (void); /* Defined in frame.c. */ extern void store_frame_param (struct frame *, Lisp_Object, Lisp_Object); extern void store_in_alist (Lisp_Object *, Lisp_Object, Lisp_Object); -extern Lisp_Object do_switch_frame (Lisp_Object, int, Lisp_Object); +extern Lisp_Object do_switch_frame (Lisp_Object, int, int, Lisp_Object); extern Lisp_Object get_frame_param (struct frame *, Lisp_Object); extern void frames_discard_buffer (Lisp_Object); extern void init_frame_once (void); diff --git a/src/minibuf.c b/src/minibuf.c index bcb7eb9375d..6e54d8c3ba5 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1125,8 +1125,8 @@ read_minibuf_unwind (void) found: if (!EQ (exp_MB_frame, saved_selected_frame) && !NILP (exp_MB_frame)) - do_switch_frame (exp_MB_frame, 0, Qt); /* This also sets - minibuf_window */ + do_switch_frame (exp_MB_frame, 0, 0, Qt); /* This also sets + minibuf_window */ /* To keep things predictable, in case it matters, let's be in the minibuffer when we reset the relevant variables. Don't depend on @@ -1238,7 +1238,7 @@ read_minibuf_unwind (void) /* Restore the selected frame. */ if (!EQ (exp_MB_frame, saved_selected_frame) && !NILP (exp_MB_frame)) - do_switch_frame (saved_selected_frame, 0, Qt); + do_switch_frame (saved_selected_frame, 0, 0, Qt); } /* Replace the expired minibuffer in frame exp_MB_frame with the next less diff --git a/src/window.c b/src/window.c index 0efd6813f8d..1dc977626b3 100644 --- a/src/window.c +++ b/src/window.c @@ -7399,7 +7399,7 @@ the return value is nil. Otherwise the value is t. */) do_switch_frame (NILP (dont_set_frame) ? data->selected_frame : old_frame - , 0, Qnil); + , 0, 0, Qnil); } FRAME_WINDOW_CHANGE (f) = true; diff --git a/src/xterm.c b/src/xterm.c index e981a36fa9c..5840b15bcb7 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -25792,7 +25792,7 @@ x_try_restore_frame (void) FOR_EACH_FRAME (tail, frame) { - if (!NILP (do_switch_frame (frame, 1, Qnil))) + if (!NILP (do_switch_frame (frame, 0, 1, Qnil))) return; } } From e962cf4ba726943b0f4ea57e1d740742e7618e3a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 22 Jun 2023 14:03:17 +0300 Subject: [PATCH 08/14] Fix building --with-native-compilation=aot from release tarball * lisp/Makefile.in (%.eln): Pattern rule for AOT native compilation. (compile-eln-targets, compile-eln-aot): New targets for AOT native compilation. * src/Makefile.in (../native-lisp): If NATIVE_COMPILATION_AOT is set, also native-compile all the other Lisp files. (Bug#64167) --- lisp/Makefile.in | 36 ++++++++++++++++++++++++++++++++++++ src/Makefile.in | 8 ++++++++ 2 files changed, 44 insertions(+) diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 1e0935f565f..0a534a278f7 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -436,6 +436,42 @@ ifeq ($(HAVE_NATIVE_COMP),yes) $(emacs) -l comp -f comp-compile-all-trampolines endif +.PHONY: compile-eln-targets compile-eln-aot + +# ELNDONE is defined by ../src/Makefile, as the list of preloaded +# *.eln files, which are therefore already compiled by the time +# compile-eln-aot is called. +ifeq ($(NATIVE_COMPILATION_AOT),yes) +%.eln: %.el + $(AM_V_ELN)$(emacs) $(BYTE_COMPILE_FLAGS) \ + -l comp -f byte-compile-refresh-preloaded \ + --eval '(batch-native-compile t)' $< + +compile-eln-targets: $(filter-out $(ELNDONE),$(TARGETS)) +else +compile-eln-targets: +endif + +# This is called from ../src/Makefile when building a release tarball +# configured --with-native-compilation=aot. +compile-eln-aot: + @(cd $(lisp) && \ + els=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \ + for el in $$els; do \ + test -f $$el || continue; \ + test -f $${el}c || continue; \ + GREP_OPTIONS= grep '^;.*[^a-zA-Z]no-byte-compile: *t' $$el > /dev/null && \ + continue; \ + GREP_OPTIONS= grep '^;.*[^a-zA-Z]no-native-compile: *t' $$el > /dev/null && \ + continue; \ + echo "$${el}n"; \ + done | xargs $(XARGS_LIMIT) echo) | \ + while read chunk; do \ + $(MAKE) compile-eln-targets \ + TARGETS="$$chunk" ELNDONE="$(ELNDONE)"; \ + done + + .PHONY: backup-compiled-files compile-after-backup # Backup compiled Lisp files in elc.tar.gz. If that file already diff --git a/src/Makefile.in b/src/Makefile.in index c29c3750e59..9bc53c072ea 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -872,6 +872,11 @@ elnlisp := $(addprefix ${lispsource}/,${elnlisp}) $(lisp:.elc=.eln) ## native-lisp where the *.eln files will be produced, and the exact ## names of those *.eln files, cannot be known in advance; we must ask ## Emacs to produce them. +## If AOT native compilation is requested, we additionally +## native-compile all the *.el files in ../lisp that need to be +## compiled and haven't yet been compiled. ELDONE holds the list +## of *.el files that were already native-compiled. +NATIVE_COMPILATION_AOT = @NATIVE_COMPILATION_AOT@ ../native-lisp: | $(pdmp) @if test ! -d $@; then \ mkdir $@ && $(MAKE) $(AM_V_NO_PD) $(elnlisp); \ @@ -882,6 +887,9 @@ elnlisp := $(addprefix ${lispsource}/,${elnlisp}) $(lisp:.elc=.eln) --bin-dest $(BIN_DESTDIR) --eln-dest $(ELN_DESTDIR) \ && cp -f emacs$(EXEEXT) bootstrap-emacs$(EXEEXT) \ && cp -f $(pdmp) $(bootstrap_pdmp); \ + if test $(NATIVE_COMPILATION_AOT) = yes; then \ + $(MAKE) $(AM_V_NO_PD) -C ../lisp compile-eln-aot EMACS="../src/emacs$(EXEEXT)" ELNDONE="$(addprefix %,$(notdir $(elnlisp))))"; \ + fi; \ fi endif From 1f664a0af758b2d458d9c7edf063adf5de8be7c4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 22 Jun 2023 19:33:31 +0300 Subject: [PATCH 09/14] Add "nixd" LSP server to Eglot * lisp/progmodes/eglot.el (eglot-server-programs): Add "nixd". Patch by Brian Leung . (Bug#64214) --- lisp/progmodes/eglot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 00f2e547e05..890f1e91b86 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -230,7 +230,7 @@ chosen (interactively or automatically)." . ,(eglot-alternatives '("digestif" "texlab"))) (erlang-mode . ("erlang_ls" "--transport" "stdio")) ((yaml-ts-mode yaml-mode) . ("yaml-language-server" "--stdio")) - (nix-mode . ,(eglot-alternatives '("nil" "rnix-lsp"))) + (nix-mode . ,(eglot-alternatives '("nil" "rnix-lsp" "nixd"))) (gdscript-mode . ("localhost" 6008)) ((fortran-mode f90-mode) . ("fortls")) (futhark-mode . ("futhark" "lsp")) From d507aa7336b0a295a1fde1676c1606ae7f836a95 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Fri, 23 Jun 2023 15:37:04 +0200 Subject: [PATCH 10/14] Add selector_expression indentation rule * lisp/progmodes/go-ts-mode.el (go-ts-mode--indent-rules): New rule. --- lisp/progmodes/go-ts-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index 698c6424ea2..f8e65131e0c 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -79,6 +79,7 @@ ((parent-is "const_declaration") parent-bol go-ts-mode-indent-offset) ((parent-is "default_case") parent-bol go-ts-mode-indent-offset) ((parent-is "expression_case") parent-bol go-ts-mode-indent-offset) + ((parent-is "selector_expression") parent-bol go-ts-mode-indent-offset) ((parent-is "expression_switch_statement") parent-bol 0) ((parent-is "field_declaration_list") parent-bol go-ts-mode-indent-offset) ((parent-is "import_spec_list") parent-bol go-ts-mode-indent-offset) From fdc1a12ed1a2ceaebf21ec68752e85dd4527ceab Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sat, 24 Jun 2023 05:57:18 +0300 Subject: [PATCH 11/14] Fix "vc-print-log does not erase buffer" and associated problems * lisp/vc/vc.el (vc-deduce-fileset): Make sure to retain the buffer switch (if it did), bug#63949. --- lisp/vc/vc.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 1144a23f317..410fe5c01e1 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1121,10 +1121,15 @@ possible values of STATE are explained in `vc-state', and MODEL in the returned list. BEWARE: this function may change the current buffer." - (with-current-buffer (or (buffer-base-buffer) (current-buffer)) - (vc-deduce-fileset-1 not-state-changing - allow-unregistered - state-model-only-files))) + (let (new-buf res) + (with-current-buffer (or (buffer-base-buffer) (current-buffer)) + (setq res + (vc-deduce-fileset-1 not-state-changing + allow-unregistered + state-model-only-files)) + (setq new-buf (current-buffer))) + (set-buffer new-buf) + res)) (defun vc-deduce-fileset-1 (not-state-changing allow-unregistered From 679e9d7c56e2296e3a218290d941e28002bf7722 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 24 Jun 2023 10:23:07 +0300 Subject: [PATCH 12/14] ; Mention MinGW64 GCC 13.1 problems in PROBLEMS * etc/PROBLEMS: Mention the problems building with MinGW64 GCC 13.1. (Bug#63365) --- etc/PROBLEMS | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index e5baa8ee18a..80b3b9945c4 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -3422,6 +3422,39 @@ See https://lists.gnu.org/r/emacs-devel/2010-07/msg01266.html +*** Building the MS-Windows port with native compilation fails + +This is known to happen when using MinGW64 GCC 13.1, and seems to +affect byte-compilation: the built Emacs crashes while byte-compiling +some Lisp files. (This doesn't happen when building a release +tarball, because all the Lisp files are already byte-compiled there, +but then Emacs could crash later when you use it to byte-compile your +or third-party Lisp packages.) + +The reason seems to be specific to MS-Windows or the MinGW64 port of +GCC 13.1, and is somehow related to optimizations in this GCC version. +There are several known workarounds: + + . Use non-default optimization flags. For example, configuring the + build like this will avoid the problem: + + CFLAGS='-O1 -gdwarf-4 -g3' ./configure ... + + (replace the ellipsis "..." with the rest of 'configure' options + and arguments). + + . Prevent GCC from performing a specific optimization: + + CFLAGS='-O2 -gdwarf-4 -g3 -fno-optimize-sibling-calls' ./configure ... + + This is actually a variant of the previous workaround, except that + it allows you to have almost the full set of optimizations used by + -O2. + + . Downgrade to GCC 12.x. + + . Build Emacs without native compilation. + *** Building the native MS-Windows port fails due to unresolved externals The linker error messages look like this: From fa06249a9fbb0b0b67eb0d88cdb70b61723e67ed Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 24 Jun 2023 11:49:14 +0300 Subject: [PATCH 13/14] Fix "C-x RET r" when the new encoding is UTF * src/fileio.c (Finsert_file_contents): Update point of 'conversion_buffer' before decoding the last block. (Bug#64253) --- src/fileio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fileio.c b/src/fileio.c index b50b3c6b935..995e4142f58 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4463,6 +4463,8 @@ by calling `format-decode', which see. */) if (unprocessed > 0) { + BUF_TEMP_SET_PT (XBUFFER (conversion_buffer), + BUF_Z (XBUFFER (conversion_buffer))); coding.mode |= CODING_MODE_LAST_BLOCK; decode_coding_c_string (&coding, (unsigned char *) read_buf, unprocessed, conversion_buffer); From d0147ff9e507cc4e99e0574eab106f95c8e9df1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Fri, 23 Jun 2023 19:42:44 +0200 Subject: [PATCH 14/14] * lisp/emacs-lisp/shortdoc.el: More and better `substring` examples. Suggested by Juri Linkov. --- lisp/emacs-lisp/shortdoc.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index c49960c2ee6..871233097a7 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -187,8 +187,10 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'), :eval (format "This number is %d" 4)) "Manipulating Strings" (substring - :eval (substring "foobar" 0 3) - :eval (substring "foobar" 3)) + :eval (substring "abcde" 1 3) + :eval (substring "abcde" 2) + :eval (substring "abcde" 1 -1) + :eval (substring "abcde" -4 4)) (string-limit :eval (string-limit "foobar" 3) :eval (string-limit "foobar" 3 t)