]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years ago; * lisp/progmodes/project.el: avoid warning in loaddefs
Mattias Engdegård [Fri, 26 May 2023 12:33:12 +0000 (14:33 +0200)]
; * lisp/progmodes/project.el: avoid warning in loaddefs

2 years agoAdd more function declarations
Mattias Engdegård [Fri, 26 May 2023 10:28:15 +0000 (12:28 +0200)]
Add more function declarations

* lisp/subr.el (buffer-narrowed-p, sha1, match-substitute-replacement)
(version-to-list, version<, version<=, version=)
(function-get, subregexp-context-p, split-string)
(combine-and-quote-strings, split-string-and-unquote)
(replace-regexp-in-string, syntax-after)
(string-trim-left, string-trim):
* lisp/emacs-lisp/subr-x.el (hash-table-empty-p, hash-table-keys)
(hash-table-values, string-glyph-split)
(string-clean-whitespace, string-fill, string-limit)
(string-pixel-width):
* lisp/env.el (substitute-env-vars, substitute-env-in-file-name)
(setenv-internal):
* lisp/emacs-lisp/rx.el (rx-to-string):
* lisp/emacs-lisp/regexp-opt.el (regexp-opt-depth)
(regexp-opt-charset):
Add appropriate declarations: pure, side-effect-free, and/or
important-return-value.

2 years agoSupport setting PAGER=cat in comint.el (bug#62958)
Spencer Baugh [Wed, 19 Apr 2023 21:44:54 +0000 (17:44 -0400)]
Support setting PAGER=cat in comint.el (bug#62958)

Paging can be undesirable in comint-derived commands such as
async-shell-command and M-x shell.  It is a frequent footgun for new
Emacs users when they try to run commands which start a pager in such
modes.

Simply adding (setenv "PAGER" "cat") globally is not correct, since
that will break modes like term, which support paging quite well.
It's only and exactly the comint-derived modes which don't need
paging.

* lisp/comint.el (comint-pager): Add. (bug#62958)
(comint-exec-1): Use comint-pager to set PAGER.

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Fri, 26 May 2023 11:04:03 +0000 (07:04 -0400)]
Merge from origin/emacs-29

aa5158630e7 Use 'font-lock-extend-region-functions' in python-mode
b7b82ecb2b4 Fix python-info-docstring-p
f42de74ebea ; * src/lread.c (read0, skip_lazy_string): Fix commentary...
b6b384023a9 Fix cancellation of Wdired
916c2a19bde Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
f535c0e49d5 Handle #@00 in new reader in a compatible way (bug#63722)
40a758f5ceb ; Minor fixes in documentation of recently-changed VC com...
c0d7447e9dc ; * etc/NEWS: Describe the Cairo XCB option.  (Bug#63589)
42052686752 Don't mark selection request events
9f5249d5c8d Disable cairo-xcb support by default
e5f42706ce2 * lisp/progmodes/project.el: Move :safe from defcustom to...
3afe4a42e90 * lisp/vc/vc-annotate.el (vc-annotate-mode-menu): Quote v...
b62a2b08b80 Add vc-create/switch/print-branch to menu and update docu...
d292d282292 Fix rare crashes in 'try_window_reusing_current_matrix'
709d9020021 Make last Tramp change less invasive
a72a1f24fcb ; Fix last change.
5c6517a115d ; * lisp/menu-bar.el (popup-menu): Doc fix.
212884f2bfe ; Fix last change.
1b9812af80b ; * etc/PROBLEMS: Document problem with GnuPG 2.4.1.  (Bu...
765edc204d4 ; Support SQLite3 extensions on macOS
5aadb87d6f6 Fix 'use-dialog-box-p' and friends

# Conflicts:
# etc/NEWS

2 years ago; Merge from origin/emacs-29
Eli Zaretskii [Fri, 26 May 2023 11:03:56 +0000 (07:03 -0400)]
; Merge from origin/emacs-29

The following commit was skipped:

0abb79ca09a Avoid duplicates when adding package dirs to load-path

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Fri, 26 May 2023 11:03:07 +0000 (07:03 -0400)]
Merge from origin/emacs-29

6f6071c5261 Avoid duplicate load-path entry when generating package a...
117b29c6f66 ; Improve documentation of Isearch command properties
a347b26cba2 Disable loading SQLite3 extensions when SQLite3 version i...
fe22bf503fb ; * lisp/progmodes/project.el (project-switch-use-entire-...
64dbbde3b77 Fix visiting HTML files encoded in iso-2022 variants
5c95239aca2 ; Fix markup of some treesit vars in Elisp manual.
6ad041939be Support 'isearch-allow-scroll' in 'pixel-scroll-precision...
ecccdc07a09 shr: allow moving between adjacent anchors
504ef25ef36 ; * etc/NEWS: Fix typos.
d6fb868cdd3 Fix multihop file name expansion in Tramp
dd3e4e14fdc Remove obsolete information from Gnus manual
2a5c946f879 Preserve mark in comint-history-isearch
6b60c8142ea Fix systemd unit completion for old versions of systemd
8c56557cd9d Fix Skeletons menu-bar menu in Python modes
58eb38cfb47 ; * etc/NEWS: missing definite article
cf403628692 ; * etc/NEWS: PGTK cannot switch to -new automatically (b...
ead3a2abbfc Fix loading SQLite extensions
a6bddd17658 ; * etc/NEWS: Fix typos.
f49fe936abd * etc/NEWS: Note dotimes loop variable scoping change (bu...
cec9333dc52 Fix c-ts-mode--top-level-declarator
f571e8f1bb6 Improve c-ts-mode font-lock for function names (bug#63390)
42a28ffdc27 * lisp/tab-bar.el: Don't use 'minibuffer-selected-window'...
8e61d23f71e Split windows horizontally in places that use split to cr...
459d08c7fe7 Fix tree-sitter test (bug#63481)
3bc5efb87e5 ; * lisp/emacs-lisp/benchmark.el (benchmark-progn): Fix d...

# Conflicts:
# etc/NEWS

2 years agoFix emacsclient when there are irrecoverable file-visiting errors
Eli Zaretskii [Fri, 26 May 2023 10:20:56 +0000 (13:20 +0300)]
Fix emacsclient when there are irrecoverable file-visiting errors

* lisp/server.el (server-process-filter, server-return-error):
Display the error message to be sent to the client as a regular
message, to give the user the opportunity to see it.  Delete the
terminal immediately after sending the error message to the
client, to make sure the terminal's modes are restored.
(Bug#63629)

2 years agoUse 'font-lock-extend-region-functions' in python-mode
kobarity [Wed, 24 May 2023 13:06:51 +0000 (22:06 +0900)]
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)

2 years agoFix python-info-docstring-p
kobarity [Wed, 24 May 2023 13:01:12 +0000 (22:01 +0900)]
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)

2 years ago; * src/lread.c (read0, skip_lazy_string): Fix commentary wording.
Eli Zaretskii [Fri, 26 May 2023 09:30:40 +0000 (12:30 +0300)]
; * src/lread.c (read0, skip_lazy_string): Fix commentary wording.

2 years agoFix cancellation of Wdired
Eli Zaretskii [Fri, 26 May 2023 09:23:19 +0000 (12:23 +0300)]
Fix cancellation of Wdired

* lisp/wdired.el (wdired-abort-changes): Call 'dired-revert'.
Patch by Stephen Berman <stephen.berman@gmx.net>.  (Bug#63676)

2 years agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Fri, 26 May 2023 09:20:26 +0000 (12:20 +0300)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

2 years agoAdd customization options for dictionary-search
Eshel Yaron [Mon, 15 May 2023 18:04:21 +0000 (21:04 +0300)]
Add customization options for dictionary-search

Allow users to customize 'dictionary-search' via several new
customization options.

* lisp/net/dictionary.el (dictionary-define-word)
(dictionary-match-word, dictionary-completing-read-word)
(dictionary-dictionaries, dictionary-completing-read-dictionary)
(dictionary-display-definition-in-help-buffer): New functions.
(dictionary-read-word-prompt)
(dictionary-display-definition-function)
(dictionary-read-word-function)
(dictionary-read-dictionary-function)
(dictionary-search-interface): New user options.
(dictionary-search): Use them.
(dictionary-read-dictionary-default)
(dictionary-read-word-default): New functions, extracted from
'dictionary-search'.
* etc/NEWS: Announce.

2 years agoHandle #@00 in new reader in a compatible way (bug#63722)
Mattias Engdegård [Thu, 25 May 2023 20:28:25 +0000 (22:28 +0200)]
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.

2 years ago; Minor fixes in documentation of recently-changed VC commands
Eli Zaretskii [Fri, 26 May 2023 08:09:14 +0000 (11:09 +0300)]
; Minor fixes in documentation of recently-changed VC commands

* lisp/vc/vc.el (vc-print-branch-log, vc-create-branch)
(vc-create-tag, vc-retrieve-tag, vc-switch-branch): Doc fixes.
* lisp/vc/vc-hooks.el (vc-menu-map): Minor wording change in :help
text.

* doc/emacs/maintaining.texi (VC Change Log, Creating Branches):
Minor wording and markup changes.

2 years ago; * etc/NEWS: Describe the Cairo XCB option. (Bug#63589)
Eli Zaretskii [Fri, 26 May 2023 07:07:34 +0000 (10:07 +0300)]
; * etc/NEWS: Describe the Cairo XCB option.  (Bug#63589)

2 years agoDon't mark selection request events
Po Lu [Fri, 26 May 2023 00:43:18 +0000 (08:43 +0800)]
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.

2 years agoDisable cairo-xcb support by default
Po Lu [Fri, 26 May 2023 00:41:31 +0000 (08:41 +0800)]
Disable cairo-xcb support by default

* INSTALL (--with-cairo-xcb): Document new option.
* configure.ac (USE_CAIRO_XCB): Implement new option.

2 years ago* lisp/progmodes/project.el: Move :safe from defcustom to autoload (bug#63469)
Juri Linkov [Thu, 25 May 2023 18:40:38 +0000 (21:40 +0300)]
* 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.

2 years ago* lisp/vc/vc-annotate.el (vc-annotate-mode-menu): Quote vc-annotate-backend.
Juri Linkov [Thu, 25 May 2023 18:33:11 +0000 (21:33 +0300)]
* 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).

2 years agoAdd vc-create/switch/print-branch to menu and update documentation (bug#63690)
Juri Linkov [Thu, 25 May 2023 18:24:23 +0000 (21:24 +0300)]
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.

2 years agoFix rare crashes in 'try_window_reusing_current_matrix'
Eli Zaretskii [Thu, 25 May 2023 17:50:46 +0000 (20:50 +0300)]
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)

2 years ago; eieio-test-persist.el: namespace hygiene
Mattias Engdegård [Thu, 25 May 2023 08:22:54 +0000 (10:22 +0200)]
; eieio-test-persist.el: namespace hygiene

* test/lisp/emacs-lisp/eieio-tests/eieio-test-persist.el
(hash-equal): Rename to `eieio-test--hash-equal`.

2 years agoMake last Tramp change less invasive
Michael Albinus [Thu, 25 May 2023 13:40:45 +0000 (15:40 +0200)]
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'.

2 years agoEglot: fix execution of CodeAction commands
João Távora [Thu, 25 May 2023 13:29:45 +0000 (14:29 +0100)]
Eglot: fix execution of CodeAction commands

Reported in
https://github.com/joaotavora/eglot/discussions/1225.

* lisp/progmodes/eglot.el (eglot-execute): Fix typo.

2 years agoEglot: Add nickel-mode configuration
Brian Leung [Sat, 20 May 2023 08:43:52 +0000 (01:43 -0700)]
Eglot: Add nickel-mode configuration

* lisp/progmodes/eglot.el (eglot-server-programs): Add nls for nickel-mode.

2 years ago; Fix last change.
Eli Zaretskii [Thu, 25 May 2023 05:58:42 +0000 (08:58 +0300)]
; Fix last change.

2 years ago; * lisp/menu-bar.el (popup-menu): Doc fix.
Eli Zaretskii [Thu, 25 May 2023 05:57:28 +0000 (08:57 +0300)]
; * lisp/menu-bar.el (popup-menu): Doc fix.

2 years agoFix apparently wrong `delete` and `delq` value discards (bug#61730)
Mattias Engdegård [Wed, 24 May 2023 20:36:19 +0000 (22:36 +0200)]
Fix apparently wrong `delete` and `delq` value discards (bug#61730)

* lisp/startup.el (normal-top-level):
Update process-environment in case the DISPLAY variable comes first.
Also stop iterating over initial-environment once the first DISPLAY
is found.
* lisp/allout.el (allout-get-configvar-values):
* lisp/org/org.el (org-display-inline-remove-overlay):
* lisp/progmodes/gdb-mi.el (gdb-get-location):
* lisp/progmodes/idlwave.el
(idlwave-convert-xml-clean-routine-aliases)
(idlwave-convert-xml-clean-sysvar-aliases):
* lisp/textmodes/reftex.el (reftex-ref-style-toggle):
Update the base variable after performing a destructive deletion,
where it was obvious that this was intended.

2 years agoUse `small-temporary-file-directory' in Tramp
Michael Albinus [Wed, 24 May 2023 18:52:25 +0000 (20:52 +0200)]
Use `small-temporary-file-directory' in Tramp

* lisp/net/tramp-fuse.el (tramp-fuse-mount-point):
* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
Use `small-temporary-file-directory'.

2 years agoFix nativecomp ICE compiling structure related code (bug#63674)
Andrea Corallo [Wed, 24 May 2023 15:05:26 +0000 (17:05 +0200)]
Fix nativecomp ICE compiling structure related code (bug#63674)

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Define the predicate to
be effective at compile time as native comp relies on `cl-typep' that
relies o predicates to work.

* test/src/comp-resources/comp-test-funcs.el (cl-lib): Require.
(comp-test-struct): Define struct.
(comp-test-63674-1-f): Add new test.

2 years ago* lisp/loadup.el: Don't accidentally reduce `max-lisp-eval-depth`
Stefan Monnier [Wed, 24 May 2023 13:47:27 +0000 (09:47 -0400)]
* lisp/loadup.el: Don't accidentally reduce `max-lisp-eval-depth`

2 years agoUse return values of assq-delete-all and assoc-delete-all
Mattias Engdegård [Wed, 24 May 2023 09:30:53 +0000 (11:30 +0200)]
Use return values of assq-delete-all and assoc-delete-all

* lisp/allout-widgets.el (allout-widgets-mode):
* lisp/progmodes/eglot.el (eglot-handle-notification):
Update variables with the new value, which was probably the intention
here.

2 years ago; Fix last change.
Eli Zaretskii [Tue, 23 May 2023 15:05:07 +0000 (18:05 +0300)]
; Fix last change.

2 years ago; * etc/PROBLEMS: Document problem with GnuPG 2.4.1. (Bug#63256)
Eli Zaretskii [Tue, 23 May 2023 15:04:24 +0000 (18:04 +0300)]
; * etc/PROBLEMS: Document problem with GnuPG 2.4.1.  (Bug#63256)

2 years ago; Support SQLite3 extensions on macOS
Eli Zaretskii [Tue, 23 May 2023 14:53:07 +0000 (17:53 +0300)]
; Support SQLite3 extensions on macOS

* src/sqlite.c (Fsqlite_load_extension): Support *.dylib
extensions.  (Bug#63653)

2 years agoFix 'use-dialog-box-p' and friends
Eli Zaretskii [Tue, 23 May 2023 14:44:23 +0000 (17:44 +0300)]
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.

2 years ago* test/src/comp-tests.el: Add some ret type tests for non builtin types
Andrea Corallo [Tue, 23 May 2023 13:13:08 +0000 (15:13 +0200)]
* test/src/comp-tests.el: Add some ret type tests for non builtin types

2 years agocomp: Propagate pre slot access type check
Andrea Corallo [Wed, 17 May 2023 16:00:24 +0000 (18:00 +0200)]
comp: Propagate pre slot access type check

* lisp/loadup.el (max-lisp-eval-depth): Increase
`max-lisp-eval-depth' to 3400.

* lisp/emacs-lisp/comp.el (comp-add-cond-cstrs): Pattern match pre
slot access type check and add constraint.

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-cl-tag-p)
(comp-cstr-cl-tag): New functions.

* lisp/emacs-lisp/comp.el (make-comp-mvar): Add neg parameter.

2 years agocomp: Make use of predicates in propagation for non builtin types
Andrea Corallo [Wed, 24 Aug 2022 21:31:28 +0000 (23:31 +0200)]
comp: Make use of predicates in propagation for non builtin types

* lisp/emacs-lisp/comp-cstr.el (comp-cstr-ctxt): Add `pred-type-h'
slot.
* lisp/emacs-lisp/comp.el (comp-known-predicate-p)
(comp-pred-to-cstr): Update.

2 years ago* lisp/emacs-lisp/comp.el (comp-fwprop-call): Extend to understand `record'
Andrea Corallo [Wed, 24 Aug 2022 16:41:19 +0000 (18:41 +0200)]
* lisp/emacs-lisp/comp.el (comp-fwprop-call): Extend to understand `record'

2 years agocomp: Account non builtin types in type hierarchy
Andrea Corallo [Wed, 24 Aug 2022 16:08:37 +0000 (18:08 +0200)]
comp: Account non builtin types in type hierarchy

* lisp/emacs-lisp/cl-macs.el (cl--struct-all-parents): Add comment.

* lisp/emacs-lisp/cl-preloaded.el (cl--struct-get-class): Likewise.

* lisp/emacs-lisp/comp-cstr.el (comp--cl-class-hierarchy)
(comp--all-classes): New functions.
(comp-cstr-ctxt): Add `typeof-types' field.

* lisp/emacs-lisp/comp-cstr.el (comp-supertypes)
(comp-union-typesets): Update to use non builtin types.

2 years agoImprove check for ANSI control escape sequences in Tramp
Michael Albinus [Tue, 23 May 2023 13:32:20 +0000 (15:32 +0200)]
Improve check for ANSI control escape sequences in Tramp

* lisp/net/tramp-sh.el (tramp-barf-if-no-shell-prompt):
Remove `ansi-color-control-seq-regexp'.

* lisp/net/tramp.el (tramp-terminal-type): Fix docstring.
(tramp-process-one-action): Delete ANSI control escape sequences
in buffer.  (Bug#63539)

2 years agoStop adding the package directory to the load path
Robert Pluim [Tue, 23 May 2023 13:01:11 +0000 (15:01 +0200)]
Stop adding the package directory to the load path

The generated autoloads files for packages have been updating the
load-path for the last decade.

* lisp/emacs-lisp/package.el (package-activate-1): Don't update
load-path with package directory.

2 years agoAvoid duplicates when adding package dirs to load-path
Stefan Monnier [Mon, 22 May 2023 16:49:26 +0000 (18:49 +0200)]
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.

2 years agoAvoid duplicate load-path entry when generating package autoloads
Robert Pluim [Mon, 22 May 2023 13:44:21 +0000 (15:44 +0200)]
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'.

2 years ago; Improve documentation of Isearch command properties
Eli Zaretskii [Tue, 23 May 2023 11:58:39 +0000 (14:58 +0300)]
; Improve documentation of Isearch command properties

* doc/emacs/display.texi (Scrolling):
* doc/emacs/search.texi (Not Exiting Isearch): Improve
documentation and indexing of 'scroll-command', 'isearch-scroll',
and 'isearch-move' properties.

2 years agoDisable loading SQLite3 extensions when SQLite3 version is too old
Eli Zaretskii [Tue, 23 May 2023 11:30:31 +0000 (14:30 +0300)]
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)

2 years agoUse faster option for running vc-hg status (Bug#63470)
Spencer Baugh [Fri, 12 May 2023 19:28:06 +0000 (15:28 -0400)]
Use faster option for running vc-hg status (Bug#63470)

In modern Mercurial, removing the "re:" "-I" "." options provides a
10x-20x speedup because it allows the Rust implementation of "hg
status" to be used.

* lisp/vc/vc-hg.el (vc-hg--program-version): Add.
(vc-hg-dir-status-files): Use --config commands.status.relative=1 to
make paths relative when available.

2 years ago; * lisp/progmodes/project.el (project-switch-use-entire-map): Doc fix.
Eli Zaretskii [Mon, 22 May 2023 18:31:56 +0000 (21:31 +0300)]
; * lisp/progmodes/project.el (project-switch-use-entire-map): Doc fix.

2 years agoFix visiting HTML files encoded in iso-2022 variants
Eli Zaretskii [Mon, 22 May 2023 18:23:58 +0000 (21:23 +0300)]
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)

2 years agoFix syntax bugs involving escaped newlines in comments
Alan Mackenzie [Mon, 22 May 2023 16:09:07 +0000 (16:09 +0000)]
Fix syntax bugs involving escaped newlines in comments

This fixes bug#63535

* src/syntax.c (forw_comment): take the initial syntax from the
argument PREV_SYNTAX rather than checking the buffer position
for a backslash.  Update the state at each character scanned.
(scan_sexps_forward): When the end position is escaped after a
call to forw_comment, return this status to the caller.

2 years agoAttempt to speed up filenotify-tests
Mattias Engdegård [Mon, 22 May 2023 14:27:00 +0000 (16:27 +0200)]
Attempt to speed up filenotify-tests

* test/lisp/filenotify-tests.el (file-notify-test04-autorevert):
Run with a lower `auto-revert-interval` (1 s) and adjust the
a timeout value.  This should lower the time for this particular
test from 25 to below 10 s.

2 years ago; Fix markup of some treesit vars in Elisp manual.
Basil L. Contovounesios [Mon, 22 May 2023 14:23:39 +0000 (15:23 +0100)]
; Fix markup of some treesit vars in Elisp manual.

* doc/lispref/modes.texi (Parser-based Font Lock):
(Parser-based Indentation):
* doc/lispref/parsing.texi (Multiple Languages): Use @code in place
of @var when the argument is not a metavariable.

2 years agoSupport existing sshfs and rclone mount points in Tramp
Michael Albinus [Mon, 22 May 2023 14:08:23 +0000 (16:08 +0200)]
Support existing sshfs and rclone mount points in Tramp

* lisp/net/tramp-fuse.el (tramp-fuse-mount-point, tramp-fuse-mounted-p):
Support existing mount points.

2 years agoSupport 'isearch-allow-scroll' in 'pixel-scroll-precision-mode'
Eli Zaretskii [Mon, 22 May 2023 11:20:38 +0000 (14:20 +0300)]
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)

2 years agoshr: allow moving between adjacent anchors
Andreas Schwab [Mon, 22 May 2023 11:08:33 +0000 (13:08 +0200)]
shr: allow moving between adjacent anchors

* lisp/net/shr.el (shr-urlify): Put shr-tab-stop only over first
position.

2 years agoMark failing filenotify test as :unstable
Michael Albinus [Mon, 22 May 2023 10:56:45 +0000 (12:56 +0200)]
Mark failing filenotify test as :unstable

* test/lisp/filenotify-tests.el (file-notify-test04-autorevert-remote):
Tag as :unstable.

2 years ago; * etc/NEWS: Fix typos.
Michael Albinus [Mon, 22 May 2023 10:20:44 +0000 (12:20 +0200)]
; * etc/NEWS: Fix typos.

2 years agoFix multihop file name expansion in Tramp
Michael Albinus [Mon, 22 May 2023 10:20:27 +0000 (12:20 +0200)]
Fix multihop file name expansion in Tramp

* lisp/net/tramp.el (tramp-dissect-file-name): Set hop to nil if
NODEFAULT.  (Bug#63578)

2 years agoPlug various leaks and fix input method initialization
Po Lu [Mon, 22 May 2023 03:52:33 +0000 (11:52 +0800)]
Plug various leaks and fix input method initialization

* src/image.c (free_bitmap_record): Free bm->name correctly even
if the display connection has been closed.
* src/xfns.c (x_window): Use dpyinfo-specific `use_xim' flag.
* src/xterm.c (use_xim): Remove global variable.
(xim_destroy_callback): Free `xim_styles' if present, and set it
to NULL to be on the safe side.
(xim_open_dpy): Consult dpyinfo->use_xim instead.  Don't leak
`xim_styles' if an IM was previously opened.
(xim_initialize): Use dpyinfo-specific `use_xim' flag.
(xim_close_dpy): Check if `dpyinfo->xim_callback_data' is set
before unregistering the instantiation callback.
(x_term_init): Determine whether or not to use XIM for each
display opened, instead of using the resources of the last
display opened to toggle a global flag.
(x_delete_terminal): Always call `image_destroy_all_bitmaps' and
`xim_close_dpy'.  Free storage used to hold bitmap records.
* src/xterm.h (struct x_display_info): New field `use_xim'.

2 years agoFix custom type of erc-autojoin-channels-alist
F. Jason Park [Fri, 19 May 2023 06:47:27 +0000 (23:47 -0700)]
Fix custom type of erc-autojoin-channels-alist

* lisp/erc/erc-join.el (erc-autojoin-channels-alist): In ERC 5.4, the
type of this option changed to accept symbols signifying IRC network
names.  However, the option's definition was not updated to reflect
that.  See commit 9bb8d90cddf "Allow irc network symbols in
erc-autojoin-channels-alist".

2 years ago; Silence byte compiler in erc-netsplit-JOIN
F. Jason Park [Fri, 19 May 2023 06:47:27 +0000 (23:47 -0700)]
; Silence byte compiler in erc-netsplit-JOIN

* etc/ERC-NEWS: Partially revert edit from c9f1ad2a870 "Revive option
erc-query-on-unjoined-chan-privmsg".
* lisp/erc/erc-netsplit.el (erc-netsplit-JOIN): Silence byte compiler
warning re ignored return value from `delete' when removing nicks.
Could probably suppress rather than reconstitute since the CAR of an
`erc-netsplit-list' entry originates from the trailing "reason" param
of the instigating "QUIT" command and should look something like
"irc.example.org chat.example.org", which cannot be confused for a
nickname.
* test/lisp/erc/resources/erc-scenarios-common.el: Fix wording in
Commentary.

2 years agoNew Rmail commands for reading mailing-lists
Eli Zaretskii [Sun, 21 May 2023 10:57:14 +0000 (13:57 +0300)]
New Rmail commands for reading mailing-lists

* lisp/mail/rmail.el (rmail--mailing-list-message): New internal
function.
(rmail-mailing-list-help, rmail-mailing-list-post)
(rmail-mailing-list-unsubscribe, rmail-mailing-list-archive): New
commands.
(rmail-mode-map): Add menu items for the new commands.

* etc/NEWS: Announce the new Rmail commands.

2 years agoRemove obsolete information from Gnus manual
Jens Schmidt [Sat, 20 May 2023 21:46:42 +0000 (23:46 +0200)]
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)

2 years agoPreserve mark in comint-history-isearch
Jens Schmidt [Sat, 20 May 2023 21:03:29 +0000 (23:03 +0200)]
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)

2 years agoDeclare more mutating functions
Mattias Engdegård [Sat, 20 May 2023 18:34:55 +0000 (20:34 +0200)]
Declare more mutating functions

* lisp/emacs-lisp/bytecomp.el (mutating-fns):
Add assoc-delete-all, assq-delete-all and rassq-delete-all.
* lisp/emacs-lisp/shortdoc.el (alist, list):
Don't mutate constants in examples illustrating use of
assoc-delete-all, assq-delete-all and rassq-delete-all.

2 years agoDeclare more functions as having important-return-value
Mattias Engdegård [Sat, 20 May 2023 16:24:53 +0000 (18:24 +0200)]
Declare more functions as having important-return-value

* lisp/subr.el (assoc-delete-all, assq-delete-all, rassq-delete-all)
(alist-get): Declare as important-return-value.
* lisp/emacs-lisp/bytecomp.el (important-return-value-fns):
Add `assoc-string`.

2 years agoMinor optimisation of string-trim-left and string-trim-right
Mattias Engdegård [Sat, 20 May 2023 10:06:46 +0000 (12:06 +0200)]
Minor optimisation of string-trim-left and string-trim-right

* lisp/subr.el (string-trim-left, string-trim-right):
Use a constant string when no REGEXP argument is given.

2 years agoFix systemd unit completion for old versions of systemd
Liu Hui [Wed, 17 May 2023 08:39:18 +0000 (16:39 +0800)]
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)

2 years agoFix Skeletons menu-bar menu in Python modes
Eli Zaretskii [Sat, 20 May 2023 14:56:40 +0000 (17:56 +0300)]
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)

2 years agoFix async invocations in Dired with 'fish' shell
Eli Zaretskii [Sat, 20 May 2023 14:26:52 +0000 (17:26 +0300)]
Fix async invocations in Dired with 'fish' shell

* lisp/dired-aux.el (dired-shell-stuff-it): Separate '&' and ';'
by blanks, for the sake of shells such as 'fish'.  Suggested by
Lycomedes 1814 <lycomedes1814@yandex.com>.

2 years ago; * etc/NEWS: missing definite article
Mattias Engdegård [Sat, 20 May 2023 13:04:06 +0000 (15:04 +0200)]
; * etc/NEWS: missing definite article

2 years ago; * etc/NEWS: PGTK cannot switch to -new automatically (bug#6355).
Eli Zaretskii [Sat, 20 May 2023 12:53:21 +0000 (15:53 +0300)]
; * etc/NEWS: PGTK cannot switch to -new automatically (bug#6355).

2 years agoFix loading SQLite extensions
Eli Zaretskii [Sat, 20 May 2023 12:43:44 +0000 (15:43 +0300)]
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.

2 years ago; * etc/NEWS: Fix typos.
Michael Albinus [Sat, 20 May 2023 12:00:56 +0000 (14:00 +0200)]
; * etc/NEWS: Fix typos.

2 years agoImprove handling of ANSI control sequences in Tramp
Michael Albinus [Sat, 20 May 2023 10:13:09 +0000 (12:13 +0200)]
Improve handling of ANSI control sequences in Tramp

* lisp/net/tramp-compat.el (ansi-color): Require.

* lisp/net/tramp-sh.el (tramp-display-escape-sequence-regexp)
(tramp-device-escape-sequence-regexp): Delete.
(tramp-sh-handle-insert-directory, tramp-barf-if-no-shell-prompt)
(tramp-wait-for-output): Use `ansi-color-control-seq-regexp'.

* lisp/net/tramp.el (tramp-shell-prompt-pattern): Remove escape
characters.
(tramp-process-one-action, tramp-convert-file-attributes):
Use `ansi-color-control-seq-regexp'.  (Bug#63539)

* test/lisp/net/tramp-tests.el (tramp-display-escape-sequence-regexp):
Dont't declare.
(tramp-test28-process-file, tramp-test32-shell-command):
Use `ansi-color-control-seq-regexp'.
(tramp-test45-asynchronous-requests): Adapt test.

2 years agoUse `delq` return value (bug#61730)
Mattias Engdegård [Thu, 18 May 2023 15:33:15 +0000 (17:33 +0200)]
Use `delq` return value (bug#61730)

* lisp/calc/calc-graph.el (calc-graph-compute-2d):
* lisp/calendar/appt.el (appt-activate):
* lisp/progmodes/cc-styles.el (c-make-styles-buffer-local):
Make use of what `delq` returns, to stave off possible mistakes or at
least make clear that there isn't any.

2 years ago* etc/NEWS: Note dotimes loop variable scoping change (bug#63586)
Mattias Engdegård [Sat, 20 May 2023 08:50:25 +0000 (10:50 +0200)]
* etc/NEWS: Note dotimes loop variable scoping change (bug#63586)

2 years agoFix c-ts-mode--top-level-declarator
Yuan Fu [Sat, 20 May 2023 07:45:39 +0000 (00:45 -0700)]
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.

2 years agoImprove c-ts-mode font-lock for function names (bug#63390)
Yuan Fu [Fri, 19 May 2023 23:09:17 +0000 (16:09 -0700)]
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.

2 years ago* lisp/tab-bar.el: Don't use 'minibuffer-selected-window' (bug#62427).
Juri Linkov [Fri, 19 May 2023 18:14:16 +0000 (21:14 +0300)]
* 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'.

2 years agoSplit windows horizontally in places that use split to create a new window.
Juri Linkov [Fri, 19 May 2023 18:04:50 +0000 (21:04 +0300)]
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)

2 years agoImproved copy-tree documentation and test (bug#63509)
Mattias Engdegård [Fri, 19 May 2023 10:32:28 +0000 (12:32 +0200)]
Improved copy-tree documentation and test (bug#63509)

* etc/NEWS: Move entry since it's an incompatible change.
* lisp/emacs-lisp/shortdoc.el (vector): Make the example relevant.
* lisp/subr.el (copy-tree): Rename second argument,
since 'vector-like' is a term with a specific meaning in Emacs
but not the one intended here.
* doc/lispref/lists.texi (Building Lists): Rename second argument,
and make it clear that the input must be acyclic.
* doc/lispref/records.texi (Record Functions):
Be more precise: `copy-sequence` is used to copy records,
`copy-tree` copies trees made of records etc.
* test/lisp/subr-tests.el (subr--copy-tree): Extend and strengthen the
test considerably, using the print-circle trick to detect structure
sharing precisely.

2 years agoImplement treesit-forward-sexp correctly (bug#63487)
Yuan Fu [Fri, 19 May 2023 07:15:21 +0000 (00:15 -0700)]
Implement treesit-forward-sexp correctly (bug#63487)

* lisp/treesit.el (treesit-forward-sexp): Signal scan-error when we
can't move across sexps further.

2 years agoMinor fixes of last change
Eli Zaretskii [Fri, 19 May 2023 06:05:45 +0000 (09:05 +0300)]
Minor fixes of last change

* etc/NEWS:
* doc/lispref/records.texi (Record Functions): Improve wording.
(Bug#63509)

2 years agoMake 'copy-tree' work with records
Joseph Turner [Mon, 15 May 2023 04:02:15 +0000 (21:02 -0700)]
Make 'copy-tree' work with records

* doc/lispref/lists.texi (Building Cons Cells and Lists): Document
new behavior of 'copy-tree'.
* doc/lispref/records.texi (Record Functions): Cross-reference to
lists.texi.
* etc/NEWS: Mention change.  (Bug#63509)
* lisp/emacs-lisp/shortdoc.el: Add 'copy-tree' example to vector
group.
* lisp/subr.el (copy-tree): Recurse into records as well as
vectors when optional second argument is non-nil. Rename second
argument from VECP to VECTOR-LIKE-P.
* test/lisp/subr-tests.el: Test new behavior.

2 years agoFix tree-sitter test (bug#63481)
Yuan Fu [Thu, 18 May 2023 21:44:26 +0000 (14:44 -0700)]
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

2 years agoTry declaring `delq` and `delete` important-return-value (bug#61730)
Mattias Engdegård [Thu, 18 May 2023 15:22:41 +0000 (17:22 +0200)]
Try declaring `delq` and `delete` important-return-value (bug#61730)

* lisp/emacs-lisp/bytecomp.el (important-return-value-fns):
Add (uncomment) `delq` and `delete`.

2 years ago; * lisp/emacs-lisp/benchmark.el (benchmark-progn): Fix declare form.
Eli Zaretskii [Thu, 18 May 2023 14:20:36 +0000 (17:20 +0300)]
; * lisp/emacs-lisp/benchmark.el (benchmark-progn): Fix declare form.

2 years agoSimplify python.el completion-predicate
Basil L. Contovounesios [Wed, 17 May 2023 12:53:09 +0000 (13:53 +0100)]
Simplify python.el completion-predicate

* lisp/progmodes/python.el:
(python-skeleton-define): Use command-modes as a shorthand for
completion-predicate (bug#63552).
(python--completion-predicate, python-shell--completion-predicate):
Remove accordingly; no longer used.
(python-define-auxiliary-skeleton): Prefer function-put over put.

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Thu, 18 May 2023 11:49:49 +0000 (07:49 -0400)]
Merge from origin/emacs-29

f8d9e40d2c1 Attempt to fix redisplay problems on macOS
4daa6f70497 ; * lisp/simple.el (async-shell-command): Add commentary ...
dc1a437d460 Clarify misleading comment in isearch.el
af3b0dc53ff Improve documentation of package-menu commands
d879847cd4d Fix M-x completion-predicate under python-ts-mode
1e57b2b4c79 * Account for `byte-compile-warnings' during native compi...
b5bfd808c6b Avoid duplicate VC packages in 'package-selected-packages'
c18f9f155f6 * lisp/tab-bar.el (tab-bar-new-tab-to): Set 'window-side'...
33485fe8f74 ; Better warning message when loading tree-sitter fails
95a724abaac Update to Org 9.6.6
c665ca79ff4 ; * admin/make-tarball.txt: Minor copyedits.
3aef46e466f Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs ...
229af8e4b31 ; * lisp/progmodes/csharp-mode.el (csharp-ts-mode--defun-...

2 years ago; Merge from origin/emacs-29
Eli Zaretskii [Thu, 18 May 2023 11:49:49 +0000 (07:49 -0400)]
; Merge from origin/emacs-29

The following commits were skipped:

88ca37b8589 ; Regenerate files for emacs-29.0.91
4627ede36b1 ; * lisp/ldefs-boot.el: Regenerate for emacs-29.0.91.
c90d47619e6 Bump Emacs version for next pretest

2 years agoMerge from origin/emacs-29
Eli Zaretskii [Thu, 18 May 2023 11:49:49 +0000 (07:49 -0400)]
Merge from origin/emacs-29

229af8e4b31 ; * lisp/progmodes/csharp-mode.el (csharp-ts-mode--defun-...
ce7d18cbc07 ; Minor fixes in ELisp manual
5c8864fab4f ; * lisp/simple.el (async-shell-command): Doc fix.  (Bug#...
b96dc472bcb Ignore current-prefix-arg in async-shell-command
1e6a7594361 Fix building of VC package manuals with relative includes
61659f36c88 Another fix for VHDL mode highlighting

2 years agoAttempt to fix redisplay problems on macOS
Aaron Jensen [Thu, 18 May 2023 11:20:18 +0000 (14:20 +0300)]
Attempt to fix redisplay problems on macOS

* src/nsterm.m (ns_scroll_run): Attempt to fix redisplay
artifacts.  (Bug#63187)

2 years ago; * lisp/simple.el (async-shell-command): Add commentary about 3rd arg.
Eli Zaretskii [Thu, 18 May 2023 11:03:10 +0000 (14:03 +0300)]
; * lisp/simple.el (async-shell-command): Add commentary about 3rd arg.

2 years agoClarify misleading comment in isearch.el
Jens Schmidt [Tue, 16 May 2023 21:31:19 +0000 (23:31 +0200)]
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)

Copyright-paperwork-exempt: yes

2 years ago* lisp/erc/erc-fill.el (erc-fill-spaced-commands): Fix typing errors
Mattias Engdegård [Thu, 18 May 2023 07:49:53 +0000 (09:49 +0200)]
* lisp/erc/erc-fill.el (erc-fill-spaced-commands): Fix typing errors

The type (set integer symbol) matches a list of at most one integer
and one symbol, not multiple distinct symbols.

2 years agoImprove documentation of package-menu commands
Eli Zaretskii [Thu, 18 May 2023 06:41:59 +0000 (09:41 +0300)]
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.

2 years ago; * lisp/erc/erc.el (erc-accidental-paste-threshold-seconds): Doc fix.
F. Jason Park [Wed, 17 May 2023 12:27:13 +0000 (05:27 -0700)]
; * lisp/erc/erc.el (erc-accidental-paste-threshold-seconds): Doc fix.