Commit graph

169128 commits

Author SHA1 Message Date
F. Jason Park
a0ed463bab Spoof channel users in erc-button--phantom-users-mode
* lisp/erc/erc-backend.el (erc--cmem-from-nick-function): Update
forward declaration.
(erc-server-PRIVMSG): Use new name for `erc--user-from-nick-function',
now `erc--cmem-from-nick-function'.
* lisp/erc/erc-button.el (erc-button--phantom-users,
erc-button--phantom-cmems): Rename former to latter.
(erc-button--fallback-user-function,
erc-button--fallback-cmem-function): Rename former to latter.
(erc--phantom-channel-user, erc--phantom-server-user): New superficial
`cl-struct' definitions "subclassing" `erc-channel-user' and
`erc-server-user'.  Note that these symbols lack an `erc-button'
prefix.
(erc-button--add-phantom-speaker): Look for channel member instead of
server user, creating one if necessary.  Return a made-up
`erc-channel-user' along with a fake `erc-server-user'.
(erc-button--get-phantom-user, erc-button--get-phantom-cmem): Rename
former to latter.
(erc-button--phantom-users-mode, erc-button--phantom-users-enable,
erc-button--phantom-users-disable): Use updated "cmem" names for
function-valued interface variables and their implementing functions.
Remove obsolete comment.
(erc-button-add-nickname-buttons): Attempt to query fallback function
for channel member instead of server user.
* lisp/erc/erc.el (erc--user-from-nick-function,
erc--cmem-from-nick-function): Rename former to latter.
(erc--examine-nick, erc--cmem-get-existing): Rename former to
latter.  (Bug#60933)
2023-09-17 16:17:59 -07:00
Stefan Kangas
71a1f0fdc9 Add more missing builtin package declarations
* lisp/emacs-lisp/shorthands.el: Declare library as part of the
'emacs' package.
* lisp/epa-ks.el: Declare library as part of the 'epa'
package.  (Bug#55388)
2023-09-18 01:14:01 +02:00
F. Jason Park
69a154616e Run erc--scrolltobottom-on-pre-insert unconditionally
* lisp/erc/erc-goodies.el (erc--scrolltobottom-all): Pass `no-force'
argument to `set-window-start'.
(erc--scrolltobottom-on-pre-insert): Convert from generic to normal
function and drop `erc-input' method completely.  A non-nil `insertp'
slot means a message is marked for insertion in the read-only portion
of the buffer, above the prompt.  But conditionally restoring window
parameters based on that flag is insufficient because the window still
needs adjusting whenever input is typed, regardless of whether it's
erased or "inserted."  (Bug#64855)
2023-09-17 16:06:49 -07:00
F. Jason Park
c1e86203b0 Simplify erc--fill-module-docstring
* lisp/erc/erc-common.el (erc--fill-module-docstring): Don't run hooks
for major mode when filling.  Prefer `lisp-data-mode' to
`emacs-lisp-mode'.
2023-09-17 16:06:49 -07:00
F. Jason Park
ef4a3c2a6d ; Fix example in display-buffer section of ERC manual
* doc/misc/erc.texi: Fix `display-buffer-alist' example and mention
that it's only meant for users of Emacs 29 and above.
* test/lisp/erc/erc-tests.el (erc-setup-buffer--custom-action): Add
simplistic test case for example in manual.
2023-09-17 16:06:49 -07:00
Jim Porter
7d2870dc85 Fix running background commands via 'eshell-command'
This regressed (I believe) due to 2ec41c174f.

* lisp/eshell/esh-cmd.el (eshell-resume-eval): Check for non-nil
'retval' instead of for a process list (nil is also a technically a
process list!).

* test/lisp/eshell/eshell-tests.el
(eshell-test/eshell-command/background-pipeline): Remove unnecessary
'copy-tree'.
(eshell-test/eshell-command/output-buffer/sync)
(eshell-test/eshell-command/output-buffer/async): New tests.
2023-09-17 15:45:45 -07:00
Stefan Kangas
6dfe252fff Delete commented out code from cperl-mode.el
* lisp/progmodes/cperl-mode.el: Delete some commented out code.
2023-09-17 23:37:32 +02:00
Stefan Kangas
f3a50f6dd8 Rename describe-map-tree to help--describe-map-tree
This function should have been made internal in the first place.
* lisp/help.el (help--describe-map-tree): Rename from
'describe-map-tree'.  Keep old name as an obsolete alias, and update
all callers.
2023-09-17 22:56:00 +02:00
Stefan Kangas
94705f8300 ; Fix last change in shell-command-to-string
* lisp/simple.el (shell-command-to-string): Fix typo and improve
wording.  Problem reported by Eli Zaretskii <eliz@gnu.org>.
2023-09-17 20:43:37 +02:00
Jim Porter
ae983e9283 ; Fix a recent change in Eshell
* lisp/eshell/esh-cmd.el (eshell-manipulate): Fix 'eshell-stringify' calls.
(eshell-do-eval): Simplify 'if' condition.
2023-09-17 11:22:19 -07:00
Eli Zaretskii
c3a7084573 ; * lisp/progmodes/flymake.el (flymake-mode): Fix 'cond'.
(cherry picked from commit 16453ed611)
2023-09-17 19:38:33 +03:00
Eli Zaretskii
16453ed611 ; * lisp/progmodes/flymake.el (flymake-mode): Fix 'cond'. 2023-09-17 19:35:30 +03:00
Eli Zaretskii
e65ed92795 ; * lisp/simple.el (suggest-key-bindings): Fix :type. 2023-09-17 19:33:11 +03:00
Mattias Engdegård
f8ea47ebf4 Expanded defcustom type byte-compilation warnings (bug#65852)
Warn about more kinds of mistakes in :type arguments of `defcustom`
and `define-widget`.  These include:

- misplaced keyword args, as in (const red :tag "A reddish hue")
- missing subordinate types, as in (repeat :tag "List of names")
  or (choice list string)
- duplicated values, as in (choice (const yes) (const yes))
- misplaced `other` member, as in
  (choice (const red) (other nil) (const blue))
- various type name mistakes, as in (vector bool functionp)

* lisp/emacs-lisp/bytecomp.el (byte-compile--defcustom-type-quoted)
(byte-compile-nogroup-warn): Remove.
(byte-compile-normal-call): Remove call to the above.
(bytecomp--cus-warn, bytecomp--check-cus-type)
(bytecomp--custom-declare): New.
2023-09-17 17:16:35 +02:00
Stefan Kangas
94bef169e2 Document shell-command-to-string security considerations
* lisp/simple.el (shell-command-to-string): Document security
considerations in docstring.
2023-09-17 17:06:43 +02:00
Stefan Kangas
e0070fc574 Improve org-babel-execute:eshell docstring
* lisp/org/ob-eshell.el (org-babel-execute:eshell): Improve docstring.
2023-09-17 16:57:25 +02:00
Stefan Kangas
1e270e580d ; Grammar fixes ("allow to" et al)
Ref:
https://lists.gnu.org/r/emacs-devel/2016-01/msg01598.html
https://lists.gnu.org/r/emacs-devel/2016-01/msg01465.html
2023-09-17 16:49:21 +02:00
Stefan Kangas
46c30c6df7 Make obsolete flymake proc less prominent in manual
* doc/misc/flymake.texi: Don't mention obsolete legacy support on the
first page.  It is still documented in a separate chapter.
2023-09-17 15:36:35 +02:00
Mauro Aranda
b74d9e8bad Fix shell-indirect-setup-hook :type (Bug#66051)
* lisp/shell.el (shell-indirect-setup-hook): It's a hook, not a
boolean.
2023-09-17 15:08:15 +02:00
Michael Albinus
0d493116ae Make "toolbox" and "flatpak" multi-hop completion capable in Tramp
* lisp/net/tramp-container.el (tramp-skeleton-completion-function):
Bind `tramp-verbose' to 0.
(tramp-toolbox--completion-function)
(tramp-flatpak--completion-function): Use METHOD as argument.
Use `tramp-skeleton-completion-function'.
(tramp-completion-multi-hop-methods): Add "toolbox" and "flatpak".
2023-09-17 12:13:14 +02:00
Thomas Hilke
f549d4330f Remove column quoting from sqlite-mode
* lisp/sqlite-mode.el (sqlite-mode--column-names): Unquote column
name.  (Bug#65998)

Copyright-paperwork-exempt: yes
2023-09-17 13:02:50 +03:00
Christophe Troestler
e686fb9de3 Add prettify-symbols configuration to 'rust-ts-mode'
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode-prettify-symbols-alist): New variable.
(rust-ts-mode--prettify-symbols-compose-p): New function.
(rust-ts-mode): Use it.
2023-09-17 12:57:23 +03:00
Eli Zaretskii
38757723e1 Support Unicode version 15.1
* admin/unidata/BidiBrackets.txt:
* admin/unidata/BidiMirroring.txt:
* admin/unidata/Blocks.txt:
* admin/unidata/IdnaMappingTable.txt:
* admin/unidata/NormalizationTest.txt:
* admin/unidata/PropertyValueAliases.txt:
* admin/unidata/ScriptExtensions.txt:
* admin/unidata/Scripts.txt:
* admin/unidata/SpecialCasing.txt:
* admin/unidata/UnicodeData.txt:
* admin/unidata/confusables.txt:
* admin/unidata/copyright.html:
* test/manual/BidiCharacterTest.txt:
* admin/unidata/emoji-data.txt:
* admin/unidata/emoji-sequences.txt:
* admin/unidata/emoji-test.txt:
* admin/unidata/emoji-variation-sequences.txt:
* admin/unidata/emoji-zwj-sequences.txt: Update from Unicode data
files.
* admin/notes/unicode: Update instructions.
* lisp/international/characters.el: Update 'char-width-table'
data.
* etc/NEWS: Announce support for Unicode 15.1.
2023-09-17 11:40:06 +03:00
Theodor Thornhill
cf7efabe3f Add indentation rules for type_arguments
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Indent
as opening braces.
2023-09-17 08:19:05 +02:00
Eli Zaretskii
d2f6a5c59a Merge from origin/emacs-29
bcf287bd11 typescript-ts-mode.el: Minor touches
67c8271076 Improve namespacing situation WRT to recent change in typ...
33ff4fed03 Make move-end-of-line in minibuffer consistent (bug#65980)
2023-09-17 01:26:46 -04:00
Po Lu
b2362cdced Speed up Android context menu generation
* src/androidmenu.c (android_menu_show, android_dialog_show):
Circumvent JNI dynamic method dispatch overhead.
2023-09-17 09:12:48 +08:00
Dmitry Gutov
bcf287bd11 typescript-ts-mode.el: Minor touches
* lisp/progmodes/typescript-ts-mode.el
(tsx-ts-mode--indent-compatibility-b893426)
(tsx-ts-mode--font-lock-compatibility-bb1f97b):
Catch specific error.
(typescript-ts-base-mode): Improve docstring (bug#65470).
2023-09-16 23:03:44 +03:00
Dmitry Gutov
67c8271076 Improve namespacing situation WRT to recent change in typescript-ts-mode.el
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts--syntax-propertize):
Rename from ts-ts--syntax-propertize.
(tsx-ts--syntax-propertize-captures):
Rename from ts-ts--syntax-propertize-captures.
(typescript-ts--s-p-query):
Rename from ts-ts--s-p-query.
Update all references (bug#65470).
2023-09-16 23:03:44 +03:00
Michael Albinus
41a45373c1 ; Add some comments in Tramp 2023-09-16 20:36:28 +02:00
Michael Albinus
9e736d254a Improve Tramp messages
* lisp/net/tramp-message.el (tramp-debug-message): Publish the
name of the debug file name.
2023-09-16 20:35:57 +02:00
Michael Albinus
f0f4cbfe87 Make "kubernetes" multi-hop completion capable in Tramp
* lisp/net/tramp-container.el (tramp-skeleton-completion-function):
New defmacro.
(tramp-container--completion-function): Use it.
(tramp-kubernetes--completion-function): Use METHOD as argument.
Use `tramp-skeleton-completion-function'.
(tramp-skeleton-kubernetes-vector): New defmacro.
(tramp-kubernetes--current-context)
(tramp-kubernetes--current-context-data): Use it.
(tramp-completion-multi-hop-methods): Add "kubernetes".
2023-09-16 20:35:35 +02:00
Michael Albinus
be70f4ab0e Adapt tramp-otp-password-prompt-regexp
* lisp/net/tramp.el (tramp-otp-password-prompt-regexp):
Use `tramp-compat-password-colon-equivalents'.
2023-09-16 20:34:06 +02:00
Stefan Kangas
7ff836b366 Revert "Mark two tests as expensive"
This reverts commit 1d952078c0.
2023-09-16 19:09:04 +02:00
Eli Zaretskii
2a8ad64ddd Revert "Don't use pointer arithmetic for untagging Lisp values"
This reverts commit 056c99a34c.
It broke compilation of 32-bit build --with-wide-int.
2023-09-16 20:03:59 +03:00
Eli Zaretskii
f24aeaf4ff Revert "* src/lisp.h (XUNTAG): Work on 32-bit --with-wide-int builds"
This reverts commit c0788f0c47.
Let's finish discussing this before rushing to push.
2023-09-16 20:03:30 +03:00
Mattias Engdegård
c0788f0c47 * src/lisp.h (XUNTAG): Work on 32-bit --with-wide-int builds
This eliminates a compiler warning for that configuration
(see bug#65491).
2023-09-16 18:37:17 +02:00
Mattias Engdegård
056c99a34c Don't use pointer arithmetic for untagging Lisp values
* src/lisp.h (XUNTAG):
Instead of casting a Lisp value to char * and subtracting the tag,
cast it to a suitable integral type and work on that.

This should result in identical or at least equivalent code, except
that it avoids potential problems arising from the restrictions on
pointer arithmetic in C.  In particular, a null pointer can be neither
an operand in nor the result of pointer arithmetic.

C compilers know this and would, prior to this change, optimise

  XUNTAG(obj, Lisp_Int0, mytype) != NULL

to 1.  This means, for example, that make_pointer_integer and
XFIXNUMPTR could not be entrusted with null pointers, and
next_vector in alloc.c was unsafe to use.
2023-09-16 16:32:05 +02:00
Mattias Engdegård
b1881d7dab More accurate static vector block size assertion
* src/alloc.c: The size of a vector block is bound by the number of
words, not bytes, represented by the pseudovector header RESTSIZE
field, because that limits how big a PVEC_FREE object can be.
2023-09-16 16:32:05 +02:00
Stefan Kangas
94b1de2774 Add missing builtin package declarations
* lisp/finder.el (finder--builtins-alist): Add new package
directories 'leim' and 'obsolete' as part of the 'emacs' package.
Add new package directory 'use-package' as part of the
'use-package' package.
* lisp/net/eudc-capf.el:
* lisp/net/eudcb-ecomplete.el:
* lisp/net/eudcb-macos-contacts.el:
* lisp/net/eudcb-mailabbrev.el: Declare library as part of the
'eudc' package.
* lisp/mail/ietf-drums-date.el: Declare library as part of the
'ietf-drums' package.
* lisp/image/image-dired-dired.el:
* lisp/image/image-dired-external.el:
* lisp/image/image-dired-tags.el:
* lisp/image/image-dired-util.el: Declare library as part of the
'image-dired' package.
* lisp/emacs-lisp/oclosure.el:
* lisp/keymap.el:
* lisp/progmodes/c-ts-common.el: Declare library as part of the
'emacs' package.  (Bug#62751)
2023-09-16 14:36:24 +02:00
Stephen Berman
33ff4fed03 Make move-end-of-line in minibuffer consistent (bug#65980)
* lisp/simple.el (move-end-of-line): Always move to eol when
invoking `C-e' from within the minibuffer's prompt string.
2023-09-16 14:00:24 +02:00
Eli Zaretskii
302bc23f7c Merge from origin/emacs-29
755ae813a6 ; Declare some treesit.c functions in typescript-ts-mode.el.
89fa204b70 Fix loss of encrypted data in plstore.el
d9a1175a61 Close SQL database when corresponding 'sqlite-mode' buffe...
cbd8fac283 Fix Unicode normalization of characters
825be05b37 Support one-time passwords in Tramp
f880b94e64 Fix the 'C' and 'c' categories of characters
58fd212d8a Fix Emoji zooming commands
8970cdd009 ; Fix last change.
ba924be452 ; * etc/DEBUG: Improve the redisplay section.
e110312ad9 ; * doc/lispref/minibuf.texi (Text from Minibuffer): Ment...
65f4810003 tsx-ts-mode--font-lock-compatibility-bb1f97b: Improve
6fe11b88ed Avoid using --display in emacsclient to reuse frames on PGTK
2fc7463c0e ; * INSTALL: Don't advertise -O3.  (Bug#65988)
29055412f2 ; Fix doc string of 'lsh'
738d854333 Support emacsclient on Windows with server on GNU or Unix...
f0a89fa1d0 ; * lisp/saveplace.el (save-place-ignore-files-regexp): F...
c9cb8ee0fc Fix defcustom in saveplace.el (Bug#65977)
5ec8be1d58 ; * lisp/subr.el (string-suffix-p, string-prefix-p): Doc ...
809305e6d8 Fix 'window-text-pixel-size' when there are several image...
ea14b0dcc2 : Doc fix.
01e8a0c6cb Doc fix for prettify-symbols-unprettify-at-point
0065621d0d (report_overlay_modification): Fix bug#65929
6cc6455e93 Fix SVG colors (bug#56182)
9396d73942 * doc/emacs/text.texi (Outline Minor Mode): Add a note ab...
a65d1a5a16 Improve documentation of 'list-abbrevs'
5dcc4b7eab Tweak s-p-f for js-ts-mode
1fb2fb501f typescript-ts-mode, tsx-ts-mode: Fix syntax properties fo...
946b395e7e * lisp/progmodes/c-ts-mode.el (c++-ts-mode): Provide (bug...
33ee3e588f Fix regression of treesit_cursor_helper_1
d11d81dfcc ; Fix doc typos (Bug#65868)
6554ec2246 Update docs for passing of Thien-Thi Nguyen
5ab2792d5c Update defvar usage tips example in manual
35d88c657e Document using Flymake together with Eglot
3f04efe9e7 ; * src/font.h (struct font): Comment about use of averag...
459b5f6b6d ; * admin/authors.el (authors-aliases): Update.
0c029ae8bc ; tweak etc/TODO item

# Conflicts:
#	admin/authors.el
#	lisp/subr.el
2023-09-16 07:36:49 -04:00
Eli Zaretskii
755ae813a6 ; Declare some treesit.c functions in typescript-ts-mode.el. 2023-09-16 14:26:46 +03:00
Jens Schmidt
89fa204b70 Fix loss of encrypted data in plstore.el
* lisp/plstore.el (plstore--insert-buffer): Fix loss of encrypted
data when a plstore gets opened and saved without being decrypted
between these steps.  (Bug#63627)
2023-09-16 14:05:36 +03:00
Eli Zaretskii
f44c1969b6 ; Fix last change in gdb-mi.el
* lisp/progmodes/gdb-mi.el (gdb-display-io-buffer): Move to before
the first use.  Doc fix.  Change the group to 'gdb-buffers'.

* etc/NEWS: Announce the new option.  (Bug#65007)
2023-09-16 13:41:07 +03:00
StrawberryTea
ce77bfff50 bug#65007: Allow displaying program IO in the GDB buffer
* lisp/progmodes/gdb-mi.el (gdb-split-io-flag): Don't create
IO buffer if `gdb-split-io-flag' is nil.
(gdb-split-io-flag): New user option.

Copyright-paperwork-exempt: yes
2023-09-16 13:30:33 +03:00
Thomas Hilke
d9a1175a61 Close SQL database when corresponding 'sqlite-mode' buffer is killed
* lisp/sqlite-mode.el (sqlite-mode-open-file): Close DB when the
buffer is killed.  (Bug#65998)

Copyright-paperwork-exempt: yes
2023-09-16 13:20:45 +03:00
Jens Schmidt
a5ca1f2d8b Declare more functions as shift-translatable motion commands
* lisp/comint.el (comint-next-prompt, comint-previous-prompt): Declare
as shift-translatable motion commands.
* lisp/textmodes/sgml-mode.el (sgml-skip-tag-backward)
(sgml-skip-tag-forward): Declare as shift-translatable motion
commands.  (Bug#65876)
2023-09-16 13:06:41 +03:00
bug-gnu-emacs@gnu.org
b6659e98a4 bug#65673: Add lua-ts-mode
* lisp/progmodes/lua-ts-mode.el:
* test/lisp/progmodes/lua-ts-mode-resources/indent.erts:
* test/lisp/progmodes/lua-ts-mode-tests.el: New files.
* etc/NEWS: Mention the new mode.
* lisp/progmodes/eglot.el (eglot-server-programs):
* lisp/progmodes/hideshow.el (hs-special-modes-alist):
Support 'lua-ts-mode'.
* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add Lua.
* test/infra/Dockerfile.emba:
* test/infra/test-jobs.yml: Include lua-ts-mode tests.
2023-09-16 13:01:43 +03:00
Mauro Aranda
2ea98ea35c Avoid errors when a restricted-sexp widget is empty
* lisp/wid-edit.el (restricted-sexp): Don't try to read
an empty string when converting the current value to the
external format.  (Bug#63838)

* test/lisp/wid-edit-tests.el (widget-test-restricted-sexp-empty-val):
New test.
2023-09-16 12:56:34 +03:00
Eli Zaretskii
68976b00f1 ; * lisp/edmacro.el (edmacro-reverse-macro-lines): Fix last change. 2023-09-16 12:54:08 +03:00