aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Disable -Wclobbered around exec_byte_code (bug#79610)scratch/exec-byte-codeMattias Engdegård2025-10-171-15/+13
| | | | | | | * src/bytecode.c (exec_byte_code): The old hack for working around spurious -Wclobbered warnings from GCC no longer suffices; disable the warning locally. This also makes the code slightly smaller and faster.
* ; exec_byte_code: refactor branch caseMattias Engdegård2025-10-161-14/+14
|
* exec_byte_code: use fixed registers for top and pc (bug#79610)Mattias Engdegård2025-10-161-2/+16
| | | | | | | | | | | | | GCC seems to have difficulty allocating important global interpreter variables in registers; telling it which ones to use for 'top' and 'pc' makes a big difference and seems to ease pressure enough for it to deal with other variables as well. We do it for AMD64 and ARM64. Clang doesn't seem to need these directives. It does result in -Wclobbered warnings that seem difficult to silence. * src/bytecode.c (BC_REG_TOP, BC_REG_PC): New. (exec_byte_code): Use them.
* ; exec_byte_code: don't re-use op in FETCH2Mattias Engdegård2025-10-161-1/+1
|
* exec_byte_code: reduce use of semi-global 'op' (bug#79610)Mattias Engdegård2025-10-161-56/+65
| | | | | | | | | | | * src/bytecode.c (exec_byte_code): Re-type op from int to ptrdiff_t, which avoids some useless conversions. Reduce its use by using local variables for intra-block use, and another variable (arg) where it doesn't need to be alive across instruction dispatch. We also eliminate it where performance doesn't matter by re-fetching it from the instruction stream. All this should help the register allocator.
* ; elisp-scope.el: Standardize copyright notice.Eshel Yaron2025-10-161-4/+6
| | | | Suggested by Arash Esbati <arash@gnu.org>.
* Return case common to all completions in try-completionSpencer Baugh2025-10-163-8/+38
| | | | | | | | | | | | | | | When completion-ignore-case is non-nil, if all completions share a common prefix ignoring case, try-completion has always returned that. Now, if all completions also share a common prefix including case, try-completion includes that common prefix in its return value (bug#79377). * lisp/minibuffer.el (completion-pcm--merge-completions): Always use return value from try-completion, which may change case. * src/minibuf.c (Ftry_completion): Return the common prefix which changes case. * test/lisp/minibuffer-tests.el (completion-pcm-bug4219) (completion-substring-test-5): New tests.
* Improve color contrast of refine-related diff faces on dark backgroundsJuri Linkov2025-10-163-6/+6
| | | | | | | * lisp/vc/diff-mode.el (diff-refine-removed, diff-refine-added): * lisp/vc/ediff-init.el (ediff-fine-diff-A, ediff-fine-diff-B): * lisp/vc/smerge-mode.el (smerge-refined-removed, smerge-refined-added): Lower the dominant component of RGB colors from "aa" to "88" (bug#79633).
* * lisp/treesit.el: Small fixes in navigation functions.Juri Linkov2025-10-161-1/+5
| | | | | (treesit-up-list): Better handle multi-language buffers. (treesit-hs-find-next-block): Fix off-by-one error.
* Update VC-Dir contents upon revert-bufferSean Whitton2025-10-162-9/+17
| | | | | * lisp/vc/vc-hooks.el (vc-after-revert): New function. (after-revert-hook): Add it.
* vc-auto-revert-mode: Fix an autoload problemSean Whitton2025-10-161-1/+4
| | | | | * lisp/vc/vc-hooks.el (auto-revert-mode): Replace compiler declaration for this variable with a full defvar-local.
* autorevert: Use defvar-local for the -mode variablesSean Whitton2025-10-161-2/+6
| | | | | | * lisp/autorevert.el (auto-revert-mode, auto-revert-tail-mode): Use defvar-local not defvar. New comment explaining why these duplicate definitions of the variables are present.
* ; * lisp/minibuffer.el (minibuffer--nonselected-check): Fix typos.Martin Rudalics2025-10-161-2/+2
|
* In 'minibuffer--nonselected-check' consult 'completion-reference-buffer'Martin Rudalics2025-10-161-4/+11
| | | | | | * lisp/minibuffer.el (minibuffer--nonselected-check): Don't highlight when the selected window's buffer has 'completion-reference-buffer' set.
* Check if treesit-major-mode-remap-alist is bound in ts-modes autoload formsJuri Linkov2025-10-1622-50/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/c-ts-mode.el: * lisp/progmodes/cmake-ts-mode.el: * lisp/progmodes/csharp-mode.el: * lisp/progmodes/dockerfile-ts-mode.el: * lisp/progmodes/elixir-ts-mode.el: * lisp/progmodes/go-ts-mode.el: * lisp/progmodes/heex-ts-mode.el: * lisp/progmodes/java-ts-mode.el: * lisp/progmodes/js.el: * lisp/progmodes/json-ts-mode.el: * lisp/progmodes/lua-ts-mode.el: * lisp/progmodes/php-ts-mode.el: * lisp/progmodes/python.el: * lisp/progmodes/ruby-ts-mode.el: * lisp/progmodes/rust-ts-mode.el: * lisp/progmodes/sh-script.el: * lisp/progmodes/typescript-ts-mode.el: * lisp/textmodes/css-mode.el: * lisp/textmodes/markdown-ts-mode.el: * lisp/textmodes/mhtml-ts-mode.el: * lisp/textmodes/toml-ts-mode.el: * lisp/textmodes/yaml-ts-mode.el: In autoload forms replace '(treesit-available-p)' with (boundp 'treesit-major-mode-remap-alist). Calling 'treesit-available-p' in loaddefs.el is too early since the tree-sitter library might not be loaded yet. Checking if 'treesit-major-mode-remap-alist' is bound is equivalent to checking if Emacs is compiled with tree-sitter support. (bug#79622)
* time-stamp: padding with mixed uni- and multibyteStephen Gildea2025-10-151-10/+15
| | | | | | * lisp/time-stamp.el (time-stamp-string-preprocess): Use 'length' instead of 'format' to calculate string padding, so that we consistently count characters, not bytes.
* (remote-shell-program): SimplifyStefan Monnier2025-10-151-6/+2
| | | | | | * lisp/files.el (remote-shell-program): Don't bother looking for the full file name of the `ssh` executable, since all users end up looking it up in `load-path` anyway.
* ; elisp-scope.el: Rename some private symbols as suchEshel Yaron2025-10-151-337/+363
| | | | | | | | | | | | | | | | Also add a few missing docstrings. * lisp/emacs-lisp/elisp-scope.el (elisp-scope-symbol-role-p) (elisp-scope-read-symbol-role, elisp-scope-special-variables) (elisp-scope-let, elisp-scope-let*): Add docstring. (elisp-scope-counter, elisp-scope-callback) (elisp-scope-current-let-alist-form, elisp-scope-local-new) (elisp-scope-sym-pos, elisp-scope-sym-bare) (elisp-scope-report, elisp-scope-special-variable-p) (elisp-scope-let-1, elisp-scope-variable) (elisp-scope-binding, elisp-scope-symbol): Rename, replace 'elisp-scope-' prefix with 'elisp-scope--' to indicate that these are private. Update all references.
* doc/emacs/display.texi (Semantic Font Lock): SimplifyStefan Monnier2025-10-151-1/+1
|
* (easy-mmode--less-selective-first): Uncomment the testStefan Monnier2025-10-151-14/+14
| | | | | * test/lisp/emacs-lisp/easy-mmode-tests.el (easy-mmode--less-selective-first): Mark it as failing, instead.
* * lisp/minibuffer.el: Fix recent change of scrolling truncated completionsJuri Linkov2025-10-151-4/+1
| | | | | | (completion--lazy-insert-strings-on-scroll): Don't move to the last completion candidate since this is what happens when scrolling without truncated completions buffer (bug#79506).
* ; * lisp/progmodes/c-ts-mode.el (c-ts-mode, c++-ts-mode): Improve docstrings.Juri Linkov2025-10-151-2/+2
| | | | Add mentions of `treesit-enabled-modes' to the docstrings (bug#79627).
* New tests for multiple globalized minor modesSean Whitton2025-10-151-0/+86
| | | | | | | | * test/lisp/emacs-lisp/easy-mmode-tests.el (easy-mmode-test-mode): Mark permanent-local. (easy-mmode--test-two-globalized-modes): New function. (easy-mmode--more-selective-first) (easy-mmode--less-selective-first): New tests.
* (xdg-mime-apps): Restore corner case and simplifyStefan Monnier2025-10-151-17/+16
| | | | | | | * lisp/xdg.el (xdg-mime-apps): Return nil if that's what the table holds, like we did before commit f60fc1287d49. Consolidate the three (assoc type xdg-mime-table) and shrink the scope of `files`.
* ; Refine a few 'elisp-*' faces for dark backgroundsEshel Yaron2025-10-151-4/+14
| | | | | | | * lisp/progmodes/elisp-mode.el (elisp-major-mode-name) (elisp-symbol-role, elisp-symbol-role-definition, elisp-rx): Use a lighter foreground color when background color is dark to improve legibility.
* Add support for su-rs and sudo-rs programsMichael Albinus2025-10-157-21/+85
| | | | | | | | | | | | | | | | | | | | * doc/misc/tramp.texi (Inline methods): Add "surs" and "sudors" methods. * etc/NEWS: Add optional "surs" and "sudors" Tramp methods. Presentational fixes and improvements. * lisp/net/tramp-cmds.el (tramp-file-name-with-method): Add "surs" and "sudors" to :type. Adapt :version. * lisp/net/tramp-sh.el (tramp-enable-surs-method) (tramp-enable-sudors-method): New defuns (tramp-sh-handle-expand-file-name): Add "surs" and "sudors" in check. * lisp/net/tramp.el (tramp-methods): Adapt docstring. * lisp/comint.el (comint-password-prompt-regexp): * test/lisp/comint-tests.el (comint-testsuite-password-strings): Add su-rs and sudo-rs password prompts.
* (font-lock-defaults): Clarify the use of SYNTAX-ALIST (bug#79586)Stefan Monnier2025-10-142-4/+16
| | | | | | * doc/lispref/modes.texi (Font Lock Basics): * lisp/font-core.el (font-lock-defaults): Document when SYNTAX-ALIST is used and how it interacts with syntactic fontification.
* (rx): Remove the `rx--pcase-expand` middle manStefan Monnier2025-10-141-7/+1
| | | | | * lisp/emacs-lisp/rx.el (rx): Remove the `rx--pcase-expand` middle man, now that `loaddefs-gen.el` expands the `pcase-defmacro` for us.
* (define-minor-mode): Update `global-minor-modes` if init-value is non-nilStefan Monnier2025-10-143-33/+28
| | | | | | | | | | | | | | | | When a global minor mode is enabled by init-value rather than by calling the major mode function, we failed to register it in `global-minor-modes` (bug#79518). * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Register ourselves in `global-minor-modes` at top-level for global modes with a non-nil init-value. Also in the `modefun`, simply the code with `not` and `add-to-list` and consolidate the local/global paths to update `*-minor-modes`. * lisp/simple.el (global-minor-modes): Move to... * lisp/subr.el (global-minor-modes): ...here so it's defined early enough for `auto-compression-mode` to register itself.
* Fix Tramp customizationMichael Albinus2025-10-142-2/+1
| | | | | | | | | | | Do not use the ;;;###tramp-autoload cookie for defcustoms. This damages the customisation when Tramp is autoloaded. Reported by Joel Reicher <joel.reicher@gmail.com>. * lisp/net/tramp-cache.el (tramp-verbose): Declare. (tramp-connection-properties): * lisp/net/tramp-message.el (tramp-verbose): Remove ;;;###tramp-autoload cookie.
* Extend Tree-sitter support on MS-Windows to v0.26.xEli Zaretskii2025-10-141-1/+3
| | | | | * lisp/term/w32-nt.el (dynamic-library-alist): Support Tree-sitter DLLs for versions upto 0.26.x.
* Update to Transient v0.10.1-8-g188ec9a1Jonas Bernoulli2025-10-132-17/+19
|
* ; * lisp/vc/vc-dir.el (vc-dir-resynch-file): Use cl-nset-difference.Sean Whitton2025-10-131-1/+2
|
* * lisp/vc/vc-dir.el (vc-dir-resynch-file): Use file-in-directory-p.Sean Whitton2025-10-131-1/+1
| | | | For better compatibility with MS-Windows.
* ; Fix recently introduced uses of "ELisp".Sean Whitton2025-10-133-8/+8
|
* ; Improve 'elisp-unknown-call' face for dark backgroundsEshel Yaron2025-10-131-1/+4
| | | | | * lisp/progmodes/elisp-mode.el (elisp-unknown-call): Use a lighter foreground color on dark backgrounds for legibility.
* ; Improve documentation of semantic highlightingEli Zaretskii2025-10-133-99/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/elisp-mode.el (elisp) (elisp-fontify-semantically, elisp-symbol-at-mouse) (elisp-free-variable, elisp-special-variable-declaration) (elisp-condition, elisp-major-mode-name, elisp-face) (elisp-symbol-role, elisp-symbol-role-definition) (elisp-function, elisp-non-local-exit, elisp-unknown-call) (elisp-macro, elisp-special-form, elisp-throw-tag) (elisp-feature, elisp-rx, elisp-theme, elisp-binding-variable) (elisp-bound-variable, elisp-shadowing-variable) (elisp-shadowed-variable, elisp-variable-at-point) (elisp-warning-type, elisp-function-property-declaration) (elisp-thing, elisp-slot, elisp-widget-type, elisp-type) (elisp-group, elisp-nnoo-backend, elisp-ampersand) (elisp-constant, elisp-defun, elisp-defmacro, elisp-defvar) (elisp-defface, elisp-icon, elisp-deficon, elisp-oclosure) (elisp-defoclosure, elisp-coding, elisp-defcoding) (elisp-charset, elisp-defcharset, elisp-completion-category) (elisp-completion-category-definition, elisp-add-help-echo) (elisp-fontify-symbol-precedence-function): Add :version tags. * lisp/emacs-lisp/elisp-scope.el: Fix references to meta-syntactic variables in the commentary. (elisp-scope-describe-symbol-role, coding, defcoding, charset) (defcharset): Doc fixes. (elisp-scope-safe-macros): Add :version tag. Doc fix. * doc/emacs/display.texi (Semantic Font Lock): Fix punctuation and wording, improve cross-references and indexing.
* Rewrite 'minibuffer-nonselected-mode' to use 'window-state-change-functions'Martin Rudalics2025-10-131-34/+66
| | | | | | | | | | | | | | | | | | | | | | * lisp/minibuffer.el (minibuffer-nonselected): Rewrite doc-string. (minibuffer--nonselected-overlay): Define it global. Rewrite doc-string. (minibuffer--nonselected-check): Rewrite by comparing the active minibuffer window with the selected window. (minibuffer--nonselected-setup): Globally add 'minibuffer--nonselected-check' to list of functions called by 'window-state-change-functions'. (minibuffer--nonselected-exit): Remove 'minibuffer--nonselected-check' from list of functions called by 'window-state-change-functions' when exiting last recursive minibuffer. (minibuffer-nonselected-mode): Globally add/remove 'minibuffer--nonselected-setup' to/from list of functions called by 'minibuffer-setup-hook' and 'minibuffer--nonselected-exit' to/from list of functions called by 'minibuffer-exit-hook' when activating/deactivating 'minibuffer-nonselected-mode'. Rewrite doc-string.
* ; ido.el: Use find-program variable instead of literal "find" (bug#79620)Joyer Huang2025-10-131-1/+1
| | | | Copyright-paperwork-exempt: yes
* ; Improve 'elisp-free/bound-variable' faces.Eshel Yaron2025-10-131-3/+3
| | | | | | | * lisp/progmodes/elisp-mode.el (elisp-free-variable) (elisp-bound-variable): Reset the foreground face (to avoid inheriting it from 'font-lock-variable-use-face') instead of hardcoding it to "black".
* Merge branch 'feature/elisp-fontify-semantically'Eshel Yaron2025-10-127-1/+3490
|\
| * ; elisp-scope.el: Improve customization group name handling.Eshel Yaron2025-10-121-10/+2
| | | | | | | | | | | | * lisp/emacs-lisp/elisp-scope.el (elisp-scope-quoted-group): Delete it. (define-minor-mode, define-derived-mode): Simplify analyzers.
| * ; elisp-scope.el: Improve widget-type handling.Eshel Yaron2025-10-122-80/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use argument specs to analyze complex widget types. * lisp/emacs-lisp/elisp-scope.el (elisp-scope-widget-type) (elisp-scope-widget-type-1) (elisp-scope-widget-type-keyword-arguments) (elisp-scope-widget-type-arguments) (elisp-scope-widget-type-arguments-1): Delete, no longer used. (custom-declare-variable, define-widget): Simplify analyzers. (elisp-scope--match-spec-to-arg): Add new 'list', 'and', and 'plist-and-then' parametric specs, and add 'widget-type' as a new recursive spec. * test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el Add test.
| * ; elisp-mode.el: Improve consistency among face names.feature/elisp-fontify-semanticallyEshel Yaron2025-10-123-41/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename a couple of faces to solidify the convention that the face name 'elisp-foo' implies "references to foo", not "foo definitions". For definitions we use 'elisp-deffoo' if foo is only one word, or 'elisp-bar-baz-definition' otherwise. * lisp/progmodes/elisp-mode.el (elisp-function-reference): Rename to 'elisp-function'. (elisp-macro-call): Rename to 'elisp-macro'. (elisp-non-local-exit): (elisp-unknown-call): (elisp-special-form): * lisp/emacs-lisp/elisp-scope.el: * test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el: Update references to renamed faces.
| * ; elisp-scope.el: Clean up symbol role definitions.Eshel Yaron2025-10-122-129/+64
| | | | | | | | | | | | | | | | | | | | | | | | * lisp/progmodes/elisp-mode.el (elisp-fontify-semantically): Fix typo in doc string. (elisp--annotate-symbol-with-help-echo): Accept plain string as value of ':help' symbol role property. * lisp/emacs-lisp/elisp-scope.el: Remove unused symbol role properties from all defined symbol roles. Use plain strings for ':help' instead of wrapping them with 'cl-constantly'. Cease 'require'ing 'cl-lib', no longer needed in runtime. (elisp-scope-define-symbol-role): Update doc string.
| * Document 'elisp-fontify-semantically' in the Emacs manualEshel Yaron2025-10-115-214/+193
| | | | | | | | | | | | | | | | * doc/emacs/display.texi (Semantic Font Lock): New node. * doc/emacs/emacs.texi: Update menu. * etc/NEWS: Update relevant entry. * lisp/emacs-lisp/elisp-scope.el: Expand commentary. * doc/misc/elisp-semantic-highlighting.org: Delete it.
| * ; (elisp-scope-if-let): Fix case where bindings entry is a symbolEshel Yaron2025-10-082-6/+12
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/elisp-scope.el (elisp-scope-if-let): Fix handling of a plain symbol as one the bindings in an 'if-let*' form, as in (if-let* (foo) 'bar). * test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el: Test it.
| * ; * lisp/emacs-lisp/elisp-scope.el (if-let*): Add comment.Eshel Yaron2025-10-081-0/+6
| |
| * ; elisp-scope.el: Fix 'wrong-type-argument' in local function analyzersEshel Yaron2025-10-081-12/+15
| | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/elisp-scope.el (elisp-scope--local-function-analyzer): New function. (elisp-scope-flet, elisp-scope-labels) (elisp-scope-named-let): Use it. (elisp-scope-cl-macrolet): Check that argument is 'symbol-with-pos-p' before calling 'symbol-with-pos-pos'.
| * ; Add semantic highlighting test with 'when-let*'Eshel Yaron2025-10-082-4/+15
| | | | | | | | | | | | | | * test/lisp/progmodes/elisp-mode-resources/semantic-highlighting.el: Add test form with 'when-let*'. * test/lisp/progmodes/elisp-mode-tests.el (elisp-test-font-lock): Trust temporary test buffer.