aboutsummaryrefslogtreecommitdiffstats
path: root/lisp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add function `string-common-prefix'scratch/string-common-prefixPhil Sainty2026-01-242-1/+34
| | | | | | | | | | * 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 :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.
* 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-211-1/+2
| | | | | | | | 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-211-0/+85
| | | | | | | | | * 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-211-0/+54
| | | | | | | | | | | * 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)
* Eglot: fix textDocument/prepareRename supportJoão Távora2026-01-211-15/+23
| | | | | | | | | | | 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-211-5/+3
| | | | | | | | | | 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-211-5/+31
| | | | | | | | | | | | | | | | 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-211-48/+160
| | | | | | | | | | | | | | | | | | 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-211-1/+1
| | | | | | | | | | | 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-211-16/+23
| | | | | | | | | | | | 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.
* 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.
* 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`.
* * lisp/tab-bar.el (tab-bar-split-tab): New command.Juri Linkov2026-01-201-0/+36
| | | | (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'.
* 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.
* 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).
* ; Minor Tramp cleanupMichael Albinus2026-01-195-50/+39
| | | | | | | | | | | | | | | | | * lisp/net/tramp-adb.el: * lisp/net/tramp-androidsu.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-smb.el: Do not delay `connection-local-set-profiles' until after loading `shell'. * lisp/net/tramp-integration.el: Add the local profile for all hosts listed in `tramp-local-host-names'. * lisp/net/tramp.el (tramp-local-host-names): New defvar. (tramp-local-host-regexp): Use it. * test/lisp/net/tramp-tests.el (tramp-test03-file-name-defaults): Adapt test.
* Have 'package-find-news-file' handle built-in packagesPhilip Kaludercic2026-01-181-2/+4
| | | | | | | * lisp/emacs-lisp/package.el (package-find-news-file): Abort early if the package is built-in. (describe-package-1): Do not invoke 'package-find-news-file' if missing a package descriptor.
* ; Fix type error in 'describe-package-1'Philip Kaludercic2026-01-181-1/+1
| | | | | | | * lisp/emacs-lisp/package.el (describe-package-1): Pass the package descriptor instead of a symbol to 'package-find-news-file'. (Bug#80220)
* Portable escape SWITCHES in 'package-review-diff-command'Philip Kaludercic2026-01-181-7/+8
| | | | | | * lisp/emacs-lisp/package.el (package-review-diff-command): Use 'shell-quote-argument' to quote arguments instead of assuming a POSIX shell.
* Improve type of user option 'package-review-policy'Philip Kaludercic2026-01-181-2/+2
| | | | | | * lisp/emacs-lisp/package.el (package-review-policy): Move tags to the cons-cell level, so that the labels are displayed in the menu when inserting a new item.
* verilog-mode.el: Fix parameter replacements in AUTOINST.Wilson Snyder2026-01-181-4/+5
| | | | | * lisp/progmodes/verilog-mode.el (verilog-auto-inst-port): Fix parameter replacements in AUTOINST (#1903).
* ; Fix messages in "M-x man"Eli Zaretskii2026-01-181-1/+5
| | | | | * lisp/man.el (Man-getpage-in-background): Fix message in synchronous case.
* Fix `Man-shell-file-name'Michael Albinus2026-01-181-1/+4
| | | | | * lisp/man.el (Man-shell-file-name): Fix for MS Windows. (Bug#80212)
* Extract "news" file extraction logicPhilip Kaludercic2026-01-181-11/+11
| | | | | | | * lisp/emacs-lisp/package.el (package-review) (describe-package-1): Use new function. (package-find-news-file): Add new function that also checks for the "NEWS-elpa" file name.
* Autoload 'package-delete'Philip Kaludercic2026-01-181-1/+1
| | | | | * lisp/emacs-lisp/package.el (package-delete): Add autoload cookie. (Bug#80178)
* Autoload 'package-browse-url'Philip Kaludercic2026-01-171-0/+1
| | | | | * lisp/emacs-lisp/package.el (package-browse-url): Add autoload cookie. (Bug#80178)
* Remove some mode restriction in interactive specs of package.elPhilip Kaludercic2026-01-171-4/+2
| | | | | | * lisp/emacs-lisp/package.el (package-browse-url) (package-report-bug): Do not restrict these commands to 'package-menu-mode'. (Bug#80178)
* Remove rcirc-set-{en,de}code-coding-system aliasesPhilip Kaludercic2026-01-171-10/+0
| | | | | | | | | These were in the wrong order anyway, so they never had any effect. * lisp/net/rcirc.el (rcirc-set-decode-coding-system) (rcirc-set-encode-coding-system): Remove obsoletion aliases. (Bug#80145)