]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoRename ts-mode.el to typescript-ts-mode.el
Theodor Thornhill [Sat, 26 Nov 2022 00:45:56 +0000 (01:45 +0100)]
Rename ts-mode.el to typescript-ts-mode.el

* lisp/progmodes/ts-mode.el: Move from here...
* lisp/progmodes/typescript-ts-mode.el: ...to here.

2 years agoFix no-accept-focus handling for embedded frames
Po Lu [Fri, 25 Nov 2022 11:35:14 +0000 (19:35 +0800)]
Fix no-accept-focus handling for embedded frames

* src/xterm.c (handle_one_xevent): Don't focus embedded frames
on click if they have `no-accept-focus' set.

2 years agoDrop project--value-in-dir
Dmitry Gutov [Sat, 5 Mar 2022 02:28:31 +0000 (04:28 +0200)]
Drop project--value-in-dir

Drop the project--value-in-dir mechanics, where the user could edit
the value in .dir-locals.el and have it applied instantly without
reverting the current buffer.  It made working in remote buffers with
enable-remote-dir-locals non-nil slower, which doesn't seem worth it
for a minor improvement of an infrequent operation.  Also less
compexity overall.

* lisp/progmodes/project.el (project-try-vc, project-files)
(project--vc-list-files, project-ignores, project-buffers):
Use the user options directly.
(project--vc-merge-submodules-p, project--value-in-dir):
Delete functions.

2 years ago; * lisp/server.el (server-start): Fix a typo in a warning message.
Jim Porter [Fri, 25 Nov 2022 18:36:20 +0000 (10:36 -0800)]
; * lisp/server.el (server-start): Fix a typo in a warning message.

2 years ago; lisp/progmodes/which-func.el: Mark emacs-devel as maintainer.
Stefan Kangas [Fri, 25 Nov 2022 14:01:03 +0000 (15:01 +0100)]
; lisp/progmodes/which-func.el: Mark emacs-devel as maintainer.

2 years ago; * lisp/progmodes/which-func.el: Remove obsolete comment
Juanma Barranquero [Fri, 25 Nov 2022 13:46:14 +0000 (14:46 +0100)]
; * lisp/progmodes/which-func.el: Remove obsolete comment

2 years agoDisable auth-source-pass-extra-query-keywords by default
F. Jason Park [Fri, 25 Nov 2022 05:03:03 +0000 (21:03 -0800)]
Disable auth-source-pass-extra-query-keywords by default

* doc/misc/auth.texi: Mention subdomain matching in
`auth-source-pass-extra-query-keywords' section.
* etc/NEWS: Mention the loss of traditional auth-source-pass features
when `auth-source-pass-extra-query-keywords' is enabled.
* lisp/auth-source-pass (auth-source-pass-extra-query-keywords): Set
default to nil.  Mention domain matching in doc string.
(auth-source-pass--match-regexp): Allow username to contain "@".
* lisp/erc/erc-compat.el:
(erc-compat--29-auth-source-pass--retrieve-parsed): Adjust regexp.
* test/lisp/auth-source-pass-tests.el
(auth-source-pass-extra-query-keywords--suffixed-user): make plain
username more email-like.
(Bug#58985.)

2 years ago; * lisp/progmodes/python.el (treesit-node-prev-sibling): Declare.
Eli Zaretskii [Fri, 25 Nov 2022 13:36:18 +0000 (15:36 +0200)]
; * lisp/progmodes/python.el (treesit-node-prev-sibling): Declare.

2 years ago; Fix doc strings in xref.el
Eli Zaretskii [Fri, 25 Nov 2022 13:29:10 +0000 (15:29 +0200)]
; Fix doc strings in xref.el

* lisp/progmodes/xref.el (xref-history-storage)
(xref-global-history, xref-window-local-history): Doc fixes.

2 years ago; * src/sqlite.c (Fsqlite_version): Doc fix.
Eli Zaretskii [Fri, 25 Nov 2022 13:00:07 +0000 (15:00 +0200)]
; * src/sqlite.c (Fsqlite_version): Doc fix.

2 years agoAdd sqlite library version string retrieval function (bug#58766)
Mattias Engdegård [Fri, 25 Nov 2022 09:42:38 +0000 (10:42 +0100)]
Add sqlite library version string retrieval function (bug#58766)

* src/sqlite.c (sqlite3_libversion, load_dll_functions):
Make sqlite3_libversion available.
(Fsqlite_version): New.
(syms_of_sqlite): Define sqlite-version.
* doc/lispref/text.texi (Database): Document.
* test/src/sqlite-tests.el (sqlite-returning): `RETURNING` was added
in sqlite 3.35; skip the test for older versions.

2 years agoFix regex errors in csharp-mode
Theodor Thornhill [Thu, 24 Nov 2022 22:12:40 +0000 (23:12 +0100)]
Fix regex errors in csharp-mode

* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax):
Repetition errors in regex.

(csharp-compilation-re-xbuild-warning): Make regex match regex for
xbuild-error.

2 years agoCC Mode: Fix the "asymmetry rule" for fontifying a type followed by *
Alan Mackenzie [Fri, 25 Nov 2022 09:49:02 +0000 (09:49 +0000)]
CC Mode: Fix the "asymmetry rule" for fontifying a type followed by *

This fixes bug #59427.  We now handle correctly the case when a parenthesis
follows the * which is ambiguously a multiplication or indirection operator.
Also, we don't recognise a type thus found as a found type - the evidence is
too weak.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Fix CASE 17.5 as
above.

2 years agoRemove unused parameter from image_create_pix_container
Stefan Kangas [Fri, 25 Nov 2022 09:12:52 +0000 (10:12 +0100)]
Remove unused parameter from image_create_pix_container

* src/image.c (image_create_pix_container): Remove unused
frame parameter. Update callers.

2 years agoShow package name in package-vc--unpack prompt
Daanturo [Thu, 24 Nov 2022 17:06:37 +0000 (00:06 +0700)]
Show package name in package-vc--unpack prompt

* lisp/emacs-lisp/package-vc.el (package-vc--unpack): Display the
package name when asking whether to overwrite its previous
checkout.  (Bug#59548)

2 years ago; Remove unused variable treesit-imenu-function
Stefan Kangas [Fri, 25 Nov 2022 07:57:57 +0000 (08:57 +0100)]
; Remove unused variable treesit-imenu-function

* lisp/treesit.el (treesit-imenu-function): Remove unused
variable.  (Bug#59475)

2 years agoDon't explicitly delete client frames when killing Emacs anyway
Jim Porter [Mon, 21 Nov 2022 19:47:08 +0000 (11:47 -0800)]
Don't explicitly delete client frames when killing Emacs anyway

This eliminates a useless error prompt when killing Emacs from a
client frame when there are no other frames (bug#58877).

* lisp/server.el (server-running-external): New error.
(server--file-name): New function...
(server-eval-at): ... use it.
(server-start): Factor out server stopping code into...
(server-stop): ... here.
(server-force-stop): Use 'server-stop', and tell it not to delete
frames.

* test/lisp/server-tests.el
(server-tests/server-force-stop/keeps-frames): New test.

2 years ago; Add more tests for the Emacs server
Jim Porter [Sun, 20 Nov 2022 06:26:45 +0000 (22:26 -0800)]
; Add more tests for the Emacs server

* test/lisp/server-tests.el (server-tests/emacs-client)
(server-tests/max-wait-time): New constants.
(server-tests/start-emacsclient): New function.
(server-tests/with-server, server-tests/wait-until): New macros.
(server-tests/variable): New variable.
(server-test/server-start-sets-minor-mode): Rename to...
(server-tests/server-start/sets-minor-mode): ... this.
(server-tests/server-start/stop-prompt-with-client)
(server-tests/server-start/no-stop-prompt-without-client)
(server-tests/emacsclient/server-edit)
(server-tests/emacsclient/create-frame, server-test/emacsclient/eval):
New tests.

* test/lib-src/emacsclient-tests.el: Mention the above file.

2 years ago; Fix up some NEWS entries for Eshell
Jim Porter [Fri, 25 Nov 2022 01:22:53 +0000 (17:22 -0800)]
; Fix up some NEWS entries for Eshell

* etc/NEWS (Incompatible changes in Emacs 29.1): Move an entry from
here...
(Changes in Specialized Modes and Packages in Emacs 29.1): ... to
here.  Additionally, improve wording of another entry to be more
precise.

2 years agoMake ibuffer directory filter buffer aware
Gabriel do Nascimento Ribeiro [Thu, 10 Nov 2022 09:11:03 +0000 (06:11 -0300)]
Make ibuffer directory filter buffer aware

* lisp/ibuf-ext.el (define-ibuffer-filter): Make ibuffer directory
filter buffer aware for buffer not visiting files.  (Bug#59165)

2 years agoAdd support for window-local xref history
Ackerley Tng [Fri, 25 Nov 2022 00:58:33 +0000 (02:58 +0200)]
Add support for window-local xref history

* lisp/progmodes/xref.el (xref-history-storage):
New user option (bug#59381).
(xref--make-xref-history): New function.
(xref--history): Use it.
(xref-global-history, xref-window-local-history): New function.
(xref--get-history): New function.
(xref--push-backward, xref--push-forward)
(xref-push-marker-stack, xref-go-back, xref-go-forward)
(xref-clear-marker-stack, xref-marker-stack-empty-p)
(xref-forward-history-empty-p): Use it.

2 years agoBind Buffer-menu-view-other-window to "O"
Stefan Kangas [Fri, 25 Nov 2022 00:38:03 +0000 (01:38 +0100)]
Bind Buffer-menu-view-other-window to "O"

* lisp/buff-menu.el (Buffer-menu-mode-map): Bind
'Buffer-menu-view-other-window' to "O".
(Buffer-menu-mode): Clean up docstring.  (Bug#59280)

2 years ago; * lisp/net/goto-addr.el (goto-address-at-point): Fix last commit.
Stefan Kangas [Fri, 25 Nov 2022 00:26:05 +0000 (01:26 +0100)]
; * lisp/net/goto-addr.el (goto-address-at-point): Fix last commit.

2 years agoAllow goto-address-at-point to use secondary browser
Gabriel do Nascimento Ribeiro [Mon, 21 Nov 2022 11:08:52 +0000 (08:08 -0300)]
Allow goto-address-at-point to use secondary browser

* lisp/net/goto-addr.el (goto-address-at-point): Call
`browse-url-button-open-url', so a prefix argument uses
`browse-url-secondary-browser-function'.  (Bug#59443)

2 years agoFix easy menu separator in oldXMenu
Manuel Giraud [Fri, 18 Nov 2022 21:58:19 +0000 (22:58 +0100)]
Fix easy menu separator in oldXMenu

* lisp/emacs-lisp/easymenu.el (easy-menu-convert-item-1): Replace a
string of dash with a menu separator as the doc says.  (Bug#59370)

2 years agoImprove csharp-ts-mode fontification
Jostein Kjønigsen [Thu, 24 Nov 2022 21:41:29 +0000 (13:41 -0800)]
Improve csharp-ts-mode fontification

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Add more pattern for definition feature.

2 years agoImprove python-ts-mode fontification (bug#59534)
Yuan Fu [Thu, 24 Nov 2022 18:18:14 +0000 (10:18 -0800)]
Improve python-ts-mode fontification (bug#59534)

* lisp/progmodes/python.el (python--treesit-operators): Add operators.
(python--treesit-fontify-string): Fontify BOF docstrings.

2 years agoWork around lsp-mode compatibility bug
Paul Eggert [Thu, 24 Nov 2022 20:56:22 +0000 (12:56 -0800)]
Work around lsp-mode compatibility bug

* src/timefns.c (Ftime_subtract): Respect current-time-list when
args are eq (Bug#59506).

2 years ago; Avoid treesit-related byte-compilation warnings
Eli Zaretskii [Thu, 24 Nov 2022 19:24:29 +0000 (21:24 +0200)]
; Avoid treesit-related byte-compilation warnings

* lisp/progmodes/csharp-mode.el:
* lisp/progmodes/ts-mode.el: Declare treesit.c functions.

2 years agoAdd more tree-sitter modes to eglot-server-programs
Brian Leung [Thu, 24 Nov 2022 18:48:07 +0000 (10:48 -0800)]
Add more tree-sitter modes to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Add python-ts-mode
and bash-ts-mode.  (Bug#59550)

2 years ago; * src/emacs.c (usage_message): Fix typo
Philip Kaludercic [Thu, 24 Nov 2022 19:08:17 +0000 (20:08 +0100)]
; * src/emacs.c (usage_message): Fix typo

Author:

2 years ago; * lisp/progmodes/eglot.el (eglot-server-programs): Add csharp-ts-mode.
Eli Zaretskii [Thu, 24 Nov 2022 18:54:38 +0000 (20:54 +0200)]
; * lisp/progmodes/eglot.el (eglot-server-programs): Add csharp-ts-mode.

2 years ago* src/emacs.c (usage_message): Add missing --init-directory entry
Philip Kaludercic [Sun, 20 Nov 2022 21:51:14 +0000 (22:51 +0100)]
* src/emacs.c (usage_message): Add missing --init-directory entry

2 years agoAdd tree-sitter-based modes to eglot-server-programs
Brian Leung [Sat, 12 Nov 2022 22:30:37 +0000 (14:30 -0800)]
Add tree-sitter-based modes to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Add
tree-sitter-based major modes.  (Bug#59229)

2 years agoicalendar: Adjust tests after fixing parsing of sexp entries (bug#56241)
Ulf Jasper [Thu, 24 Nov 2022 17:56:50 +0000 (18:56 +0100)]
icalendar: Adjust tests after fixing parsing of sexp entries (bug#56241)

* test/lisp/calendar/icalendar-tests.el
(icalendar-export-bug-56241-nested-sexps): New.
* test/lisp/calendar/icalendar-tests.el (icalendar-real-world):
Disable testcase for exporting sexp entries that has now become invalid.

2 years agoicalendar.el: Fix parsing of sexp entries (bug#56241)
hokomo [Thu, 24 Nov 2022 17:39:51 +0000 (18:39 +0100)]
icalendar.el: Fix parsing of sexp entries (bug#56241)

* lisp/calendar/icalendar.el (icalendar--convert-sexp-to-ical): Use
read-from-string for parsing sexp entries (bug#56241).
Copyright-paperwork-exempt: yes

2 years agoEglot: don't confuse URLs and windows file paths
dannyfreeman [Thu, 24 Nov 2022 15:22:33 +0000 (15:22 +0000)]
Eglot: don't confuse URLs and windows file paths

bug#59338

* lisp/progmodes/eglot.el (eglot--path-to-uri): Check for windows path

2 years agoRemove fboundp check in eglot--connect
João Távora [Thu, 24 Nov 2022 14:48:35 +0000 (14:48 +0000)]
Remove fboundp check in eglot--connect

project.el is a GNU ELPA :core package, so this kind of trick isn't
needed.

* lisp/progmodes/eglot.el (eglot--connect): Don't fboundp
project-name.

2 years agoEglot: Advertise completion.resolveSupport capabilities
Marcin Pajkowski [Sun, 20 Nov 2022 19:03:57 +0000 (20:03 +0100)]
Eglot: Advertise completion.resolveSupport capabilities

Some servers avoid reporting completion items that
require "additionalTextEdits" capability.  Actually,
'eglot-completion-at-point' function supports such
feature so it can be advertised to LSP server.
* lisp/progmodes/eglot.el (eglot-client-capabilities): Advertise
resolveSupport.  (bug#59465)

Copyright-paperwork-exempt: yes

2 years agoAdd new SI prefixes
Mattias Engdegård [Thu, 24 Nov 2022 12:47:55 +0000 (13:47 +0100)]
Add new SI prefixes

* lisp/calc/calc-units.el (math-unit-prefixes):
* lisp/files.el (file-size-human-readable):

Add ronna, quetta, ronto and quecto.  (We get the future IEC binary
prefixes Ri and Qi (robi and quebi) in `file-size-human-readable` for
free.)

2 years agoFix reentrancy problem/crash in xterm.c
Po Lu [Thu, 24 Nov 2022 12:10:14 +0000 (20:10 +0800)]
Fix reentrancy problem/crash in xterm.c

* src/xterm.c (x_ignore_errors_for_next_request)
(x_stop_ignoring_errors): Be paranoid and block input inside the
protected section.
(x_focus_frame): Block input around critical section.

2 years agoFix trashing of symlink that points at a directory
Mike Kupfer [Mon, 21 Nov 2022 00:44:20 +0000 (16:44 -0800)]
Fix trashing of symlink that points at a directory

* lisp/files.el (move-file-to-trash): Redefine is-directory so
that it is false for symlinks.

2 years agoFix cross-filesystem directory trashing (Bug#58721)
Mike Kupfer [Sun, 30 Oct 2022 17:31:11 +0000 (10:31 -0700)]
Fix cross-filesystem directory trashing (Bug#58721)

* lisp/files.el (move-file-to-trash): When trashing a directory with
the same name as something that's already in the trash, copy it into
the trash folder and then delete it, rather than using rename-file.

2 years agoCC Mode: Make it scroll fast over buffers with only #define's
Alan Mackenzie [Thu, 24 Nov 2022 10:51:03 +0000 (10:51 +0000)]
CC Mode: Make it scroll fast over buffers with only #define's

* lisp/progmodes/cc-engine.el (c-forward-over-token): New LIMIT parameter

* lisp/progmodes/cc-langs.el (c-anchored-hash-define-no-parens): Replace
ill-formed regular expression (which mixed \\sw and character alternative)
with simpler efficient regexp.

* lisp/progmodes/cc-mode.el (c-fl-decl-end): New forward limit LIM+ used in
c-forward-declarator and c-forward-over-token.

2 years agoFix face issues in show-paren context overlay (bug#59527)
Tassilo Horn [Thu, 24 Nov 2022 09:47:54 +0000 (10:47 +0100)]
Fix face issues in show-paren context overlay (bug#59527)

* lisp/paren.el (show-paren--show-context-in-overlay): Use
show-paren-priority as overlay priority (fixes problem 2 of
bug#59527).
* lisp/simple.el (blink-paren-open-paren-line-string): Ensure the
context lines are font-locked before taking the
buffer-substring (fixes problem 1 of bug#59527).

2 years agoAvoid assertion violations in treesit.c when editing non-ASCII
Eli Zaretskii [Thu, 24 Nov 2022 09:09:51 +0000 (11:09 +0200)]
Avoid assertion violations in treesit.c when editing non-ASCII

* src/treesit.c (make_treesit_parser): Use byte positions when
initializing 'lisp_parser'.  This avoids assertion violations when
the buffer has non-ASCII characters.

2 years agoEUDC: Improve LDAP and BBDB tests
Thomas Fitzsimmons [Thu, 24 Nov 2022 07:16:26 +0000 (02:16 -0500)]
EUDC: Improve LDAP and BBDB tests

* test/lisp/net/eudc-tests.el (eudcb-ldap): Make slapd detection
reliable.
* test/lisp/net/eudc-resources/bbdb: Add another test contact.

2 years ago; Relayout comments in treesit-font-lock-fontify-region
Yuan Fu [Thu, 24 Nov 2022 03:46:38 +0000 (19:46 -0800)]
; Relayout comments in treesit-font-lock-fontify-region

; * lisp/treesit.el (treesit-font-lock-fontify-region): Relayout
comments.

2 years ago; * lisp/progmodes/csharp-mode.el: Add missing require form.
Yuan Fu [Thu, 24 Nov 2022 03:34:10 +0000 (19:34 -0800)]
; * lisp/progmodes/csharp-mode.el: Add missing require form.

2 years agoAdd an error fontification heuristic to c-ts-mode
Yuan Fu [Thu, 24 Nov 2022 01:35:15 +0000 (17:35 -0800)]
Add an error fontification heuristic to c-ts-mode

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Use new
function.
(c-ts-fontify-error): New function.

2 years ago; * src/treesit.c (treesit_predicate_match): Move use below check.
Yuan Fu [Thu, 24 Nov 2022 01:24:03 +0000 (17:24 -0800)]
; * src/treesit.c (treesit_predicate_match): Move use below check.

2 years agoDon't always filter out captured tree-sitter nodes outside of region
Yuan Fu [Wed, 23 Nov 2022 23:20:19 +0000 (15:20 -0800)]
Don't always filter out captured tree-sitter nodes outside of region

* lisp/treesit.el (treesit-font-lock-fontify-region): If the capture
name is a function, don't filter.

2 years agoproject-switch-project: Use a different fix for bug#58784
Dmitry Gutov [Thu, 24 Nov 2022 02:33:01 +0000 (04:33 +0200)]
project-switch-project: Use a different fix for bug#58784

* lisp/progmodes/project.el (project-current-inhibit-prompt):
Rename to 'project-current-directory-override', and make it a
string value.
(project-current): Refer to it.
(project-switch-project): Bind it.  Drop the temp buffer (bug#58784).

2 years agoAdd test scenarios for local ERC modules
F. Jason Park [Mon, 21 Nov 2022 03:01:32 +0000 (19:01 -0800)]
Add test scenarios for local ERC modules

* test/lisp/erc/erc-scenarios-base-local-modules.el: New file.
* test/lisp/erc/resources/base/local-modules/first.eld: New file.
* test/lisp/erc/resources/base/local-modules/fourth.eld: New file
* test/lisp/erc/resources/base/local-modules/second.eld: New file.
* test/lisp/erc/resources/base/local-modules/third.eld: New file.
(Bug#57955.)

2 years agoAccept functions in place of passwords in ERC
F. Jason Park [Sun, 13 Nov 2022 09:52:48 +0000 (01:52 -0800)]
Accept functions in place of passwords in ERC

* lisp/erc/erc-backend.el (erc-session-password): Add comment
explaining type is now string, nil, or function.
* lisp/erc/erc-compat.el (erc-compat--29-auth-source-pass-search):
Use obfuscation from auth-source function when available.
* lisp/erc/erc-sasl.el (erc-sasl--read-password,
erc-server-AUTHENTICATE): Use `erc--unfun'.
* lisp/erc/erc-services.el (erc-nickserv-get-password,
erc-nickserv-send-identify): Use `erc--unfun'.
* lisp/erc/erc.el (erc--unfun): New function for unwrapping a
password couched in a getter.
(erc--debug-irc-protocol-mask-secrets): Add variable to indicate
whether to mask passwords in debug logs.
(erc--mask-secrets): New function to swap masked secret with question
marks in debug logs.
(erc-log-irc-protocol): Conditionally mask secrets when
`erc--debug-irc-protocol-mask-secrets' is non-nil.
(erc--auth-source-search): Don't unwrap secret from function before
returning.
(erc-server-join-channel, erc-login): Use `erc--unfun'.

* test/lisp/erc/erc-services-tests.el
(erc-services-tests--wrap-search): Add helper for `erc--unfun'.
(erc-services-tests--auth-source-standard,
erc-services-tests--auth-source-announced,
erc-services-tests--auth-source-overrides, erc-nickserv-get-password):
Use `erc--unfun'.
* test/lisp/erc/erc-tests.el (erc--debug-irc-protocol-mask-secrets):
Add test for masking secrets with `erc--unfun' and friends.

2 years agoAdd non-IRCv3 SASL module to ERC
F. Jason Park [Mon, 12 Jul 2021 10:44:28 +0000 (03:44 -0700)]
Add non-IRCv3 SASL module to ERC

* doc/misc/erc.texi: Add SASL section in Advanced Usage chapter to
document the new SASL module.

* etc/ERC-NEWS: Mention addition of erc-sasl module for SASL support.

* lisp/erc/erc-compat.el
(erc-compat--29-sasl-scram-construct-gs2-header,
erc-compat--29-sasl-scram-client-first-message,
erc-compat--29-sasl-scram--client-final-message): Fix encoding bug and
add minimal authorization support with copies of SASL functions
introduced in Emacs 29.

* lisp/erc/erc.el (erc-modules): Add `sasl'.
* lisp/erc/erc-sasl.el: New file (bug#29108).
* test/lisp/erc/erc-sasl-tests.el: New file.
* test/lisp/erc/erc-scenarios-sasl.el: New file.
* test/lisp/erc/resources/sasl/plain-failed.eld: New file.
* test/lisp/erc/resources/sasl/plain.eld: New file.
* test/lisp/erc/resources/sasl/scram-sha-1.eld: New file.
* test/lisp/erc/resources/sasl/scram-sha-256.eld: New file.
* test/lisp/erc/resources/sasl/external.eld: New file.

2 years agoCall erc-login indirectly via new generic wrapper
F. Jason Park [Sun, 18 Sep 2022 08:49:23 +0000 (01:49 -0700)]
Call erc-login indirectly via new generic wrapper

* lisp/erc/erc-backend (erc--register-connection): Add new internal
generic function that defers to `erc-login' by default.
(erc-process-sentinel, erc-server-connect): Call
`erc--register-connection' instead of `erc-login'.

2 years agoSupport local ERC modules in erc-mode buffers
F. Jason Park [Mon, 12 Jul 2021 10:44:28 +0000 (03:44 -0700)]
Support local ERC modules in erc-mode buffers

* doc/misc/erc.texi: Mention local modules in Modules chapter.

* etc/ERC-NEWS: Mention changes to `erc-update-modules'.

* lisp/erc/erc.el (erc-migrate-modules): Add some missing mappings.
(erc-modules): When a user removes a module, disable it and kill its
local variable in all ERC buffers.
(erc-update-modules): Move body of `erc-update-modules' to new
internal function.
(erc--update-modules): Add new function, a renamed and slightly
modified version of `erc-update-modules'.  Specifically, change return
value from nil to a list of minor-mode commands for local modules.
Use `custom-variable-p' to detect flavor.
(erc--merge-local-modes): Add helper for finding local modules
already active as minor modes in an ERC buffer.
(erc-open): Replace `erc-update-modules' with `erc--update-modules'.
Defer enabling of local modules via `erc--update-modules' until after
buffer is initialized with other local vars.  Also defer major-mode
hooks so they can detect things like whether the buffer is a server or
target buffer.  Also ensure local module setup code can detect when
`erc-open' was called with a non-nil `erc--server-reconnecting'.

* lisp/erc/erc-common.el (erc--module-name-migrations,
erc--features-to-modules, erc--modules-to-features): Add alists of
old-to-new module names to support module-name migrations.
(erc--assemble-toggle): Add new helper for constructing mode toggles,
like `erc-sasl-enable'.
(define-erc-modules): Defer to `erc--assemble-toggle' to create toggle
commands.
(erc--normalize-module-symbol): Add helper for `erc-migrate-modules'.

* lisp/erc/erc-goodies.el: Require cl-lib.

* test/lisp/erc/erc-tests.el (erc-migrate-modules,
erc--update-modules): Add rudimentary unit tests asserting correct
module-name mappings.
(erc--merge-local-modes): Add test for helper.
(define-erc-module--global, define-erc-module--local): Add tests
asserting module-creation macro.  (Bug#57955.)

2 years agoMake erc--server-reconnecting non-buffer-local
F. Jason Park [Sat, 19 Nov 2022 06:42:15 +0000 (22:42 -0800)]
Make erc--server-reconnecting non-buffer-local

* lisp/erc/erc-backend.el (erc--server-reconnecting): Mention expected
non-nil value type in doc string.
(erc-server-connect): Don't set `erc--server-reconnecting'.
(erc-server--reconnect): Let-bind `erc--server-reconnecting' instead
of setting it locally in the server buffer.  Set it to an alist
containing the current buffer's local variables.
(erc-process-sentinel-2): Don't set `erc--server-reconnect'.
* lisp/erc/erc.el (erc--cmd-reconnect): Clean up some assertions.
(Bug#57955.)

2 years agoDon't set erc-networks--id until network is known
F. Jason Park [Sun, 13 Nov 2022 09:52:48 +0000 (01:52 -0800)]
Don't set erc-networks--id until network is known

* lisp/erc/erc-networks.el (erc-networks--id-given): Accept a null
argument.
(erc-networks--id-on-connect): Remove unused function.
(erc-networks--id-equal-p): Add method for comparing initialized and
unset IDs.
(erc-networks--update-server-identity): Ensure `erc-networks--id' is
set before continuing search.
(erc-networks--init-identity): Don't assume `erc-networks--id' is
non-nil.  Add branch condition to reload ID on non-nil case.
(erc-networks-on-MOTD-end): Let init-ID function handle renaming of
server buffer.

* lisp/erc/erc.el (erc-open): For continued sessions, try copying over
the last network ID.
(erc--auth-source-determine-params-default): Don't expect a network ID
to have been initialized.
(erc-set-current-nick): When connected, reload network ID.  Leave
comment warning that it may be unneeded.

* lisp/erc/erc-backend.el (erc-server-NICK, erc-server-433): Unless
already connected, schedule ID reload when server rejects or mandates
a nick change.

* test/lisp/erc/erc-scenarios-base-association-nick.el
(erc-scenarios-base-association-nick-bumped,
erc-scenarios-base-association-nick-bumped-mandated-renick): Update to
reflect more liberal association behavior when renamed by IRCd.

2 years agoAdd GS2 authorization to sasl-scram-rfc
F. Jason Park [Tue, 20 Sep 2022 04:28:52 +0000 (21:28 -0700)]
Add GS2 authorization to sasl-scram-rfc

* lisp/net/sasl-scram-rfc.el (sasl-scram-gs2-header-function,
sasl-scram-construct-gs2-header): Add new variable and default
function for determining a SCRAM GSS-API message header.  This is
mainly intended for other libraries rather than end users.
(sasl-scram-client-first-message): Use gs2-header function.
(sasl-scram--client-final-message): Use dedicated gs2-header function.
Also remove whitespace when base64-encoding, as per RFC 5802.
(Bug#57956.)

2 years agoAdd csharp-mode and csharp-ts-mode
Theodor Thornhill [Tue, 22 Nov 2022 20:48:21 +0000 (21:48 +0100)]
Add csharp-mode and csharp-ts-mode

* etc/NEWS: Mention new modes.
* lisp/progmodes/csharp-mode.el (csharp-mode, csharp-ts-mode): New
major modes.

2 years agoDon't skip nested defuns in python-ts-mode defun navigation
Yuan Fu [Wed, 23 Nov 2022 20:08:47 +0000 (12:08 -0800)]
Don't skip nested defuns in python-ts-mode defun navigation

This fixes bug#59495.

Before this change, python tries to skip nested function
definition. Now we don't skip any nested defun.

* lisp/progmodes/python.el (python-treesit-beginning-of-defun)
(python-treesit-end-of-defun): Remove functions.
* lisp/progmodes/python.el (python-ts-mode): Use tree-sitter's default
navigation function.

2 years agoMore flexible tree-sitter defun navigation
Yuan Fu [Wed, 23 Nov 2022 20:07:07 +0000 (12:07 -0800)]
More flexible tree-sitter defun navigation

Before this change, treesit-beginning-of-defun skips nested defuns.
Now user can decide whether to skip nested defuns.

* lisp/treesit.el (treesit-search-forward-goto): Improve docstring.
(treesit-defun-prefer-top-level): New variable.
(treesit--defun-maybe-top-level): New function.
(treesit-beginning-of-defun)
(treesit-end-of-defun): Use treesit--defun-maybe-top-level.

2 years ago; * src/treesit.c: Minor comment improvement.
Yuan Fu [Wed, 23 Nov 2022 20:06:40 +0000 (12:06 -0800)]
; * src/treesit.c: Minor comment improvement.

2 years agoicalendar.el: Add test(s) for bug#56241
Ulf Jasper [Wed, 23 Nov 2022 19:31:42 +0000 (20:31 +0100)]
icalendar.el: Add test(s) for bug#56241

* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--get-error-string-for-export): new.
* icalendar-tests.el (icalendar-export-bug-56241-dotted-pair): new

2 years agoNew commands previous-line-completion and next-line-completion (bug#59486)
Juri Linkov [Wed, 23 Nov 2022 18:44:37 +0000 (20:44 +0200)]
New commands previous-line-completion and next-line-completion (bug#59486)

* lisp/simple.el (completion-list-mode-map): Bind [up] to
'previous-line-completion', and [down] to 'next-line-completion'.
(completion-auto-wrap): Mention `next-line-completion' and
`previous-line-completion' in the docstring.
(previous-line-completion, next-line-completion): New commands.

2 years agoDon't break when loading VC packages on older Emacs versions
Philip Kaludercic [Sun, 20 Nov 2022 14:36:24 +0000 (15:36 +0100)]
Don't break when loading VC packages on older Emacs versions

* lisp/emacs-lisp/package-vc.el
(package-vc--generate-description-file): Append a :kind property
instead of modifying the version number.
* lisp/emacs-lisp/package.el (package-desc): Remove special handling
for "vc annotated" versions.  (bug#59404)

2 years ago* lisp/help.el (describe-bindings): Use the outline-default-rules feature.
Juri Linkov [Wed, 23 Nov 2022 18:33:18 +0000 (20:33 +0200)]
* lisp/help.el (describe-bindings): Use the outline-default-rules feature.

Set buffer-local outline-default-state to 1, and outline-default-rules
to match "Key translations", instead of searching and hiding this section
explicitly.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Wed, 23 Nov 2022 18:33:26 +0000 (20:33 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoSupport Racket programs in 'etags'
lu4nx [Wed, 23 Nov 2022 15:54:54 +0000 (23:54 +0800)]
Support Racket programs in 'etags'

* lib-src/ctags.c (Scheme_suffixes): Add the Racket language
extension ".rkt".

Copyright-paperwork-exempt: yes

2 years agoxref--search-property: Jump over entries hidden by outline-minor-mode
Dmitry Gutov [Wed, 23 Nov 2022 18:24:43 +0000 (20:24 +0200)]
xref--search-property: Jump over entries hidden by outline-minor-mode

* lisp/progmodes/xref.el (xref--search-property):
Jump over entries hidden by e.g. outline-minor-mode (bug#49731).

2 years ago; * src/pdumper.c (dump_buffer, dump_vectorlike): Update hashes.
Eli Zaretskii [Wed, 23 Nov 2022 18:22:19 +0000 (20:22 +0200)]
; * src/pdumper.c (dump_buffer, dump_vectorlike): Update hashes.

2 years agoAvoid signaling args-out-of-range in mouse.el
Eli Zaretskii [Wed, 23 Nov 2022 15:16:32 +0000 (17:16 +0200)]
Avoid signaling args-out-of-range in mouse.el

* lisp/mouse.el (mouse-posn-property): Avoid
signaling args-out-of-range errors when mode-line format uses
min-width 'display' property.  (Bug#59452)

2 years agoImprove documentation of locale-specific string comparison
Eli Zaretskii [Wed, 23 Nov 2022 14:54:01 +0000 (16:54 +0200)]
Improve documentation of locale-specific string comparison

* doc/lispref/strings.texi (Text Comparison):
* src/fns.c (Fstring_collate_equalp): Improve documentation of
'string-collate-equalp' and 'string-collate-lessp'.  (Bug#59275)

2 years agoFix error signaled by mouse-highlight on mode line
Eli Zaretskii [Wed, 23 Nov 2022 14:18:55 +0000 (16:18 +0200)]
Fix error signaled by mouse-highlight on mode line

* src/xdisp.c (note_mode_line_or_margin_highlight): Avoid
signaling args-out-of-range errors when mode-line format uses
min-width 'display' property.  (Bug#59452)

2 years agoImprove last change to xterm.c
Po Lu [Wed, 23 Nov 2022 12:36:39 +0000 (20:36 +0800)]
Improve last change to xterm.c

* src/xfns.c (Fx_display_last_user_time): Reject overly large
timestamps.
* src/xterm.c (x_display_set_last_user_time, handle_one_xevent):
New functions.

2 years agoRestore tramp-achive's Emacs 26 compatibility
Michael Albinus [Wed, 23 Nov 2022 11:00:35 +0000 (12:00 +0100)]
Restore tramp-achive's Emacs 26 compatibility

* lisp/net/tramp-archive.el (tramp-archive-autoload-file-name-regexp):
Special handling of Emacs 26.  Simplify the other part.

* test/lisp/net/tramp-tests.el (tramp-test48-unload): Special case
of `tramp-register-archive-file-name-handler'.

2 years ago; * doc/lispintro/emacs-lisp-intro.texi (Complete kill-region): Fix typo
Shynur [Wed, 23 Nov 2022 09:26:46 +0000 (10:26 +0100)]
; * doc/lispintro/emacs-lisp-intro.texi (Complete kill-region): Fix typo

2 years ago* lisp/outline.el: 'S-<down-mouse-1>' on buffer buttons cycles all outlines.
Juri Linkov [Wed, 23 Nov 2022 08:50:23 +0000 (10:50 +0200)]
* lisp/outline.el: 'S-<down-mouse-1>' on buffer buttons cycles all outlines.

(outline--create-button-icons, outline--insert-button): Bind 'S-<mouse-1>' to
'outline-cycle-buffer' as it's already done for buttons on the margins.
Ignore 'S-<down-mouse-1>'.  Don't hard-code 'help-echo' since it should be
customizable by the ':help-echo' keyword in 'define-icon'.

2 years ago* lisp/progmodes/xref.el: Support outline-minor-mode (bug#49731)
Juri Linkov [Wed, 23 Nov 2022 08:38:28 +0000 (10:38 +0200)]
* lisp/progmodes/xref.el: Support outline-minor-mode (bug#49731)

(xref--xref-buffer-mode): Set buffer-local variables outline-minor-mode-cycle,
outline-minor-mode-use-buttons, outline-search-function, outline-level
as settings for enabling outline-minor-mode in xref output buffers where
outline headings are xref groups, and their lines can be hidden by
outline commands.

2 years ago; Fix typos
Stefan Kangas [Wed, 23 Nov 2022 04:43:19 +0000 (05:43 +0100)]
; Fix typos

2 years ago; Remove obsolete use of inhibit-point-motion-hooks
Yuan Fu [Wed, 23 Nov 2022 03:57:44 +0000 (19:57 -0800)]
; Remove obsolete use of inhibit-point-motion-hooks

* lisp/treesit.el (treesit-font-lock-fontify-region): Remove it.

2 years agoTweak python-ts-mode fontification (bug#59470)
Yuan Fu [Wed, 23 Nov 2022 02:47:47 +0000 (18:47 -0800)]
Tweak python-ts-mode fontification (bug#59470)

* lisp/progmodes/python.el (python--treesit-settings): Only fontify
the @ and the identifier of a decorator, not the argument list (if
there is any).

2 years agoUtilize new font-lock faces for more tree-sitter modes (Bug#59397)
Randy Taylor [Sun, 20 Nov 2022 03:30:13 +0000 (22:30 -0500)]
Utilize new font-lock faces for more tree-sitter modes (Bug#59397)

* lisp/progmodes/java-ts-mode.el (java-ts-mode--font-lock-settings):
Use font-lock-number-face.
(java-ts-mode): Alphabetize features.
* lisp/progmodes/js.el (js--treesit-operators): Define operators.
(js--treesit-font-lock-settings): Use bracket, delimiter,
escape-sequence, property, number, and operator font-lock faces.
(js-ts-mode): Add them to the feature list and alphabetize.
* lisp/progmodes/json-ts-mode.el (json-ts-mode--font-lock-settings):
Use bracket, delimiter, escape-sequence, and number faces.  Remove
unused features.
(json-ts-mode): Add them to the feature list and alphabetize.
* lisp/progmodes/sh-script.el (sh-mode--treesit-settings): Use
bracket, delimiter, number, misc-punctuation, and operator font-lock
faces.
(sh-mode--treesit-operators): Remove ; and ;; from list.
(bash-ts-mode): Add them to the feature list and alphabetize.
* lisp/progmodes/ts-mode.el (ts-mode--operators): Define operators.
(ts-mode--font-lock-settings): Use escape-sequence, number, and
operator font-lock faces.
(ts-mode): Add them to the feature list and alphabetize.

2 years agoAdd a way to override project name for project-vc backend
Dmitry Gutov [Wed, 23 Nov 2022 02:16:23 +0000 (04:16 +0200)]
Add a way to override project name for project-vc backend

* lisp/progmodes/project.el (project-vc-name): New user option.
(project-name): Override for VC project backend (bug#48747).

2 years ago; * lisp/treesit.el (treesit-ready-p): Guard against empty buffers.
Yuan Fu [Wed, 23 Nov 2022 01:29:26 +0000 (17:29 -0800)]
; * lisp/treesit.el (treesit-ready-p): Guard against empty buffers.

2 years agoFix treesit-update-ranges
Yuan Fu [Tue, 22 Nov 2022 20:01:53 +0000 (12:01 -0800)]
Fix treesit-update-ranges

* lisp/treesit.el (treesit--clip-ranges): New function.
(treesit-update-ranges): Now clips the range within (point-min)
and (point-max), so the new range we use are not out-of-range.

2 years ago; Fix treesit--children-covering-range
Yuan Fu [Tue, 22 Nov 2022 20:01:19 +0000 (12:01 -0800)]
; Fix treesit--children-covering-range

* lisp/treesit.el (treesit--children-covering-range): Handle the case
when NODE doesn't have children, and when CHILD is nil.

2 years ago; * src/casefiddle.c (casify_region): Stylistic change.
Yuan Fu [Tue, 22 Nov 2022 19:18:52 +0000 (11:18 -0800)]
; * src/casefiddle.c (casify_region): Stylistic change.

2 years ago* lisp/progmodes/eglot.el (eglot--connect): Use project-name
Stephen Leake [Tue, 22 Nov 2022 19:43:22 +0000 (11:43 -0800)]
* lisp/progmodes/eglot.el (eglot--connect): Use project-name

As discussed in bug#48747.

2 years ago* lisp/progmodes/project.el (project-name): New
Stephen Leake [Tue, 22 Nov 2022 18:55:59 +0000 (10:55 -0800)]
* lisp/progmodes/project.el (project-name): New

2 years agoFix 'treesit-max-buffer-size' and its use
Eli Zaretskii [Tue, 22 Nov 2022 18:22:41 +0000 (20:22 +0200)]
Fix 'treesit-max-buffer-size' and its use

* lisp/treesit.el (treesit-max-buffer-size): Avoid overflow in
computing buffer-size limit.  Account for 32-but systems built
"--with-wide-int".  Extend doc string.
(treesit-ready-p): Compare the limit with the size of the buffer
in bytes, not in characters.

* src/treesit.c (treesit_check_buffer_size): Measure buffer size
in bytes.

2 years ago; Fix comparisons in treesit.c
Eli Zaretskii [Tue, 22 Nov 2022 16:56:08 +0000 (18:56 +0200)]
; Fix comparisons in treesit.c

* src/treesit.c (Ftreesit_parser_add_notifier)
(Ftreesit_parser_remove_notifier): Fix comparison with Lisp
objects.  (Bug#59483)

2 years agoAdd '\lll' for VERY MUCH LESS-THAN to TeX input method
Robert Pluim [Tue, 22 Nov 2022 15:44:56 +0000 (16:44 +0100)]
Add '\lll' for VERY MUCH LESS-THAN to TeX input method

* lisp/leim/quail/latin-ltx.el (latin-ltx--define-rules): Add '\lll'
translation for U+22D8.  (Bug#59476)

2 years agoAdjust x_display_set_last_user_time for Xlib sign-extension
Po Lu [Tue, 22 Nov 2022 12:57:47 +0000 (20:57 +0800)]
Adjust x_display_set_last_user_time for Xlib sign-extension

* src/xterm.c (x_display_set_last_user_time): Adjust for Xlib
sign extending fields in client messages to 64 bit long, which
then break x_display_set_last_user_time after 24 days, as Time
is unsigned long for historical reasons.  (bug#59480)

2 years agoImprove the doc string of 'string-collate-lessp'
Ihor Radchenko [Tue, 22 Nov 2022 01:21:17 +0000 (09:21 +0800)]
Improve the doc string of 'string-collate-lessp'

* src/fns.c (Fstring_collate_lessp): Clarify that
IGNORE-CASE argument might be ignored when the operating
system does not implement string collation for the
specified locale.  (Bug#59275)

2 years agoFix tree-sitter build using non-bash /bin/sh (bug#59460)
Sam James [Mon, 21 Nov 2022 22:01:37 +0000 (22:01 +0000)]
Fix tree-sitter build using non-bash /bin/sh (bug#59460)

* configure.ac: Don't use '==' in comparisons.

Copyright-paperwork-exempt: yes.

2 years agoAvoid potentially expensive XFlush and fix ordering
Po Lu [Tue, 22 Nov 2022 11:43:14 +0000 (19:43 +0800)]
Avoid potentially expensive XFlush and fix ordering

* src/xterm.c (x_raise_frame): Don't call XFlush without a
request being made.
(x_lower_frame): Fix ordering wrt to xwidget view lowering.

2 years ago; Fix warnings in builds without tree-sitter
Mattias Engdegård [Tue, 22 Nov 2022 10:06:41 +0000 (11:06 +0100)]
; Fix warnings in builds without tree-sitter