1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-04 08:47:11 +00:00
Commit Graph

169341 Commits

Author SHA1 Message Date
Eli Zaretskii
1e25f1d997 ; * etc/NEWS: Fix wording of a recently-added entry. 2023-10-21 18:18:11 +03:00
Mattias Engdegård
a3db503351 Move lexical-binding warning from checkdoc to byte-compiler
This warning is much more appropriate for the compiler, since lexical
binding affects what it can reason and warn about, than for checkdoc
as the warning has no bearing to documentation at all.
The move also improves the reach of the warning.

* etc/NEWS: Update.
* lisp/emacs-lisp/checkdoc.el (checkdoc-lexical-binding-flag)
(checkdoc-file-comments-engine): Move warning from here....
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): ...to here.
* test/lisp/emacs-lisp/bytecomp-resources/no-byte-compile.el:
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--unescaped-char-literals)
(bytecomp-tests-function-put, bytecomp-tests--not-writable-directory)
(bytecomp-tests--target-file-no-directory):
Update tests.
(bytecomp-tests--log-from-compilation)
(bytecomp-tests--lexical-binding-cookie): New test.
2023-10-21 15:12:55 +02:00
Eli Zaretskii
12c8cdb60c Merge from origin/emacs-29
b99d12c30c ; Fix argument name for function `copy-file'
2023-10-21 08:06:09 -04:00
Eli Zaretskii
5c65241445 ; Merge from origin/emacs-29
The following commits were skipped:

62920dcb0d Update Tramp version (don't merge with master)
d963bc6c6b ; * lisp/ldefs-boot.el: Regenerated for Emacs 29.1.90.
0cbc91f29a Bump Emacs version
2023-10-21 08:06:08 -04:00
Eli Zaretskii
52f25b791e Merge from origin/emacs-29
ab9d6482e3 ; Update ChangeLog.4 and etc/AUTHORS.
d9e1605122 Correctly register focus events concomitant with alpha ch...
194e219825 * doc/man/emacsclient.1: Add missing options.
2023-10-21 08:06:07 -04:00
Eli Zaretskii
1b2083c2f3 ; * src/keyboard.c (line_number_mode_hscroll): Fix last change. 2023-10-21 15:03:22 +03:00
Eli Zaretskii
2fb4108ab7 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2023-10-21 14:34:28 +03:00
Mattias Engdegård
9c82f48059 Move and edit text about lexical environment representation
It's only relevant for the second argument to `eval`; the actual
internal representation is an implementation matter and usually
different from what was described here.

* doc/lispref/variables.texi (Lexical Binding): Move the relevant
part of the description of the internal representation of
lexical environments from here...
* doc/lispref/eval.texi (Eval): ...to here, where it belongs.
2023-10-21 13:10:56 +02:00
Po Lu
e367d1862d ; * src/sfnt.c: Refine doc of variation selectors and GX fonts. 2023-10-21 18:58:13 +08:00
Eli Zaretskii
e57b19b400 Fix mouse clicks on links under 'global-display-line-numbers-mode'
* src/indent.c (line_number_display_width): No longer static.
* src/lisp.h (line_number_display_width): Add prototype.
* src/keyboard.c (save_line_number_display_width)
(line_number_mode_hscroll): New functions.
(make_lispy_event): Call 'save_line_number_display_width' and
'line_number_mode_hscroll' to avoid interpreting up-event as drag
event when redisplay scrolls the text horizontally between the
down- and up-event to account for the changed width of the
line-number display.  (Bug#66655)
2023-10-21 13:53:21 +03:00
Lassi Kortela
e6f05e189d Recognize backslash in dns-mode quoted values
* lisp/textmodes/dns-mode.el (dns-mode-syntax-table): Recognize
backslash as an escape character.  (Bug#66660)
2023-10-21 12:28:34 +02:00
Stefan Kangas
2e19e11638 Don't use obsolete sleep-for argument
* lisp/net/sieve-manage.el (sieve-manage-wait-for-answer):
* lisp/org/ob-lua.el (org-babel-lua-evaluate-session):
* lisp/org/ob-python.el (org-babel-python-initiate-session-by-key):
(org-babel-python-evaluate-session): Don't use obsolete 'sleep-for'
argument.
2023-10-21 12:26:36 +02:00
john muhl
a838bcb23c Support lua-ts-mode in align.el
* lisp/align.el (align-rules-list): Add lua-ts-mode.  (Bug#66466)
* lisp/progmodes/lua-ts-mode.el (lua-ts-mode): Indent region
before aligning.
* test/lisp/align-tests.el (align-lua):
* test/lisp/align-resources/lua-ts-mode.erts: Add tests.
2023-10-21 12:25:25 +02:00
Mauro Aranda
cb89cbc406 Fix eglot-report-progress :type
* lisp/progmodes/eglot.el (eglot-report-progress): Change :type to
choice, to allow 'messages' as a value.  (Bug#66556)
2023-10-21 12:05:31 +02:00
Ulrich Müller
78b998f9aa ; * lisp/progmodes/gud.el (gud-gud-lldb-command-name): Fix a typo. 2023-10-21 11:17:03 +02:00
Po Lu
9ad22b3a01 Facilitate opening multiple files through DND under Android
* java/org/gnu/emacs/EmacsWindow.java (onDragEvent): Agglomerate
each provided content URI into a text/uri list.
2023-10-21 14:25:02 +08:00
Huan Nguyen
8faffc26a6
New keyword :default-language in treesit-font-lock-rules function.
* lisp/treesit.el (treesit-font-lock-rules): Keyword :default-language
LANGUAGE will be chosen for every :feature.  Using :language will
override the :default-language for the next :feature.
2023-10-20 21:09:03 -07:00
Stefan Monnier
c94b6397bd (buffer-match-p): Replace &optional with &rest (bug#65797)
* lisp/subr.el (buffer-match-p--past-warnings): New var.
(buffer-match-p): Use it.  Replace `&optional arg` with `&rest args`.
(match-buffers): Replace `&optional arg` with `&rest args`.

* lisp/window.el (display-buffer-alist): Fix out of date docstring.

* doc/lispref/buffers.texi (Buffer List): Document new calling convention.
2023-10-20 20:42:04 -04:00
Stefan Monnier
696411ab8a (sleep-for): Make the millisec argument obsolete
* lisp/subr.el (sleep-for): Set new advertized calling convention.
* src/dispnew.c (Fsleep_for): Adjust docstring.
* doc/lispref/commands.texi (Waiting): Adjust doc.
2023-10-20 18:59:51 -04:00
F. Jason Park
f109396fe3 Prefer erc-target to erc-default-target
* etc/ERC-NEWS: Mention `erc-target' and new `erc-server-buffer-p'
alias.
* lisp/erc/erc-backend.el (erc-process-sentinel): Set `joined-p' slot
of `erc--target-channel' object to nil when applicable.
(erc-server-JOIN): Mark `erc--target-channel' object as being joined.
* lisp/erc/erc-common.el (erc--target-channel): Add `joined-p' slot.
Use hyphenated name so accessor function's name ends in "joined-p"
rather than "joinedp".  Note that this will always be nil when
disconnected.
(erc--target): Relocate here from erc.el.
(erc-target): New public API function to return the current buffer's
target as a string, even in channels that have been unjoined.
* lisp/erc/erc-networks.el (erc--default-target): Remove forward
declaration.
(erc-networks--id-reload): Use `erc-target' instead of
`erc--default-target' as predicate for visiting target buffers.
* lisp/erc/erc.el (erc-remove-channel-users): Set channel "joinedness"
to nil in `erc--target-channel' object, when applicable.
(erc--target): Move to erc-common.
(erc--default-target): Remove, replaced by new function `erc-target'.
(erc-query-buffer-p): Use `erc-target'.
(erc-after-connect): Revise doc string.
(erc-connection-established): Revise doc string and move
`erc-unhide-query-prompt' business before hook.
(erc--current-buffer-joined-p): Remove comment and use new `joined-p'
slot of `erc--target-channel' for determining "joinedness" of channel.
(erc-kill-buffer-function): Use `erc--target-channel-p' for detecting
whether the buffer is a channel buffer.
* test/lisp/erc/erc-networks-tests.el
(erc-networks--shrink-ids-and-buffer-names--hook-collapse-target):
Remove comment.
* test/lisp/erc/erc-scenarios-base-reuse-buffers.el
(erc-scenarios-common--base-reuse-buffers-channel-buffers):
Clarify assertion.
* test/lisp/erc/erc-tests.el (erc-with-all-buffers-of-server):
Replace `erc-default-recipients' with `erc--target'.
(erc--target-from-string): Update expected shape of
`erc--target-channel' struct with new `joined-p' slot.
(erc-message): Set `erc--target' in buffer "#chan".  (Bug#66578)
2023-10-20 15:24:06 -07:00
F. Jason Park
8cf66ab1e5 Rename erc-server-buffer-p
* lisp/erc/erc-log.el (erc-log-all-but-server-buffers): Use
`erc--server-buffer-p' instead of `erc-server-buffer-p'.  This
replacement is presumed to be relatively "safe" because this function
is unused in the code base and only appears in the doc string for the
option `erc-enable-logging'.
* lisp/erc/erc-match.el (erc-match-message): Leave comment proposing
that `erc--server-buffer-p' should be preferred to
`erc-server-buffer-p'.  Use preferred alias for `erc-server-buffer-p'.
* lisp/erc/erc-notify.el (erc-cmd-NOTIFY): Use preferred alias for
`erc-server-buffer-p', and leave FIXME comment.
* lisp/erc/erc-speedbar.el (erc-speedbar-buttons): Use
`erc--server-buffer-p' instead of `erc-server-buffer-p'.  The logic
here seems simple enough to justify a change, however the absence of
related bug reports is perhaps an argument against this.
* lisp/erc/erc-track.el (erc-track-modified-channels): Use preferred
alias for `erc-server-buffer-p' and leave comment noting possible bug.
* lisp/erc/erc.el (erc-once-with-server-event): Use
`erc--server-buffer-p' instead of `erc-server-buffer-p'.  This change
seems justified because the function sets local hooks that would
otherwise be ignored outside of a server buffer.
(erc-server-buffer-p, erc-server-or-unjoined-channel-buffer-p): Make
the former an obsolete alias for the latter.
(erc--server-buffer-p): New function to replace `erc-server-buffer-p'
internally in new code.  Unlike its predecessor, it returns nil in
parted and kicked channels.
(erc-open-server-buffer-p): Use `erc--server-buffer-p' instead of
`erc-server-buffer-p'.  Given the name and the doc string, breaking
the odd misuse of this function in parted buffers seems justified
because this is clearly a bug fix.  Also, all uses in-tree conform to
the intended behavior as documented.  And a cursory grep of all "erc-"
prefixed packages on MELPA reveals zero instances of this function.
Nor is it used in erbot.
(erc-get-buffer): Mention behavior in doc string regarding parted and
kicked-from channels.
(erc-cmd-GQUIT): Fix wrong-number-of-arguments bug in timer function.
(erc-default-target): Mention behavior regarding unjoined channels.
(erc-kill-query-buffers): Don't use `erc-server-buffer-p'.  This
replacement may break third-party code expecting to leave parted
channels behind, but it seems sane when considering only the lone
internal use in `erc-cmd-QUIT'.
; * test/lisp/erc/resources/join/network-id/foonet.eld: Timeouts.
(Bug#66578)
2023-10-20 15:22:56 -07:00
F. Jason Park
bcebda5eec Respect user markers in erc-insert-timestamp-left
* lisp/erc/erc-stamp.el (erc-insert-timestamp-left): Convert to normal
function, a mere wrapper that defers to existing generic variants, in
order to dissuade users from adding their own methods, which could
complicate troubleshooting, etc.
(erc--insert-timestamp-left): Rename both methods using internal
double-hyphen convention.  In `erc-stamp--display-margin-mode'
implementation, don't displace third-party markers.
* test/lisp/erc/erc-scenarios-stamp.el: New file.  (Bug#60936)
2023-10-20 14:53:24 -07:00
F. Jason Park
47612514a9 Fix right-sided stamps commingling with erc-prompt
* lisp/erc/erc-stamp.el (erc-insert-timestamp-left-and-right): Fix bug
that saw the prompt being inserted after messages but just inside the
narrowed operating portion of the buffer, which meant remaining
modification hooks would see it upon visiting.  Thanks to Corwin Brust
for catching this.
* test/lisp/erc/erc-fill-tests.el (erc-fill-wrap--monospace): Use
custom `erc-prompt' function to guarantee invariants asserted by
`erc--assert-input-bounds' are preserved throughout.  (Bug#60936)
2023-10-20 14:53:24 -07:00
F. Jason Park
7ffc79690a Restore missing metadata props in erc-display-line
* etc/ERC-NEWS: Designate `erc-display-message' as the favored means
of inserting messages.
* lisp/erc/erc-fill.el (erc-fill-wrap): Skip any `unknown' `erc-msg'.
* lisp/erc/erc-stamp.el (erc-stamp--current-time): Use an existing
`erc-ts' text property, when present, for the current message time.
* lisp/erc/erc.el (erc-display-line-1, erc-insert-line): Update doc
string and declare the former an obsolete alias for the latter,
`erc-insert-line'.  Have `erc-log' label say `erc-display-message'
even though this function is actually `erc-insert-line'.
(erc-display-line): Convert to a thin wrapper around
`erc-display-message', and move its existing body to a new internal
function, `erc--route-insertion'.
(erc--route-insertion): Adopt former body of `erc-display-line', now a
convenience wrapper around `erc-display-message'.  Copy
`erc--msg-props' hash table when inserting a message in multiple
buffers.  At present, only `erc-server-QUIT' uses this facility, so
such a move shouldn't impact performance in any measurable way.  Also,
improve readability with at most one recursive call for the
fall-through case.
(erc--compose-text-properties, erc--merge-text-properties-p): Rename
former to latter to avoid confusion with `composition' property.
(erc-display-message): Update doc string.  Attempt to adapt a non-nil
TYPE parameter for use as the value of the `erc-msg' text property
before resorting to a value of `unknown'.  But only do this when
PARSED is nil, and MSG is a string.  Call `erc--route-insertion'
instead of `erc-display-line'.  Use new name for
`erc--compose-text-properties'.
(erc-put-text-property): Update name of variable
`erc--compose-text-properties'.
* test/lisp/erc/erc-networks-tests.el (erc-networks--set-name): Mock
`erc--route-insertion' instead of `erc-display-line'.
* test/lisp/erc/erc-scenarios-display-message.el: New file.
* test/lisp/erc/erc-tests.el (erc--route-insertion): New test.
* test/lisp/erc/resources/base/display-message/multibuf.eld: New test
data.
; * test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update.
; * test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld: Update.
(Bug#60936)
2023-10-20 14:53:24 -07:00
F. Jason Park
a74b5de31f Warn about top-level erc-update-modules calls
* doc/misc/erc.texi (Modules): Describe unfavorable practices enacted
by third-party modules, like running `erc-update-modules' on load.
* lisp/erc/erc.el (erc-modules): Clarify comment in `custom-set'
function.
(erc--warn-about-aberrant-modules): Tweak warning message.
(erc--requiring-module-mode-p): New internal variable.
(erc--find-mode): Guard against recursive `erc-update-module'
invocations.  (Bug#57955)
2023-10-20 14:53:24 -07:00
F. Jason Park
b86b187aa9 * lisp/erc/erc-backend.el (define-erc-response-handler) Edebug spec. 2023-10-20 14:53:23 -07:00
F. Jason Park
6daa6f5f5c ; Mark erc-log test as :unstable
* test/lisp/erc/erc-scenarios-log.el (erc-scenarios-log--truncate):
Mark :unstable for now.
* test/lisp/erc/resources/base/renick/queries/solo.eld: Timeouts.
* test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld: Timeouts.
* test/lisp/erc/resources/base/reuse-buffers/channel/foonet.eld: Timeouts.
* test/lisp/erc/resources/erc-scenarios-common.el: Timeouts.
2023-10-20 14:53:23 -07:00
Dmitry Gutov
1a8f61a9f6 project--switch-project-command: Retouch
* lisp/progmodes/project.el (project--switch-project-command):
Remove outdated comment and clear the echo area at the end.
2023-10-20 22:04:03 +03:00
Eli Zaretskii
377a3c4281 ; More fixes for LLDB support
* lisp/progmodes/gud.el (gud-gud-lldb-command-name, lldb): Doc fixes.
2023-10-20 15:55:45 +03:00
Ulrich Müller
1dac154c5d ; * lisp/calc/calc-units.el (math-standard-units): Drop comment for mu0. 2023-10-20 14:53:09 +02:00
Eli Zaretskii
199e42be2a ; Fix recent changes of LLDB support
* lisp/progmodes/gud.el (gud-lldb-max-completions)
(gud-lldb-fetch-completions): Fix doc string and :version tag.
2023-10-20 15:50:33 +03:00
Eli Zaretskii
a8b14b77ff ; * lisp/emacs-lisp/comp-cstr.el: Fix punctuation. 2023-10-20 15:46:20 +03:00
Po Lu
8fa0f13e6e Repair detection of empty mailto URLs
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate):
Additonally regard mailto:// as an empty URL, since Android does
interpret them as such.
2023-10-20 19:09:39 +08:00
Gerd Möllmann
feba0dd457 Fix Gud LLDB completion for function names
LLDB completion candidates can contain parentheses.

* lisp/progmodes/gud.el (gud-lldb-fetch-completions): Use unique
completion list delimiters. Add timeout to accept-process-input.
(gud-lldb-def-python-completion-function): Use new completion
list delimiters.
(lldb): Add hint about completions to doc string.
(gud-lldb-marker-filter): Don't use eval.
2023-10-20 11:34:54 +02:00
Po Lu
90bfb1075d Treat empty mailto URIs properly under Android
* java/org/gnu/emacs/EmacsOpenActivity.java (onCreate): If an
empty mailto: URI is supplied, ascertain if EXTRA_EMAIL is set,
then derive a mailto URI from that if so.
2023-10-20 15:03:56 +08:00
Jens Schmidt
b99d12c30c ; Fix argument name for function `copy-file'
* doc/lispref/files.texi (Changing Files): Change name of last
argument of function `copy-file' from `preserve-extended-attributes'
to `preserve-permissions', as used in the function's description, its
doc string and the description below in the manual.
2023-10-20 09:04:39 +03:00
Dmitry Gutov
e170869712 Improve behavior with project-switch-use-entire-map=t
* lisp/progmodes/project.el (project--keymap-prompt): New function.
(project--switch-project-command): Use it when
project-switch-use-entire-map is non-nil.  Also check that CHOICE
is not a number (bug#63648).  And print incorrect inputs too.
2023-10-20 01:24:56 +03:00
Juri Linkov
4ace48f394 * lisp/progmodes/project.el (project--other-place-prefix): New function.
(project-other-window-command, project-other-frame-command)
(project-other-tab-command): Use it in Emacs versions not less than 30
where other-*-prefix commands are available.
This fixes the cases such as 'C-u C-x 5 p p f TAB' from bug#65558.
2023-10-19 21:50:28 +03:00
Michael Albinus
abbd86d90e Adapt Tramp version
* lisp/net/trampver.el (customize-package-emacs-version-alist):
Adapt Tramp version integrated in Emacs 29.2.
2023-10-19 16:39:01 +02:00
Michael Albinus
62920dcb0d Update Tramp version (don't merge with master)
* doc/misc/trampver.texi:
* lisp/net/trampver.el: Change version to "2.6.2.29.2".
(customize-package-emacs-version-alist):
Adapt Tramp version integrated in Emacs 29.2.
2023-10-19 16:28:26 +02:00
Stefan Monnier
d7c91d74b6 (cl--typeof-types): Complete last change
* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types):
Add `integer-or-marker` in the hierarchy as well.
2023-10-19 10:21:22 -04:00
Ulf Jasper
d1bc4cdc6a * admin/MAINTAINERS: Remove Ulf Jasper as maintainer of icalendar.el 2023-10-19 15:59:40 +02:00
Gerd Möllmann
694c4d538e Fix last change in gud.el
* lisp/progmodes/gud.el (gud-lldb-initialize): Fix duplicated
output.
2023-10-19 14:56:07 +02:00
Andrea Corallo
a567faf4c2 Add two missing 'number-or-marker' entries to the cl machinery (bug#66615)
Assuming 'number-or-marker' is a type (as present multiple times in
cl--typeof-types) adding some missing entries for coherency.

* lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add
'number-or-marker' as supertype of 'number' in the 'float' branch.

* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Add
'number-or-marker'.

* test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-typespec-tests-alist):
Update test.

* test/src/comp-tests.el (comp-tests-type-spec-tests): Update two testes.
2023-10-19 13:59:57 +02:00
Andrea Corallo
3e193edd68 Improve cstr typeset normalization
* test/lisp/emacs-lisp/comp-cstr-tests.el
(comp-cstr-typespec-tests-alist): Add four tests.

* lisp/emacs-lisp/comp-cstr.el (comp--sym-lessp)
(comp--direct-supertype, comp--normalize-typeset0): New functions.
(comp-normalize-typeset): Rework to make use of
'comp--normalize-typeset0'.
(comp--direct-subtypes): New function.
2023-10-19 13:58:46 +02:00
Eli Zaretskii
d963bc6c6b ; * lisp/ldefs-boot.el: Regenerated for Emacs 29.1.90. 2023-10-19 05:38:30 -04:00
Gerd Möllmann
0fd7f785e7 Gud support for column numbers
Allow gud-last-frame to be of the form (FILE LINE COLUMN).

* lisp/progmodes/gud.el (gud-display-frame): Support column numbers.
(gud-display-line): New optional parameter for column number.  Move
point to that column, if set.
(gud-lldb-marker-filter): Set column number.
2023-10-19 11:27:14 +02:00
Gerd Möllmann
f2ae1996f7 Don't rely on LLDB output format
Let Gud define its own frame format that is easily parseable,
and also contains the full source file path.

* lisp/progmodes/gud.el (gud-lldb-stop): New function.
(gud-lldb-marker-filter): Support new frame-format.
(gud-lldb-frame-format): variable for frame-format.
(gud-lldb-initialize): Set frame-format.
2023-10-19 11:25:50 +02:00
Eli Zaretskii
0cbc91f29a Bump Emacs version
* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 29.1.90.
2023-10-19 05:12:20 -04:00
Eli Zaretskii
ab9d6482e3 ; Update ChangeLog.4 and etc/AUTHORS. 2023-10-19 04:53:08 -04:00