1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-08 04:30:45 -08:00
Commit graph

171776 commits

Author SHA1 Message Date
Mattias Engdegård
0a57dfcff8 Ensure that specbind arg is always bare symbol, and drop check
* src/eval.c (FletX, Flet, internal_lisp_condition_case)
(funcall_lambda): Ensure that the first argument to `specbind` is
a bare symbol in the few cases where this isn't statically guaranteed.
(specbind): Drop the symbol argument type check on the fast path.
2024-04-18 13:55:47 +02:00
Mattias Engdegård
dba115d6bc Drop unnecessary type check in varref and varset byte ops
* src/bytecode.c (exec_byte_code):
We can safely assume that the immediate argument to varref and varset
is a bare symbol; the byte-compiler should guarantee that.
2024-04-18 13:55:47 +02:00
Eli Zaretskii
d29d4a1d7b ; * lisp/comint.el: Fix wording of last change. 2024-04-18 13:45:22 +03:00
Augusto Stoffel
11b1610c72 Obsolete comint-osc symbols moved to ansi-osc.el
* lisp/comint.el (comint-osc-handlers)
(comint-osc-directory-tracker, comint-osc-hyperlink-handler)
(comint-osc-hyperlink, comint-osc-hyperlink-map): Mark as
obsolete.  (Bug#70375)
2024-04-18 13:43:43 +03:00
Siddharth Sharma
f66820d877 Add YANG LSP support to Eglot
* lisp/progmodes/eglot.el (eglot-server-programs): Add
'yang-language-server' and 'json-ts-mode'.  (Bug#70364)

Copyright-paperwork-exempt: yes
2024-04-18 13:34:31 +03:00
Eli Zaretskii
c7bcda4ac5 ; Minor change in last commit
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Rearrange features to keep alphabetical order.  (Bug#70362)
2024-04-18 13:30:20 +03:00
Noah Peart
9055dad65d Add font-locking for Go built-in functions in go-ts-mode
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
Add font-locking for Go built-in functions to 'go-ts-mode'.
(Bug#70362)
2024-04-18 13:28:28 +03:00
Eli Zaretskii
f6c20ed5d5 ; Fix last change
* lisp/url/url-util.el (url-build-query-string): Move to after the
definition of 'url-query-key-value-allowed-chars'.
2024-04-18 13:08:23 +03:00
Dagfinn Ilmari Mannsåker
40629706b1 Avoid unnecessary escaping in 'url-build-query-string'
* lisp/url/url-util.el (url-query-key-value-allowed-chars):
New defconst.
(url-build-query-string): Use it to escape only those
characters that need it in keys and values.
* test/lisp/url/url-util-tests.el (url-util-tests): Add
new test cases.  (Bug#70312)
2024-04-18 13:04:13 +03:00
Elias G. B. Perez
3c4f6c78b4 Flymake support for indicating errors in margin
Add optional support for display flymake error in margin,
this allow displaying error indicators in both graphical and
terminal frames.
* doc/misc/flymake.texi (Customizable variables)
(Flymake error types): Document new margin indicator.
* etc/NEWS: Announce the new Flymake user option for margin
indicators.
* lisp/progmodes/flymake.el (flymake-indicator-type)
(flymake-margin-indicators-string, flymake-autoresize-margins)
(flymake-margin-indicator-position): New user options.
(flymake--original-margin-width): Add buffer-local variable for
store original buffer margin width.
(flymake-error, flymake-warning, flymake-note): Use new margin
value.
(flymake--indicator-overlay-spec): Rework and Rename from
flymake--fringe-overlay-spec.
(flymake--resize-margins): Add new function for resize margin
width.
(flymake--highlight-line, flymake-mode): Rework.
2024-04-18 12:08:33 +03:00
Eli Zaretskii
bb9d81d514 Fix sending input to SQL when point is not at EOB
* lisp/progmodes/sql.el (sql-send-string): Move point to EOB
before sending input to the SQL process.  Suggested by Gary Hollis
<ghollisjr@gmail.com>.  (Bug#69420)
2024-04-18 11:53:26 +03:00
Eli Zaretskii
b993c1b275 ; * etc/NEWS: Reindent and refill recently added entries. 2024-04-18 11:45:47 +03:00
Juri Linkov
b585fb8171 * lisp/tab-line.el: Use the new keyword :key for 'sort'.
(tab-line-tabs-fixed-window-buffers): Use :key for 'sort'.
Rename the window parameter 'tab-line-fixed-window-buffers'
to shorter 'tab-line-buffers'.  Add '(tab-line-buffers . writable)
to window-persistent-parameters.
2024-04-18 09:36:18 +03:00
Po Lu
c19b988c29 Correctly verify availability of Android content URIs
* java/org/gnu/emacs/EmacsService.java (checkContentUri): Call
checkUriPermission with IPC-effective PID and UID rather than
checkCallingUriPermission, which never considers permissions of
Emacs itself, and delete the now-redundant workaround.
2024-04-18 10:38:22 +08:00
Augusto Stoffel
3cdd86b8af Propagate 'lexical-binding' value to pp buffers
See bug#70137.

* lisp/emacs-lisp/pp.el (pp-display-expression): Set lexical-binding to
match the value in the calling buffer.
2024-04-17 17:02:11 -04:00
Theodor Thornhill
0dbd9ed046 Document earlier change in eglot-report-progress
* lisp/progmodes/eglot.el (eglot-report-progress): Document the changed
behavior.
* etc/EGLOT-NEWS (https): Mention the change.
2024-04-17 20:42:23 +02:00
Stefan Monnier
c15c9f4de6 (conf-toml-recognize-section): Fix bug#70383
* lisp/textmodes/conf-mode.el (conf-toml-recognize-section): Move
point, like font-lock matchers are expected to do.
2024-04-17 14:30:10 -04:00
Stefan Monnier
fcee1bf07b eglot.el: Remove accidentally included debugging code
* lisp/progmodes/eglot.el (eglot--signal-textDocument/didChange):
Remove leftover debug message.
2024-04-17 14:01:35 -04:00
Juri Linkov
4dd3288569 * lisp/emacs-lisp/icons.el (define-icon): Add 'doc-string' to 'declare'. 2024-04-17 21:01:14 +03:00
Juri Linkov
230eecf12a New keymap tab-line-mode-map and new tab order on tab-line (bug#69993)
* lisp/tab-line.el (tab-line-new-button-functions): New variable.
(tab-line-tabs-function): Change the default value from
'tab-line-tabs-window-buffers' to the new option
'tab-line-tabs-fixed-window-buffers'.
(tab-line-tabs-buffer-group-sort-function): Change the default
value from nil to 'tab-line-tabs-buffer-group-sort-by-name'.
(tab-line-tabs-buffer-group-sort-by-name): New function.
(tab-line-tabs-fixed-window-buffers): New function.
(tab-line-format-template): Use 'tab-line-new-button-functions'.
(tab-line-mode-map, tab-line-switch-repeat-map): New keymaps.
2024-04-17 20:56:10 +03:00
Stephen Berman
91333dacfa Allow tabbing between widgets to skip inactive widgets (bug#70413)
* doc/misc/widget.texi (Widgets and the Buffer, Customization):
Document it.

* etc/NEWS: Announce it.

* lisp/wid-edit.el (widget-skip-inactive): New user option.
(widget-tabable-at): Use it.
2024-04-17 19:33:24 +02:00
Stefan Monnier
523aca13a4 * lisp/emacs-lisp/track-changes.el: Fix trailer 2024-04-17 10:57:11 -04:00
Stefan Monnier
3660c51736 track-changes.el: Fix last change for early use
* lisp/emacs-lisp/track-changes.el (track-changes--recover-from-error):
Don't burp if there have been fewer than 20 keystrokes since Emacs start.
2024-04-17 09:04:12 -04:00
Eli Zaretskii
42b3024ca8 Another fix for bug#70385
* src/xdisp.c (note_fringe_highlight): Check value of x_y_to_hpos_vpos.
2024-04-17 14:50:38 +03:00
Robert Pluim
1606e14c6f ; * src/xdisp.c (redisplay_internal): Typo fix in comment 2024-04-17 09:04:18 +02:00
Juri Linkov
ada429c375 * lisp/emacs-lisp/lisp.el (forward-sexp-function): Set back to nil.
(forward-sexp): Revert back to checking 'forward-sexp-function'
for nil (bug#70426).
2024-04-17 09:53:02 +03:00
Stefan Monnier
a33ab7565e track-changes.el: Minor changes for version 1.0
Arrange for the library to be usable on older Emacsen, which
includes reducing the noise when `before/after-change-functions`
are badly paired or missing.
Also, since the signal function receives the distance (for `:disjoint`),
we don't need `track-changes--disjoint-threshold`: the signal
function can simply do nothing when the distance is smaller than
the threshold it wants to use.

* lisp/emacs-lisp/track-changes.el: Prepare header for ELPA.
(track-changes--tracker, track-changes--state): Don't use `:noinline`,
so as to be compatible with Emacs<27.
(track-changes-record-errors): New variable.
(track-changes--recover-from-error): Use it.  Record only the last 20
keys and the last 50 stack frames in the error log.
(track-changes--disjoint-threshold): Delete variable.
(track-changes--before): Don't use it any more.

* lisp/progmodes/eglot.el (eglot--track-changes-signal):
Coalesce disjoint changes nearer than what used to be coalesced because of
`track-changes--disjoint-threshold`.
2024-04-16 21:57:05 -04:00
Stefan Monnier
484b097909 (cl-defstruct): Improve handling of unknown options
Until now `cl-defstruct` signaled an error when encountering an
unknown option.  It's easy to code and it does the job, but it
doesn't give good location info in the compiler's output,
and it makes it more painful to use not-yet-supported options.
So just signal a warning instead.

* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Warn about unknown
options, instead of signaling an error.
2024-04-16 21:17:47 -04:00
Eric Abrahamsen
2141caca30 ; Improvements to PEG documentation (second attempt)
* doc/lispref/peg.texi: Make more use of defmac/defmacro, and try to
clarify the relationships between the various macros and functions.
* lisp/progmodes/peg.el (peg-parse): Remove claim that PEXS can also be
a single list of rules.
2024-04-16 17:26:47 -07:00
Eli Zaretskii
d39f0a165a * src/xdisp.c (note_fringe_highlight): Another attempt to fix bug#70385. 2024-04-16 21:23:37 +03:00
Eli Zaretskii
1be21dd953 Minor fix in detecting recursive redisplay invocations
* src/xdisp.c (redisplay_internal): Detect recursive invocations
earlier.  (Bug#66416)
2024-04-16 15:12:42 +03:00
Mattias Engdegård
9a673c6914 Revert "; Improvements to PEG documentation"
This reverts commit 930c578c10.
Looks like an editing mistake ate a large part of the text.
2024-04-16 11:59:20 +02:00
Michael Albinus
b47b8159d8 Adapt tree-sitter job on EMBA
* test/infra/gitlab-ci.yml (.tree-sitter-template)
(test-tree-sitter): Adapt tree-sitter job.
2024-04-16 10:55:37 +02:00
Po Lu
f5e0fb11db Fix touch screen hscroll when initiated from widgets
* lisp/wid-edit.el (widget-button--check-and-call-button):
Return to the position of point during the tracking loop if a
touch event is canceled.
2024-04-16 15:40:13 +08:00
Po Lu
c59e67a41c Another fix for bug#70385
* src/xdisp.c (note_fringe_highlight): Test that vpos falls
within W->current_matrix.  (bug#70385)
2024-04-16 15:40:13 +08:00
Juri Linkov
cdd37ba4e8 Support prefix argument for switching tabs in tab-line-mode
* lisp/tab-line.el (tab-line-select-tab-buffer): Optimize.
(tab-line-switch-cycling): Enable by default like in tab-bar-mode.
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab):
Add a prefix argument ARG and support it for switching tabs.
Improve docstring.
2024-04-16 09:40:15 +03:00
Noah Peart
b33fb3b69c
Add font-locking for operators in go-ts-mode (bug#70361)
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings): Add
font-locking rule for Go operators.
2024-04-15 21:31:51 -07:00
Eric Abrahamsen
930c578c10 ; Improvements to PEG documentation
* doc/lispref/peg.texi: Make more use of defmac/defmacro, and try to
clarify the relationships between the various macros and functions.
* lisp/progmodes/peg.el (peg-parse): Remove claim that PEXS can also be
a single list of rules.
2024-04-15 20:14:50 -07:00
Basil L. Contovounesios
98b90fc853 ; Fix last change to secrets-tests.el. 2024-04-15 23:56:00 +02:00
Stefan Monnier
3ac1a7b6fe (track-changes-fetch): Fix nested use case
* lisp/emacs-lisp/track-changes.el (track-changes-fetch):
Don't presume that if there's nothing to do we're on
`track-changes--clean-trackers`.
2024-04-15 16:06:54 -04:00
Stefan Monnier
5fda398fb3 (track-changes--before): Fix bug#70396
* lisp/emacs-lisp/track-changes.el (track-changes--before):
Widen the buffer before accessing it with positions
potentially outside the beg..end region.
2024-04-15 15:53:48 -04:00
Eli Zaretskii
9b755244bf Fix resetting the frame's 'frozen_window_starts' flag
* src/window.c (grow_mini_window, shrink_mini_window): Reimplement
how the frame's 'frozen_window_starts' flag is set and reset, to
make sure it is always reset when the mini-window gets to its
normal one-line height.  Patch by Martin Rudalics
<rudalics@gmx.at> (Bug#70038)
2024-04-15 16:50:59 +03:00
Eli Zaretskii
a80a5d42d3 Fix display of @xref documentation in Info
* lisp/info.el (Info--dont-hide-references): New variable.
(Info-fontify-node): Use 'Info--dont-hide-references' to disable
hiding "*Note" or showing "See" instead of it in select nodes.
(Bug#70382)
2024-04-15 15:47:39 +03:00
Po Lu
deef12c15d Rewrite Android description of Android window management
* doc/emacs/android.texi (Android Environment): Rewrite several
paragraphs to better reflect recent changes and emphasize
behavior on modern OS releases.
2024-04-15 19:58:03 +08:00
Martin Rudalics
9a79db506e Make 'buffer-last-name' work better after 'find-alternate-file' (Bug#68235)
* lisp/files.el (find-alternate-file): Before killing the previous
buffer, try to restore its name and filenames (Bug#68235).
2024-04-15 11:17:51 +02:00
Dmitry Gutov
55a200d707 ; Capitalize 'project' in project-name's docstring 2024-04-15 05:29:59 +03:00
Po Lu
e8c6e3fa47 Fix bug#70385
* src/xdisp.c (note_fringe_highlight): Don't proceed if
popup_activated, window is outdated, or when row beneath pointer
does not display text.  (bug#70385)
2024-04-15 09:30:30 +08:00
Mattias Engdegård
3d36020552 GC-mark temporary key values created when sorting (bug#69709)
Bug reported and fix proposed by Aris Spathis.

* src/sort.c (merge_markmem): Mark heap-allocated temporary key values.
(tim_sort): Delay key function calls to after marking function has been
registered.
* test/src/fns-tests.el (fns-tests-sort-gc): New test.
2024-04-14 18:29:16 +02:00
Juri Linkov
568c174135 Add 'forward-sexp-default-function' to be used by 'treesit-forward-sexp'
* lisp/emacs-lisp/lisp.el (forward-sexp-default-function):
New function with body from 'forward-sexp' (bug#68993).
(forward-sexp-function): Change the default value from nil to
'forward-sexp-default-function'.
(forward-sexp): Use either 'forward-sexp-function' or
'forward-sexp-default-function'.

* lisp/treesit.el (treesit-forward-sexp): In nodes of type 'text'
fall back to 'forward-sexp-default-function'.  Improve docstring.

* doc/lispref/positions.texi (List Motion): Fix pxref.
2024-04-14 19:22:01 +03:00
Stefan Monnier
cd113d8c45 text.texi (Tracking changes): Fix warning
* doc/lispref/text.texi (Change Hooks): Add a menu to silence warnings.
(Tracking changes): Improve the title.
2024-04-14 12:07:23 -04:00