Eli Zaretskii [Tue, 25 Apr 2023 13:57:23 +0000 (09:57 -0400)]
Merge from origin/emacs-29
524e161a536 Followup to addition of TUTORIAL.fa 76f50df1539 Add Farsi/Persian translation of the tutorial 8eacfaea6d8 Add Mongolian language environments fe8efbb8f75 Document the 'end-session' event on MS-Windows d80f959bede Update to Org 9.6.4-9-g8eb209 98c6cfcbe4a Don't support versioned grammar libraries on MS-Windows 8f71c1546df Accept versioned tree-sitter language grammar files 99add09d5e1 tab-bar-new-tab: inhibit side-window checks 087e8181947 * etc/NEWS: Fix outline level. (Bug#63042) d7f38558c4c ; Improve font selection for Traditional Mongolian 965c5e0231c Fix rendering of Traditional Mongolian script 9a0f10b5f88 Fix line-number-at-pos when POSITION is out of narrowing 4e0f4292aaf ; * etc/tutorials/TUTORIAL: Fix punctuation. dec2ac0c657 Fix exiting Emacs after saving a tutorial
Yuan Fu [Mon, 24 Apr 2023 06:55:22 +0000 (23:55 -0700)]
Accept versioned tree-sitter language grammar files
By discussion on emacs-devel, titled "Versioned Tree-sitter parser
libraries".
* src/treesit.c (Vtreesit_str_dot_0): New variable.
(treesit_load_language_push_for_each_suffix): Additionally look for
lib_base_name.0 and lib_base_name.0.0.
(syms_of_treesit): Initialize Vtreesit_str_dot_0.
Benson Chu [Fri, 24 Mar 2023 20:38:03 +0000 (15:38 -0500)]
tab-bar-new-tab: inhibit side-window checks
Previously, calling 'tab-bar-new-tab-to' only removed the
'window-side' property on the currently selected window,
and then a call to 'delete-other-windows' was made to
ensure that the selected window was the only window.
We can skip this check by shadowing 'window--sides-inhibit-check'
to t.
* lisp/tab-bar.el (tab-bar-new-tab-to): Inhibit side-window checks.
(Bug#62427)
Jim Porter [Sun, 23 Apr 2023 18:43:07 +0000 (11:43 -0700)]
When examining merge commits in our Git hooks, only check the first parent
This does two things:
1. We can properly validate log entries in merge commits.
2. We don't check commits that were merged in from other branches.
* build-aux/git-hooks/commit-msg-files.awk (get_commit_changes): Get
the changes compared to the first parent.
* build-aux/git-hooks/pre-push: Only get the first parent of merge
commits when returning the rev-list, and only check "master" or
"emacs-NN" branches.
Jim Porter [Fri, 21 Apr 2023 17:06:49 +0000 (10:06 -0700)]
Improve the logic of the file entry Git hooks to support more cases
In addition to starting with a "*", file entries now need a ":"
somewhere in them. This helps reduce false positives with bulleted
lists. Also, support multiple files separated by commas after a "*".
* build-aux/git-hooks/commit-msg-files.awk (check_commit_msg_files):
Accumulate file entries over multiple lines to support the above.
Eli Zaretskii [Sun, 23 Apr 2023 14:04:56 +0000 (17:04 +0300)]
Fix rendering of Traditional Mongolian script
* lisp/international/characters.el: Set punctuation syntax for Po
characters from the Mongolian block
* lisp/international/fontset.el (setup-default-fontset): Add
fontset setting for Traditional Mongolic.
* lisp/language/misc-lang.el (composition-function-table): Add
rules for Traditional Mongolic. (Bug#63028)
* etc/NEWS: Add new Tramp method "flatpak". Fix typos.
* lisp/net/tramp-container.el (tramp-flatpak-program): New defcustom.
(tramp-flatpak-method): New defconst.
(tramp-flatpak--completion-function): New defun. Set it for "flatpak".
(tramp-methods) <flatpak>: Add.
(tramp-container-connection-local-default-flatpak-variables):
New defconst. Set respective connection-local variables.
Eli Zaretskii [Sat, 22 Apr 2023 16:27:16 +0000 (19:27 +0300)]
Fix line-number-at-pos when POSITION is out of narrowing
* src/fns.c (Fline_number_at_pos): Don't signal an error when
ABSOLUTE is nil and POSITION is outside of the narrowing, like the
original Lisp implementation did. Minor speedup by using the byte
position where it is available from the get-go. (Bug#62857)
Eli Zaretskii [Sat, 22 Apr 2023 10:35:36 +0000 (13:35 +0300)]
Fix exiting Emacs after saving a tutorial
* lisp/tutorial.el (tutorial--starting-point): Make it
permanent-local, so that saving the tutorial to some file doesn't
kill this buffer-local variable. Otherwise, trying to exit Emacs
after saving the tutorial will signal an error, because
'tutorial--starting-point' is void. (Bug#37326)
Add a new user option in Python mode to improve the indentation
* lisp/progmodes/python.el (python-indent-block-paren-deeper): New
user option.
(python-indent-context): Add a new context :inside-paren-from-block.
(python-indent--calculate-indentation): Modify according to
`python-indent-block-paren-deeper' and :inside-paren-from-block.
* test/lisp/progmodes/python-tests.el
(python-indent-inside-paren-block-1)
(python-indent-inside-paren-block-2)
(python-indent-inside-paren-block-3)
(python-indent-inside-paren-block-4): New tests.
(python-indent-inside-paren-5, python-indent-dedenters-8): Modify
according to the new context.
* etc/NEWS: Document the new user option. (Bug#62696)
project--read-project-buffer: Fixup default-directory if needed
* lisp/progmodes/project.el (project--read-project-buffer):
Make sure that when the read buffer is new, its default-directory
belongs to the project (bug#62974).
Eli Zaretskii [Fri, 21 Apr 2023 11:29:14 +0000 (07:29 -0400)]
Merge from origin/emacs-29
3899acbb336 ; * src/fringe.c: Fix description of large circle. (Bug#... 2b10e1827d3 sql: add missing postgresql types 9ac12592781 Fix display of menu-bar bindings of commands in *Help* bu... ecdd3a9efac Improve Completion Example section in the Emacs manual 626e1ac62b2 Improve 'message-server-alist' docstring 327986936c3 Add index entry for fallback modes 1c4783c3300 ; * etc/NEWS: Copyedits and grammar fixes. 3d6f7553319 xref-search-program-alist: Fix searching larger file list... 1b8b2cf61bd Fix typo and inaccuracy in the ELisp Reference manual df17682ebf1 ; Support 'dart-ts-mode' in Eglot e0dc60e0780 ; Fix typos in gdb-mi.el 60560cc7adf Fix description of lexical environment's internals 1456adf4248 ; Eglot: fix a typo in a customization type 2f59595f5f4 ; * etc/NEWS: Grammar fixes. 596b780ab71 Update to Org 9.6.4-2-g0f6ae7 a0b04a22479 Documentation copyedits for 'package-install-upgrade-buil... 580d8278c5f Allow upgrading built-in packages with 'package-install' 329304c23fa ; * src/term.c (init_tty): Fix last change. (Bug#62877) 200dbf7d302 Minor changes in c-ts-mode.el's support of DEFUNs 9686b015a0d Fix strike-through attribute support on TTY frames 39035fbfc5f Avoid crashes in 'describe-keymap' due to shadowing
Ruijie Yu [Mon, 6 Mar 2023 03:03:32 +0000 (11:03 +0800)]
Handle modifications in extensionless zip files (bug#61326)
* lisp/arc-mode.el (archive-*-write-file-member)
(archive-*-expunge): Refactor to correctly modify
extensionless zip archives.
(archive-expunge): Move implementation to a separate helper
function to facilitate testing.
(archive--act-files): New helper function to wrap around
`call-process' calls.
(archive--need-rename-p): New helper function to check whether
a temporary rename is necessary.
(archive--ensure-extension) (archive--maybe-rename): New helper
functions to rename archive if the caller deems it necessary.
(archive--with-ensure-extension): New helper function to handle
writing an archive while ensuring extensionless archives work
correctly by temporarily renaming them.
* test/lisp/arc-mode-tests.el (arc-mode-test-zip-ensure-ext):
New regression test for bug#61326.
Yuan Fu [Wed, 19 Apr 2023 23:23:25 +0000 (16:23 -0700)]
Fix treesit-install-language-grammar for non-interactive call
A continuation of bug#62704.
* lisp/treesit.el (treesit-install-language-grammar): Differentiate
between interactive and non-interactive call, and don't prompt when
it's called non-interactively.
Eli Zaretskii [Wed, 19 Apr 2023 17:46:40 +0000 (20:46 +0300)]
Fix display of menu-bar bindings of commands in *Help* buffers
* lisp/help-fns.el (help-fns--insert-menu-bindings): Propertize
with 'help-key-binding' face only the menu items, not the arrows
between successive items. This is because 'char-displayable-p' is
unreliable when we propertize the character with an arbitrary
face: that face could specify a font which doesn't support the
character after all, while 'char-displayable-p' assumes there are
no restrictions on fonts that can be used for displaying the
character. Also, make the code more efficient by avoiding the
call to 'char-displayable-p' inside the loop.
Improve Completion Example section in the Emacs manual
This can be a useful substitute for full-on fuzzy completion, as
provided by other completion styles and completion packages.
* doc/emacs/mini.texi (Completion Example): Give an example of
completion with point not at end of minibuffer. Also, use
@kbd{@key{TAB}} when telling the user to hit TAB. (Bug#62836)
Robert Pluim [Wed, 19 Apr 2023 07:48:02 +0000 (09:48 +0200)]
; Double space at end of sentence for vc-cvs.el
* lisp/vc/vc-cvs.el (vc-cvs-repository-hostname, vc-cvs-parse-root)
(vc-cvs-parse-status, vc-cvs-after-dir-status): Double space at end of
sentence.
* test/lisp/vc/vc-cvs-tests.el: Double space at end of sentence.
VC: Allow `vc-default-revert' (and CVS) to revert a missing file
* lisp/vc/vc.el (vc-default-revert): Fix reverting a missing file case
by not trying to create a backup through `copy-file'. Notably impacts
CVS, where `vc-cvs-revert' calls `vc-default-revert'.
VC: CVS: Fix parsing of 'cvs -qn update' for missing files for 1.12
* lisp/vc/vc-cvs.el (vc-cvs-after-dir-status): Fix the name reported
for missing files in the case of CVS 1.12.3+ where name is quoted in
the warning line (it was not before this version). Use instead the
following U line, where the name is never quoted on all versions.
The new "Root" file parsing has been based on CVS' documentation,
which gives the following format for *remote* repositories:
[:method:][[user][:password]@]hostname[:[port]]/pathname/to/repository
and for local ones:
:local:/pathname/to/repository
or
:local:c:/pathname/to/repository
or alternatively ':local:' replaced by ':fork:', or ':local:' omitted
when the path starts with a slash.
[The actual parsing code in CVS is actually a bit more restrictive.
See 'root.c'.]
Most notably, the previous version could not parse an absolute
pathname without an explicit :local: method or :pserver: lines with
passwords.
* lisp/vc/vc-cvs.el (vc-cvs-parse-root): Rewrite.
(vc-cvs-repository-hostname): Cope with `vc-cvs-parse-root' returning
an empty hostname (can only happen if the "Root" file is invalid),
returning nil in this case.
(vc-cvs-parse-uhp): Remove this standalone function formerly used only
by `vc-cvs-parse-root' and which doesn't allow correct parsing anyway.
* test/lisp/vc/vc-cvs-tests.el: New file, with tests for common "Root"
file content.
João Távora [Tue, 18 Apr 2023 23:59:17 +0000 (00:59 +0100)]
Eglot: unbreak activation/management of derived modes (bug#62907)
After recent changes to how LSP "languageId" is computed from major
modes and stored in the eglot-lsp-server object, the activation of the
'eglot--managed-mode' minor mode in modes _derived_ from some
major-mode mentioned in 'eglot-server-programs' was broken.
This commit restores that by introducing a new helper which uses the
same logic to provide the current-buffer's "languageId" to the server
and to discover if the server should manage the mode at all. This
ensures the two things stay in sync.
Also, this helper uses the function 'provided-mode-derived-p' to fix
this bug#62907.
* lisp/progmodes/eglot.el (eglot--languageId): New helper.
(eglot-current-server, eglot--TextDocumentItem): Use it.
flymake-end-of-line-diagnostics-face: Tweak a little
* lisp/progmodes/flymake.el
(flymake-end-of-line-diagnostics-face):
Use height 0.85 and ensure the box doesn't change the line height
(https://debbugs.gnu.org/62029#86).
xref-search-program-alist: Fix searching larger file lists on MS Windows
* lisp/progmodes/xref.el (xref-search-program-alist):
Add '-s 10000' to xargs' options when on Windows or DOS.
Apparently the xargs port doesn't currently know how to obey the
system-wide limits (https://debbugs.gnu.org/bug=61667#521).
Fix typo and inaccuracy in the ELisp Reference manual
* doc/lispref/loading.texi (Dynamic Modules): Fix a typo.
* doc/lispref/customize.texi (Group Definitions): Faces are also
in the 'custom-group' property of a customization group.
(Bug#62887)
* lisp/progmodes/verilog-mode.el: Fix commentary to avoid implying
XEmacs defines diff-command.
(verilog-diff-file-with-buffer): Claim compatibility with Emacs 21
rather than XEmacs in commentary, since the latter does not seem to
define diff-command. Use get-buffer in place of likely thinko
with-temp-buffer + BUFNAME + current-buffer. Fix unused
unwind-protect: move temporary file deletion to its unwind
forms (bug#62620). Avoid race condition between file existence
check and deletion. Handle list-valued diff-switches. Avoid
passing empty argument to diff-command.
Allow upgrading built-in packages with 'package-install'
* etc/NEWS: Mention the change
* lisp/emacs-lisp/package.el (package--upgradable-built-in-p): Add new
predicate.
(package-install-upgrade-built-in): Add new user option to enable
feature.
(package-install): Respect new user option.
This allows the C compiler to do away with all default clauses when
switching on the `redirect` field.
* src/lisp.h (enum symbol_redirect): Use values in the 0..3 range,
which also matches the old comment in struct Lisp_Symbol.
(enum symbol_interned, enum symbol_redirect)
(enum symbol_trapped_write): Comment members. Remove explicit values.
(struct Lisp_Symbol): Shrink the `redirect` member to 2 bits.
Use the correct type for the `interned` field.
Move value comments to their types.
* src/pdumper.c (dump_symbol): Update hashes.
Eli Zaretskii [Sun, 16 Apr 2023 08:12:39 +0000 (11:12 +0300)]
Minor changes in c-ts-mode.el's support of DEFUNs
* lisp/progmodes/c-ts-mode.el (c-ts-mode--fontify-DEFUN): Renamed
from 'c-ts-mode--fontify-defun'; all callers changed.
(c-ts-mode-emacs-sources-support): Renamed from
'c-ts-mode-emacs-devel' and made into a defcustom; all users
changed.
(c-ts-mode--emacs-defun-p, c-ts-mode--emacs-defun-at-point)
(c-ts-mode--emacs-current-defun-name): Doc fixes. (Bug#62825)
Eli Zaretskii [Sat, 15 Apr 2023 17:05:04 +0000 (13:05 -0400)]
Merge from origin/emacs-29
b7023da6627 Make image-map bindings available on image links d9e96c029bb * CONTRIBUTE: Fix a typo 3f71a2a0cf6 ; * lisp/progmodes/c-ts-mode.el (treesit-node-next-siblin... adf9c956c28 Add to Eglot support for additional language-servers. b3603b84bd9 Partial support for DEFUN in c-ts-mode (bug#62825)
Eli Zaretskii [Sat, 15 Apr 2023 17:02:04 +0000 (13:02 -0400)]
Merge from origin/emacs-29
864a4dc2363 Fix compilation of w32.c with old MinGW system headers a22eb9ae0f9 ruby-add-log-current-method: Reduce the use of 'nreverse' 17d803d0a75 Fix detection of WebP images by their signature 43290391ce2 ; Eglot: make version parseable by version-to-list 6e6e8b5c974 Add more documentation for the keys of `package-vc-select... 7972b76c2c7 ; vc-checkout: Wrap var lookup in 'bound-and-true-p' e9fef1d70ff vc-checkout: Try to use the vc-dir's backend first 372e024accd ; Fix wallpaper-tests on XFCE 7055fd8e43e Improve documentation related to 'ispell-complete-word' 61fd017abde * configure.ac: Add -lbsd on Haiku. 05971c4d9a4 Add menu to 'c-ts-mode' and 'c++-ts-mode'
Eli Zaretskii [Sat, 15 Apr 2023 16:43:37 +0000 (12:43 -0400)]
Merge from origin/emacs-29
5ef7ff05736 ; Start a new ChangeLog.4 file. 11126c6d30a Fix 'C-h k' for "Paste from Kill Menu" in context menus 74ddfe811f9 ; * doc/misc/calc.texi (Rewrites Tutorial): Fix a typo (b... 08cda286c3f Improve the documentation of the XDS support 14d1c00e806 Allow reindentation of images inserted by 'mm-inline-image' b63a9eda01c Fix "C-h k" and "C-h c" with Paste from Kill Menu b36c21e27dc Change cursor color on NS port when it matches the face b... 96714c106b7 Improve documentation of image-related commands 6a2863ca016 Fix handling of sliced images 5be79fd05a5 ; * etc/NEWS: Announce 'cyrillic-mongolian' IM. ca1a0fda98a ; Fix last change. ce63462dbda Add cyrillic-mongolian input method 58801792706 ; Minor addition to the Emacs FAQ 88847dee125 Jsonrpc: don't bind inhibit-read-only to t so early cb8c87a423a Allow active region when IM is used
Eli Zaretskii [Sat, 15 Apr 2023 10:47:00 +0000 (13:47 +0300)]
Cleaner solution for Org version updates
* lisp/Makefile.in (BYTE_COMPILE_FLAGS): Set org--built-in-p
non-nil, to avoid aborting the build when Org's version is bumped.
($(lisp)/org/org.elc): Remove dependencies of org-version.el, as
no longer needed. (Bug#62762)