aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add function `string-common-prefix'scratch/string-common-prefixPhil Sainty2026-01-245-1/+80
| | | | | | | | | | * lisp/subr.el: (string-common-prefix): New function. * etc/NEWS: * doc/lispref/strings.texi: * doc/lispref/minibuf.texi: * lisp/emacs-lisp/shortdoc.el: Documentation.
* ; Remove "--" from the name of autoloaded 'window--get-split-combination'Juri Linkov2026-01-222-3/+3
| | | | | | * lisp/window-x.el (window-get-split-combination, split-frame): * lisp/tab-bar.el (tab-bar-split-tab): Rename 'window--get-split-combination' to 'window-get-split-combination'.
* lisp/simple.el (goto-line): Minor optimizationStefan Monnier2026-01-221-5/+5
|
* Fix MS-Windows build broken by recent updates in MinGW64 headersEli Zaretskii2026-01-222-5/+7
| | | | | | | | | * nt/inc/ms-w32.h (strerror): Redirect to sys_strerror after including <string.h>, to prevent the linker from thinking it should be imported from some DLL. Reported by Richard Copley <rcopley@gmail.com>. * src/w32.c: Remove now unneeded prototype of sys_strerror.
* ; Fix :type of 'yaml-ts-mode-yamllint-options'Eli Zaretskii2026-01-221-2/+5
| | | | | * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode-yamllint-options): Fix :type and doc string.
* * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Speed up.Mattias Engdegård2026-01-221-82/+99
| | | | | Manicure pcase patterns to avoid performance-sapping internal functions and switch-breaking gaps, resulting in smaller code and less allocation.
* ; * test/lisp/net/dbus-tests.el: Fix typos.Michael Albinus2026-01-221-2/+2
|
* Restrict the 'buffer' arg of 'goto-line' only to interactive usesJuri Linkov2026-01-221-5/+5
| | | | | * lisp/simple.el (goto-line): Use 'buffer' arg only when 'interactive' is non-nil (bug#80150). Update docstring.
* Eglot: simplify Imenu setup againJoão Távora2026-01-212-4/+5
| | | | | | | | See https://github.com/joaotavora/eglot/issues/1569. * lisp/progmodes/eglot.el (eglot--managed-mode): Tweak. * etc/EGLOT-NEWS: Tweak.
* Eglot: display more readable server-originated messagesJoão Távora2026-01-211-9/+12
| | | | | | * lisp/progmodes/eglot.el (eglot--format-server-message): New helper. (eglot-handle-notification<window/showMessage>) (eglot-handle-request<window/showMessageRequest>): Use it.
* ; * lisp/textmodes/yaml-ts-mode.el: Fix docstring wider than 80 characters.Juri Linkov2026-01-211-1/+1
|
* Fix down-list navigation in python-ts-modeJuri Linkov2026-01-212-1/+4
| | | | | | | | * lisp/progmodes/python.el (python-ts-mode): Set 'treesit-sexp-thing-down-list' to 'list' to override sexp navigation with list navigation (bug#72478). * lisp/emacs-lisp/lisp.el (up-list): Mention 'up-list-function' in docstring.
* Flymake support for yaml-ts-mode.Vincenzo Pupillo2026-01-212-0/+92
| | | | | | | | | * etc/NEWS: Announce the new customization option (bug#80215). * lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): New customization group. (yaml-ts-mode-yamllint-options): New customization option. (yaml-ts-mode--flymake-process): New variable that stores the reference to the flymake process. (yaml-ts-mode-flymake): New function that implements support for Flymake.
* Add JSON path utility command to json-ts-modeBinbin Ye2026-01-213-0/+146
| | | | | | | | | | | * lisp/progmodes/json-ts-mode.el (json-ts--get-path-at-node) (json-ts--path-to-jq, json-ts--path-to-python): New functions. (json-ts-jq-path-at-point): New command for getting JSON path at point. * test/lisp/progmodes/json-ts-mode-tests.el: New file. Add tests for the utility command. * etc/NEWS: Announce new command 'json-ts-jq-path-at-point' (bug#80190).
* Fix updating buffer menu after invoking "M-x term"Eli Zaretskii2026-01-211-1/+3
| | | | | | | | | | | | | | The doc string of 'frame-or-buffer-changed-p' says not to call it with the nil argument, but term.el did. Since "M-x term" puts 'term--update-term-menu' on the 'menu-bar-update-hook' ahead of 'menu-bar-update-buffers', it caused the latter decide that there was no change in buffers, because the internal state variable used by 'frame-or-buffer-changed-p' when called with the nil argument was reset by 'term--update-term-menu'. Fix that by using a non-nil state variable. * lisp/term.el (term--buffers-changed): New variable. (term--update-term-menu): Use it when calling 'frame-or-buffer-changed-p'. (Bug#80231)
* ; * test/lisp/net/dbus-tests.el: hush warnings on no-dbus platformsMattias Engdegård2026-01-211-0/+4
|
* Eglot: fix textDocument/prepareRename supportJoão Távora2026-01-212-15/+28
| | | | | | | | | | | Can't send prepareRename requests willy-nilly. See https://github.com/joaotavora/eglot/issues/1554. * lisp/progmodes/eglot.el (eglot--rename-interactive): Fix. (eglot-client-capabilities): Advertise "prepareSupport". * etc/EGLOT-NEWS: Mention change.
* Eglot: set imenu-create-index-function without adviceJoão Távora2026-01-212-5/+8
| | | | | | | | | | See https://github.com/joaotavora/eglot/issues/1569. * lisp/progmodes/eglot.el (eglot--managed-mode): Stomp on imenu-create-index-function conditionally. (eglot-imenu): Don't check eglot-server-capable here. * etc/EGLOT-NEWS: Mention change.
* Eglot: limit the number of file watchesJoão Távora2026-01-212-5/+38
| | | | | | | | | | | | | | | | Some language servers request file watching for a very large number of directories (e.g. Python virtualenvs), which can exhaust system resources and cause slow startup. https://github.com/joaotavora/eglot/issues/1568 * lisp/progmodes/eglot.el (eglot-max-file-watches): New variable. (eglot--count-file-watches): New function. (eglot--watch-globs): Use them to limit watches. Signal jsonrpc-error when limit is reached. (eglot-watch-files-outside-project-root): Fix docstring punctuation. * etc/EGLOT-NEWS: Mention change.
* Eglot: support more complex workspace edits (create/rename/delete)João Távora2026-01-212-48/+170
| | | | | | | | | | | | | | | | | | Advertise support for file resource operations in workspace edits. Implement create, rename, and delete file operations. Rework confirmation UI to handle mixed operation types. * lisp/progmodes/eglot.el (eglot--lsp-interface-alist): Add CreateFile, RenameFile, DeleteFile interfaces. (eglot-client-capabilities): Advertise resourceOperations and failureHandling. (eglot-handle-request<workspace/applyEdit>): Return failureReason. (eglot--apply-text-edits): Tweak error message. (eglot--propose-changes-as-diff): Adjust for new prepared format. Return buffer. (eglot--apply-workspace-edit): Rework. Handle file operations. * etc/EGLOT-NEWS: Mention change.
* Eglot: overhaul eglot-confirm-server-edits defcustomJoão Távora2026-01-211-23/+36
| | | | | | | | | Now also accepts file operation kinds as keys in the alist form. * lisp/progmodes/eglot.el (eglot-confirm-server-edits): Rework default value, docstring and defcustom type. (eglot--confirm-server-edits): Also check for operation-kind-based entries.
* Eglot: default eglot-advertise-cancellation to tJoão Távora2026-01-212-1/+12
| | | | | | | | | | | The current 2026 landscape suggests servers (especially gopls and ocamllsp) take advantage of this, so let's give it to them by default. * lisp/progmodes/eglot.el (eglot-advertise-cancellation): Default to t. * etc/EGLOT-NEWS: Mention change.
* Eglot: handle user quits when applying server-initiated editsJoão Távora2026-01-211-2/+12
| | | | | | | If the user simply C-g's signal a 'jsonrpc-error' with code 32000 to mean "no error", provide an LSP :failureReason and keep server chill. * lisp/progmodes/eglot.el (eglot-handle-request<workspace/applyEdit>>):
* Eglot: ensure no timeout on remote command executionsJoão Távora2026-01-211-2/+3
| | | | | | | | Else, if the server asks us a question, the user has just 10 seconds to ponder, which is a bit silly. * lisp/progmodes/eglot.el (eglot-execute): Pass timeout=nil to eglot--request.
* Eglot: slightly friendlier UI for server window/showMessageRequestJoão Távora2026-01-211-6/+5
| | | | | | | | Previously, the default answer pre-filled in the minibuffer was obscuring the other possible answers. * lisp/progmodes/eglot.el (eglot-handle-request<window/showMessageRequest>): Rework.
* Eglot: advertise cancellation on eglot--request quitsJoão Távora2026-01-211-15/+16
| | | | | * lisp/progmodes/eglot.el (eglot--request): Pass CANCEL-ON-QUIT to jsonrpc-request.
* Eglot: fix async request cancellationJoão Távora2026-01-211-43/+46
| | | | | | | | | | It was completely broken, with a cancel being set for every sent (and probably already received) async request, and no actual discarding of the response of a cancelled request. * lisp/progmodes/eglot.el (eglot--async-request): Fix cancellation of async requests. (eglot--semtok-request): Don't need 'buf' &aux anymore.
* Eglot: treat code=0 JSONRPC errors as benignJoão Távora2026-01-211-15/+23
| | | | | * lisp/progmodes/eglot.el (eglot--request): Shoosh code=0 errors. (eglot-mode-line-error): Check for code=0.
* Jsonrpc: don't let remote endpoint requests go unansweredJoão Távora2026-01-212-22/+38
| | | | | | | | | | | | Previously, 'quit' could cause remote endpoints to never get a reply and thus sometimes hang. Ensure we always reply. Also, give the application a chance to signal jsonrpc-error with the served code=32000, meaning "no error". * doc/lispref/text.texi (JSONRPC Overview): Rework section on request dispatchers. * lisp/jsonrpc.el (jsonrpc-connection-receive): Rework.
* Jsonrpc: allow control over jsonrpc-request quitsJoão Távora2026-01-211-71/+89
| | | | | | | | | | | | This allows clients such as Eglot to act on the user C-g's/quits out of a blocking jsonrpc-request call. It also fixes the TIMEOUT=nil passed to jsonrpc-request. An infinite timeout in that case (for a long-running request, for example) and it was not being transmitted to the lower jsonrpc-async-request. * lisp/jsonrpc.el (jsonrpc-request): Add CANCEL-ON-QUIT. Rework docstring.
* ; * doc/lispref/internals.texi (Garbage Collection): typoMattias Engdegård2026-01-211-1/+1
|
* ; * src/alloc.c (Fgarbage_collect_heapsize): Avoid compiler warning.Eli Zaretskii2026-01-211-1/+1
|
* Fix thinko in 'quit-restore-window'Martin Rudalics2026-01-211-2/+7
| | | | | | | | | * lisp/window.el (quit-restore-window): Try to restore the previously selected window only if WINDOW is either the selected window or BURY-OR-KILL is neither 'burying' nor 'killing'. Otherwise, this might deliberately change the selected window, for example, when 'kill-buffer-quit-windows' is non-nil and WINDOW shows the buffer to kill.
* * doc/misc/dbus.texi (Inhibitor Locks): Fix path.Morgan Smith2026-01-211-2/+2
|
* hideshow: Use 'message' instead of 'user-error'. (Bug#80201)Elías Gabriel Pérez2026-01-211-30/+32
| | | | | | | | Using 'user-error' in 'hs-minor-mode', prevents the major-mode from initializing correctly when hideshow is not supported in that mode, using 'message' instead fixes this. * lisp/progmodes/hideshow.el (hs-minor-mode): Tweak.
* (xterm--init): Fix probem in async mode (bug#80163)Jared Finder2026-01-201-5/+1
| | | | | | | | In async mode, the workaround for the old Terminal.app collides with the binding we install for the primary DA. Just drop it. * lisp/term/xterm.el (xterm--init): Remove workaround for very old macOS `Terminal.app`.
* (garbage-collect-heapsize): New functionStefan Monnier2026-01-203-16/+42
| | | | | | | | | | | | | | | | | The info returned from `garbage-collect` is really handy to track the evolution of the heap size, but sadly it's available only at the cost of running a full GC, which has two big downsides: it's slow, it affects what we're measuring, and it can't be used in `post-gc-hook`. So, this patch makes it available without running the GC. * src/alloc.c (Fgarbage_collect_heapsize): New function, extracted from `Fgarbage_collect`. (Fgarbage_collect): Use it. (syms_of_alloc): defsubr it. * doc/lispref/internals.texi (Garbage Collection): Extract documentation for it from that of `garbage-collect`.
* * lisp/tab-bar.el (tab-bar-split-tab): New command.Juri Linkov2026-01-202-3/+40
| | | | (split-tab): Alias for 'tab-bar-split-tab'.
* ; * lisp/net/browse-url.el (browse-url-with-browser-kind): Fix call.Daniel Mendler2026-01-201-1/+1
|
* Extend Tramp tracesMichael Albinus2026-01-201-2/+4
| | | | | * lisp/net/tramp-message.el (tramp-debug-message): Change selection for `trace-function-background'.
* Tag Tramp tests as :expensive-testMichael Albinus2026-01-201-0/+16
| | | | | | | | | | | | | | | | * test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults) (tramp-test10-write-region-file-precious-flag) (tramp-test10-write-region-other-file-name-handler) (tramp-test16-file-expand-wildcards) (tramp-test17-dired-with-wildcards) (tramp-test17-insert-directory-one-file) (tramp-test33-environment-variables-and-port-numbers) (tramp-test35-remote-path, tramp-test39-make-lock-file-name) (tramp-test39-detect-external-change, tramp-test42-utf8) (tramp-test43-file-system-info) (tramp-test44-file-user-group-ids, tramp-test48-session-timeout) (tramp-test49-external-backend-function) (tramp-test50-recursive-load): Tag them as :expensive-test. (Bug#80164)
* Call browser functions via `browse-url'Daniel Mendler2026-01-205-19/+32
| | | | | | | | | | | | This is in order to apply `browse-url-transform-alist'. * lisp/net/browse-url.el (browse-url-with-browser-kind) (browse-url-button-open, browse-url-button-open-url): * lisp/net/shr.el (shr-browse-url): * lisp/net/eww.el (eww-browse-with-external-browser): * lisp/gnus/gnus-sum.el (gnus-summary-browse-url): * lisp/emacs-lisp/package.el (package-browse-url): Let-bind `browse-url-browser-function' and call `browse-url'.
* Factor out calculation of window combination for 'split-frame'Pranshu Sharma2026-01-201-41/+51
| | | | | * lisp/window-x.el (window--get-split-combination): New function. (split-frame): Call it.
* Don’t use C basename functionPaul Eggert2026-01-191-1/+1
| | | | | | | | | * src/pdumper.c (pdumper_set_emacs_execdir): Don’t use basename; simply use the pointer we already have. If we ever need a basename-like function in the future, we should use Gnulib’s basename-lgpl module, as POSIX basename modifies its argument string and is incompatible with glibc/Android basename; see <https://www.gnu.org/software/gnulib/manual/html_node/basename.html>.
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2026-01-1970-184/+180
|
* Omit -Wzero-as-null-pointer-constantPaul Eggert2026-01-191-0/+1
| | | | | | | | * configure.ac: If --enable-gcc-warnings, don’t use -Wzero-as-null-pointer-constant, which is enabled by default with bleeding-edge Gnulib (as there seems to be movement in this direction in C2y). Although -Wzero-as-null-pointer-constant is useful, Emacs isn’t clean for it yet.
* Merge Gnulib save-cwd.c changesPaul Eggert2026-01-191-8/+9
| | | | | * lib/save-cwd.c: Propagate changes from Gnulib sibling. This doesn’t affect behavior.
* Allow non-interactive calls of 'goto-line' (bug#80150)Juri Linkov2026-01-191-10/+11
| | | | | | * lisp/simple.el (goto-line, goto-line-relative): Add new arg 'interactive'. Remove 'declare' with 'interactive-only'. Don't push the mark when called non-interactively.
* Don't fail in minibuffer--completions-visible for undefined reference bufferJuri Linkov2026-01-191-7/+10
| | | | | * lisp/minibuffer.el (minibuffer--completions-visible): Return 'window' even when 'completion-reference-buffer' is nil (bug#80064).
* ; * src/indent.c (Fvertical_motion): Fix last change. (Bug#80223)Eli Zaretskii2026-01-191-0/+1
|