1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-01 08:17:38 +00:00
Commit Graph

163643 Commits

Author SHA1 Message Date
Eli Zaretskii
af54523431 ; Fix doc strings in xref.el
* lisp/progmodes/xref.el (xref-history-storage)
(xref-global-history, xref-window-local-history): Doc fixes.
2022-11-25 15:29:10 +02:00
Eli Zaretskii
98c69b2556 ; * src/sqlite.c (Fsqlite_version): Doc fix. 2022-11-25 15:00:07 +02:00
Mattias Engdegård
f35dc7058b 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.
2022-11-25 11:03:10 +01:00
Theodor Thornhill
8910447308 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.
2022-11-25 10:54:54 +01:00
Alan Mackenzie
639adf26a1 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.
2022-11-25 09:49:02 +00:00
Stefan Kangas
a7f8087d7f Remove unused parameter from image_create_pix_container
* src/image.c (image_create_pix_container): Remove unused
frame parameter. Update callers.
2022-11-25 10:18:11 +01:00
Daanturo
bf93e94060 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)
2022-11-25 09:02:16 +01:00
Stefan Kangas
4ee5618c6b ; Remove unused variable treesit-imenu-function
* lisp/treesit.el (treesit-imenu-function): Remove unused
variable.  (Bug#59475)
2022-11-25 08:58:57 +01:00
Jim Porter
28c444f72a 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.
2022-11-24 17:33:53 -08:00
Jim Porter
339893f2e3 ; 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.
2022-11-24 17:27:11 -08:00
Jim Porter
1c1a82bbed ; 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.
2022-11-24 17:22:53 -08:00
Gabriel do Nascimento Ribeiro
75101583c3 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)
2022-11-25 02:09:11 +01:00
Ackerley Tng
65f35b7f6f 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.
2022-11-25 02:58:50 +02:00
Stefan Kangas
e769a8eb44 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)
2022-11-25 01:40:16 +01:00
Stefan Kangas
60354fcf49 ; * lisp/net/goto-addr.el (goto-address-at-point): Fix last commit. 2022-11-25 01:26:05 +01:00
Gabriel do Nascimento Ribeiro
29a262bfa7 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)
2022-11-25 01:21:40 +01:00
Manuel Giraud
2b123edcf6 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)
2022-11-25 00:53:16 +01:00
Jostein Kjønigsen
b0fa3b1a1f
Improve csharp-ts-mode fontification
* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
Add more pattern for definition feature.
2022-11-24 13:47:28 -08:00
Yuan Fu
fc9d7b3d04
Improve python-ts-mode fontification (bug#59534)
* lisp/progmodes/python.el (python--treesit-operators): Add operators.
(python--treesit-fontify-string): Fontify BOF docstrings.
2022-11-24 13:47:27 -08:00
Paul Eggert
55f6f1c82a Work around lsp-mode compatibility bug
* src/timefns.c (Ftime_subtract): Respect current-time-list when
args are eq (Bug#59506).
2022-11-24 12:57:02 -08:00
Eli Zaretskii
149e6e03b3 ; Avoid treesit-related byte-compilation warnings
* lisp/progmodes/csharp-mode.el:
* lisp/progmodes/ts-mode.el: Declare treesit.c functions.
2022-11-24 21:24:29 +02:00
Brian Leung
5ce34327ee 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)
2022-11-24 20:15:02 +01:00
Philip Kaludercic
697aaeb7b3 ; * src/emacs.c (usage_message): Fix typo
Author:
2022-11-24 20:08:36 +01:00
Eli Zaretskii
80b2534605 ; * lisp/progmodes/eglot.el (eglot-server-programs): Add csharp-ts-mode. 2022-11-24 20:54:38 +02:00
Philip Kaludercic
80ed35866e * src/emacs.c (usage_message): Add missing --init-directory entry 2022-11-24 19:50:18 +01:00
Brian Leung
94ec173a73 Add tree-sitter-based modes to eglot-server-programs
* lisp/progmodes/eglot.el (eglot-server-programs): Add
tree-sitter-based major modes.  (Bug#59229)
2022-11-24 19:37:31 +01:00
Ulf Jasper
b604bef915 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.
2022-11-24 18:59:58 +01:00
hokomo
c6c31b2903 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
2022-11-24 18:59:58 +01:00
dannyfreeman
d34fc7b7aa Eglot: don't confuse URLs and windows file paths
bug#59338

* lisp/progmodes/eglot.el (eglot--path-to-uri): Check for windows path
2022-11-24 15:24:35 +00:00
João Távora
fcd5fde090 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.
2022-11-24 15:24:10 +00:00
Marcin Pajkowski
cf439636d4 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
2022-11-24 16:16:09 +02:00
Mattias Engdegård
25e7290d36 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.)
2022-11-24 14:27:51 +01:00
Gregory Heytings
ba9315b164 Merge master into feature/improved-locked-narrowing. 2022-11-24 14:21:30 +01:00
Po Lu
9fcff114b8 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.
2022-11-24 20:10:32 +08:00
Mike Kupfer
867e962cf5 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.
2022-11-24 13:17:08 +02:00
Mike Kupfer
95d827f21e 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.
2022-11-24 13:16:48 +02:00
Alan Mackenzie
3208a42c47 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.
2022-11-24 10:51:03 +00:00
Tassilo Horn
005efce764 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).
2022-11-24 10:47:54 +01:00
Eli Zaretskii
8252211833 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.
2022-11-24 11:09:51 +02:00
Thomas Fitzsimmons
4231481af8 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.
2022-11-24 02:21:38 -05:00
Yuan Fu
183c66be97
; Relayout comments in treesit-font-lock-fontify-region
; * lisp/treesit.el (treesit-font-lock-fontify-region): Relayout
comments.
2022-11-23 19:48:28 -08:00
Yuan Fu
d0cd4ae62e
; * lisp/progmodes/csharp-mode.el: Add missing require form. 2022-11-23 19:48:28 -08:00
Yuan Fu
901f0eab20
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.
2022-11-23 19:48:28 -08:00
Yuan Fu
31fe6b066c
; * src/treesit.c (treesit_predicate_match): Move use below check. 2022-11-23 19:48:28 -08:00
Yuan Fu
00e7da76a7
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.
2022-11-23 19:48:28 -08:00
Dmitry Gutov
b37604c263 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).
2022-11-24 04:33:14 +02:00
F. Jason Park
f8b410f4a1
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.)
2022-11-23 21:23:05 -05:00
F. Jason Park
5258f36168
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.
2022-11-23 21:23:05 -05:00
F. Jason Park
ed8862c404
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.
2022-11-23 21:14:25 -05:00
F. Jason Park
ae254a65cd
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'.
2022-11-23 20:11:55 -05:00