diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2026-05-29 11:01:25 +0100 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2026-05-29 11:01:25 +0100 |
| commit | c7167f2a1e9dd45603e349bb2b6ea88dca07282e (patch) | |
| tree | a3812972b0387011db991044cfa35b1234286cca /lisp | |
| parent | 4870bc06fa36125ff7cb323a17dc67689f6d4109 (diff) | |
| parent | c3babe4b8966c3ada6305b2af85e24398190a14f (diff) | |
Merge from origin/emacs-31
c3babe4b896 Fix lax whitespace highlight during query-replace
2e70b88623e Fix fill-paragraph combining text with preceding comment
ea54c33950f ; * etc/PROBLEMS: Link to bug#81124.
02897e208d0 emacsclient quote_argument is void
c6181780663 ; Mark process-test-stderr-buffer as :unstable when runni...
2c1b45f5c56 ; Improve documentation of 'vc-dir-auto-hide-up-to-date'
768c8bf0045 Revert "* admin/notes/documentation: Recommend not using ...
a7414f18598 native--compile-skip-on-battery-p: Try to fix ?b, ?B cond...
7cee526a8cc Save and restore original local keymap in grep-edit-mode
4d87d203cfb Fix display of inline SVG images in Rmail
4c55d04ebe3 Add treesit-ready-p check back to tree-sitter major modes...
7892ae5eaf4 Fix pathological slowness in flex completion
12eec781ed6 No longer raise error on HTTP 402 (Payment Required) (bug...
1800350b186 Avoid compilation-mode matching rust as gnu
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/comp-run.el | 7 | ||||
| -rw-r--r-- | lisp/mail/rmailmm.el | 7 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/c-ts-mode.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/cmake-ts-mode.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 27 | ||||
| -rw-r--r-- | lisp/progmodes/dockerfile-ts-mode.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/elixir-ts-mode.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/go-ts-mode.el | 12 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 5 | ||||
| -rw-r--r-- | lisp/progmodes/heex-ts-mode.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/js.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/lua-ts-mode.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 8 | ||||
| -rw-r--r-- | lisp/progmodes/rust-ts-mode.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/typescript-ts-mode.el | 8 | ||||
| -rw-r--r-- | lisp/replace.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/css-mode.el | 4 | ||||
| -rw-r--r-- | lisp/textmodes/fill.el | 13 | ||||
| -rw-r--r-- | lisp/textmodes/mhtml-ts-mode.el | 4 | ||||
| -rw-r--r-- | lisp/textmodes/toml-ts-mode.el | 4 | ||||
| -rw-r--r-- | lisp/textmodes/yaml-ts-mode.el | 4 | ||||
| -rw-r--r-- | lisp/treesit-x.el | 4 | ||||
| -rw-r--r-- | lisp/url/url-http.el | 9 | ||||
| -rw-r--r-- | lisp/vc/vc-dir.el | 24 |
26 files changed, 137 insertions, 62 deletions
diff --git a/lisp/emacs-lisp/comp-run.el b/lisp/emacs-lisp/comp-run.el index f329d627392..64e20327906 100644 --- a/lisp/emacs-lisp/comp-run.el +++ b/lisp/emacs-lisp/comp-run.el @@ -203,9 +203,10 @@ LOAD and SELECTOR work as described in `native--compile-async'." ;; because power users often configure their batteries ;; to stop charging at less than 100% as a way to ;; extend the lifetime of their battery hardware. - (string= (cdr (assq ?b res)) "+") - (member (cdr (assq ?B res)) '("charging" "pending-charge")) - (not (string= (cdr (assq ?B res)) "discharging"))))))) + ;; Further discussion in bug#80922. + (and (not (equal (cdr (assq ?b res)) "+")) + (not (member (cdr (assq ?B res)) + '("charging" "pending-charge"))))))))) (defvar comp-files-queue () "List of Emacs Lisp files to be compiled.") diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 1f9d1310782..e317b0f13cd 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el @@ -843,8 +843,11 @@ directly." ((string-match "text/" content-type) (setq type 'text)) ((string-match "image/\\(.*\\)" content-type) - (setq type (image-supported-file-p - (concat "." (match-string 1 content-type)))) + (let ((fnext (match-string 1 content-type))) + ;; Ask about SVG support when Content-type is image/svg+xml. + (if (equal fnext "svg+xml") + (setq fnext "svg")) + (setq type (image-supported-file-p (concat "." fnext)))) (when (and type rmail-mime-show-images (not (eq rmail-mime-show-images 'button)) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index b1c5e6e5180..00ce306ba67 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -5005,11 +5005,6 @@ usual. Returns (ALL PAT PREFIX SUFFIX)." (prefix (substring beforepoint 0 (car bounds))) (suffix (substring afterpoint (cdr bounds))) (pat2 (substring pat (car bounds) (+ point (cdr bounds)))) - (completion-regexp-list - (cons (mapconcat (lambda (c) (regexp-quote (char-to-string c))) - pat2 - ".*") - completion-regexp-list)) (all (all-completions prefix table pred)) (all (if (zerop (length pat2)) all diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index c8120d5752c..d08615446a1 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -1475,7 +1475,9 @@ in your init files, or customize `treesit-enabled-modes'." :group 'c :after-hook (c-ts-mode-set-modeline) - (when (treesit-ensure-installed 'c) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'c) + (treesit-ready-p 'c)) ;; Create an "for-each" parser, see `c-ts-mode--emacs-set-ranges' ;; for more. (when c-ts-mode-emacs-sources-support @@ -1554,7 +1556,9 @@ recommended to enable `electric-pair-mode' with this mode." :group 'c++ :after-hook (c-ts-mode-set-modeline) - (when (treesit-ensure-installed 'cpp) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'cpp) + (treesit-ready-p 'cpp)) (let ((primary-parser (treesit-parser-create 'cpp))) ;; Syntax. diff --git a/lisp/progmodes/cmake-ts-mode.el b/lisp/progmodes/cmake-ts-mode.el index d8873191d61..6abd92b5e1a 100644 --- a/lisp/progmodes/cmake-ts-mode.el +++ b/lisp/progmodes/cmake-ts-mode.el @@ -220,7 +220,9 @@ Return nil if there is no name or if NODE is not a defun node." :group 'cmake :syntax-table cmake-ts-mode--syntax-table - (when (treesit-ensure-installed 'cmake) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'cmake) + (treesit-ready-p 'cmake)) (setq treesit-primary-parser (treesit-parser-create 'cmake)) ;; Comments. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index aaad8622c95..fbcdc6b5124 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -421,6 +421,20 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) nil (1 compilation-error-face)) + ;; This must precede the `gnu' rule or the latter would match instead. + (rust + ,(rx bol (or (group-n 1 "error") (group-n 2 "warning") (group-n 3 "note")) + (? "[" (+ (in "A-Z" "0-9")) "]") ":" (* nonl) + "\n" (+ " ") "-->" + " " (group-n 4 (+ nonl)) ; file + ":" (group-n 5 (+ (in "0-9"))) ; line + ":" (group-n 6 (+ (in "0-9")))) ; column + 4 5 6 (2 . 3) + nil + (1 compilation-error-face) + (2 compilation-warning-face) + (3 compilation-info-face)) + ;; Tested with Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT 2.1. (lua ,(rx bol @@ -582,19 +596,6 @@ during global destruction\\.$\\)" 1 2) "\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)" 2 3 nil nil) - (rust - ,(rx bol (or (group-n 1 "error") (group-n 2 "warning") (group-n 3 "note")) - (? "[" (+ (in "A-Z" "0-9")) "]") ":" (* nonl) - "\n" (+ " ") "-->" - " " (group-n 4 (+ nonl)) ; file - ":" (group-n 5 (+ (in "0-9"))) ; line - ":" (group-n 6 (+ (in "0-9")))) ; column - 4 5 6 (2 . 3) - nil - (1 compilation-error-face) - (2 compilation-warning-face) - (3 compilation-info-face)) - (rxp "^\\(?:Error\\|Warnin\\(g\\)\\):.*\n.* line \\([0-9]+\\) char\ \\([0-9]+\\) of file://\\(.+\\)" diff --git a/lisp/progmodes/dockerfile-ts-mode.el b/lisp/progmodes/dockerfile-ts-mode.el index 1d42c239b84..b97ec89b99a 100644 --- a/lisp/progmodes/dockerfile-ts-mode.el +++ b/lisp/progmodes/dockerfile-ts-mode.el @@ -167,7 +167,9 @@ Return nil if there is no name or if NODE is not a stage node." :group 'dockerfile :syntax-table dockerfile-ts-mode--syntax-table - (when (treesit-ensure-installed 'dockerfile) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'dockerfile) + (treesit-ready-p 'dockerfile)) (setq treesit-primary-parser (treesit-parser-create 'dockerfile)) ;; Comments. diff --git a/lisp/progmodes/elixir-ts-mode.el b/lisp/progmodes/elixir-ts-mode.el index 9514d6bdc91..9bda7f0046f 100644 --- a/lisp/progmodes/elixir-ts-mode.el +++ b/lisp/progmodes/elixir-ts-mode.el @@ -737,7 +737,9 @@ Return nil if NODE is not a defun node or doesn't have a name." (add-hook 'post-self-insert-hook #'elixir-ts--electric-pair-string-delimiter 'append t) - (when (treesit-ensure-installed 'elixir) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'elixir) + (treesit-ready-p 'elixir)) (setq-local treesit-primary-parser (treesit-parser-create 'elixir)) @@ -762,7 +764,9 @@ Return nil if NODE is not a defun node or doesn't have a name." (setq-local treesit-defun-name-function #'elixir-ts--defun-name) ;; Embedded Heex. - (when (treesit-ensure-installed 'heex) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'heex) + (treesit-ready-p 'heex)) (require 'heex-ts-mode) (treesit-parser-create 'heex) diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el index 76de7c9b41b..8de6d0e0700 100644 --- a/lisp/progmodes/go-ts-mode.el +++ b/lisp/progmodes/go-ts-mode.el @@ -287,7 +287,9 @@ :group 'go :syntax-table go-ts-mode--syntax-table - (when (treesit-ensure-installed 'go) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'go) + (treesit-ready-p 'go)) (setq treesit-primary-parser (treesit-parser-create 'go)) ;; Comments. @@ -608,7 +610,9 @@ what the parent of the node would be if it were a node." :group 'go :syntax-table go-mod-ts-mode--syntax-table - (when (treesit-ensure-installed 'gomod) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'gomod) + (treesit-ready-p 'gomod)) (setq treesit-primary-parser (treesit-parser-create 'gomod)) ;; Comments. @@ -712,7 +716,9 @@ what the parent of the node would be if it were a node." "Major mode for editing go.work files, powered by tree-sitter." :group 'go - (when (treesit-ensure-installed 'gowork) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'gowork) + (treesit-ready-p 'gowork)) (setq treesit-primary-parser (treesit-parser-create 'gowork)) ;; Comments. diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 72a05a082bb..a5ba32d26e8 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -1120,6 +1120,8 @@ list is empty)." (defvar grep-edit-mode-hook nil "Hooks run when changing to Grep-Edit mode.") +(defvar grep-edit-original-mode-map nil) + (defun grep-edit-mode () "Major mode for editing *grep* buffers. In this mode, changes to the *grep* buffer are applied to the @@ -1140,6 +1142,7 @@ The only editable texts in a Grep-Edit buffer are the match results." (error "Not a Grep buffer")) (when (get-buffer-process (current-buffer)) (error "Cannot switch when grep is running")) + (setq-local grep-edit-original-mode-map (current-local-map)) (use-local-map grep-edit-mode-map) (grep-edit--prepare-buffer) (setq buffer-read-only nil) @@ -1159,7 +1162,7 @@ The only editable texts in a Grep-Edit buffer are the match results." (unless (derived-mode-p 'grep-edit-mode) (error "Not a Grep-Edit buffer")) (remove-hook 'after-change-functions #'occur-after-change-function t) - (use-local-map grep-mode-map) + (use-local-map grep-edit-original-mode-map) (setq buffer-read-only t) (setq major-mode 'grep-mode) (setq mode-name "Grep") diff --git a/lisp/progmodes/heex-ts-mode.el b/lisp/progmodes/heex-ts-mode.el index d756224f371..e8fec8b0469 100644 --- a/lisp/progmodes/heex-ts-mode.el +++ b/lisp/progmodes/heex-ts-mode.el @@ -201,7 +201,9 @@ Return nil if NODE is not a defun node or doesn't have a name." "Major mode for editing HEEx, powered by tree-sitter." :group 'heex-ts - (when (treesit-ensure-installed 'heex) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'heex) + (treesit-ready-p 'heex)) (setq treesit-primary-parser (treesit-parser-create 'heex)) ;; Comments @@ -236,7 +238,9 @@ Return nil if NODE is not a defun node or doesn't have a name." (setq-local treesit-font-lock-feature-list heex-ts--font-lock-feature-list) - (when (treesit-ensure-installed 'elixir) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'elixir) + (treesit-ready-p 'elixir)) (require 'elixir-ts-mode) (treesit-parser-create 'elixir) diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index e7e5bd901e1..3f2deca317c 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -4041,7 +4041,9 @@ See `treesit-thing-settings' for more information.") \\<js-ts-mode-map>" :group 'js :syntax-table js-mode-syntax-table - (when (treesit-ensure-installed 'javascript) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'javascript) + (treesit-ready-p 'javascript)) ;; Borrowed from `js-mode'. (setq-local prettify-symbols-alist js--prettify-symbols-alist) (setq-local parse-sexp-ignore-comments t) @@ -4073,7 +4075,9 @@ See `treesit-thing-settings' for more information.") (setq-local treesit-font-lock-settings (js--treesit-font-lock-settings)) (setq-local treesit-font-lock-feature-list js--treesit-font-lock-feature-list) - (when (treesit-ensure-installed 'jsdoc) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'jsdoc) + (treesit-ready-p 'jsdoc)) (setq-local treesit-range-settings (treesit-range-rules :embed 'jsdoc diff --git a/lisp/progmodes/lua-ts-mode.el b/lisp/progmodes/lua-ts-mode.el index 8d726b9b15b..2963d5a96af 100644 --- a/lisp/progmodes/lua-ts-mode.el +++ b/lisp/progmodes/lua-ts-mode.el @@ -675,7 +675,9 @@ Calls REPORT-FN directly." :syntax-table lua-ts--syntax-table (use-local-map lua-ts-mode-map) - (when (treesit-ensure-installed 'lua) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'lua) + (treesit-ready-p 'lua)) (setq treesit-primary-parser (treesit-parser-create 'lua)) ;; Comments. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ad0e84bf74f..86336979067 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -7477,9 +7477,11 @@ implementations: `python-mode' and `python-ts-mode'." \\{python-ts-mode-map}" :syntax-table python-mode-syntax-table - (when (if (fboundp 'treesit-ensure-installed) ; Emacs 31 - (treesit-ensure-installed 'python) - (treesit-ready-p 'python)) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (if (fboundp 'treesit-ensure-installed) ; Emacs 31 + (treesit-ensure-installed 'python) + t) + (treesit-ready-p 'python)) (setq treesit-primary-parser (treesit-parser-create 'python)) (setq-local treesit-font-lock-feature-list '(( comment definition) diff --git a/lisp/progmodes/rust-ts-mode.el b/lisp/progmodes/rust-ts-mode.el index 9bc4324ff66..dee82f934ce 100644 --- a/lisp/progmodes/rust-ts-mode.el +++ b/lisp/progmodes/rust-ts-mode.el @@ -557,7 +557,9 @@ See `prettify-symbols-compose-predicate'." :group 'rust :syntax-table rust-ts-mode--syntax-table - (when (treesit-ensure-installed 'rust) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'rust) + (treesit-ready-p 'rust)) (setq treesit-primary-parser (treesit-parser-create 'rust)) ;; Syntax. diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 8479c3cfd9a..4d025eeb18d 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1583,7 +1583,9 @@ with your script for an edit-interpret-debug cycle." This mode automatically falls back to `sh-mode' if the buffer is not written in Bash or sh." :syntax-table sh-mode-syntax-table - (when (treesit-ensure-installed 'bash) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'bash) + (treesit-ready-p 'bash)) (sh-set-shell "bash" nil nil) (add-hook 'flymake-diagnostic-functions #'sh-shellcheck-flymake nil t) (add-hook 'hack-local-variables-hook diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index c9d1d1eff4d..61e281310aa 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -701,7 +701,9 @@ This mode is intended to be inherited by concrete major modes." :group 'typescript :syntax-table typescript-ts-mode--syntax-table - (when (treesit-ensure-installed 'typescript) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'typescript) + (treesit-ready-p 'typescript)) (setq treesit-primary-parser (treesit-parser-create 'typescript)) ;; Indent. @@ -757,7 +759,9 @@ at least 3 (which is the default value)." :group 'typescript :syntax-table typescript-ts-mode--syntax-table - (when (treesit-ensure-installed 'tsx) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'tsx) + (treesit-ready-p 'tsx)) (setq treesit-primary-parser (treesit-parser-create 'tsx)) ;; Comments. diff --git a/lisp/replace.el b/lisp/replace.el index 48e158de531..4bb91fbd6a0 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -369,6 +369,8 @@ should a regexp." (replace--region-filter (funcall region-extract-function 'bounds))) :highlight (and query-replace-lazy-highlight (not no-highlight)) + :lax-whitespace (if regexp-flag replace-regexp-lax-whitespace + replace-lax-whitespace) :regexp regexp-flag :regexp-function (or replace-regexp-function delimited-flag diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 355555df090..12632e24e0e 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -1888,7 +1888,9 @@ can also be used to fill comments. \\{css-mode-map}" :syntax-table css-mode-syntax-table - (when (treesit-ensure-installed 'css) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'css) + (treesit-ready-p 'css)) ;; Borrowed from `css-mode'. (setq-local syntax-propertize-function css-syntax-propertize-function) diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index c1ccdf2ec5f..270cb388971 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -911,6 +911,7 @@ region, instead of just filling the current paragraph." (fill-comment-paragraph justify))) ;; 4. If it all fails, default to the good ol' text paragraph filling. (let ((before (point)) + (paragraph-start-orig paragraph-start) (paragraph-start paragraph-start) ;; Fill prefix used for filling the paragraph. fill-pfx) @@ -933,6 +934,18 @@ region, instead of just filling the current paragraph." (setq fill-pfx "") (let ((end (point)) (beg (progn (fill-forward-paragraph -1) (point)))) + ;; If the paragraph starts with a comment line preceding point + ;; on a non-comment line, skip such comment lines, so they + ;; are not filled together (bug#80449). + (when (and fill-paragraph-handle-comment comment-start-skip + (< beg before)) + (save-excursion + (goto-char beg) + (when (looking-at paragraph-start-orig) + (goto-char (1+ (match-end 0)))) + (when (looking-at comment-start-skip) + (forward-line 1) + (setq beg (point))))) (goto-char before) (setq fill-pfx (if use-hard-newlines diff --git a/lisp/textmodes/mhtml-ts-mode.el b/lisp/textmodes/mhtml-ts-mode.el index 2a1c62b87e4..d53d74e220a 100644 --- a/lisp/textmodes/mhtml-ts-mode.el +++ b/lisp/textmodes/mhtml-ts-mode.el @@ -511,7 +511,9 @@ Powered by tree-sitter." ;; jsdoc is not mandatory for js-ts-mode, so we respect this by ;; adding jsdoc range rules only when jsdoc is available. - (when (treesit-ensure-installed 'jsdoc) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'jsdoc) + (treesit-ready-p 'jsdoc)) (setq-local c-ts-common--comment-regexp js--treesit-jsdoc-comment-regexp)) diff --git a/lisp/textmodes/toml-ts-mode.el b/lisp/textmodes/toml-ts-mode.el index d3f09526b90..63e3f60edd9 100644 --- a/lisp/textmodes/toml-ts-mode.el +++ b/lisp/textmodes/toml-ts-mode.el @@ -138,7 +138,9 @@ Return nil if there is no name or if NODE is not a defun node." :group 'toml-mode :syntax-table toml-ts-mode--syntax-table - (when (treesit-ensure-installed 'toml) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'toml) + (treesit-ready-p 'toml)) (setq treesit-primary-parser (treesit-parser-create 'toml)) ;; Comments diff --git a/lisp/textmodes/yaml-ts-mode.el b/lisp/textmodes/yaml-ts-mode.el index c1521c82c22..5afd4d2d111 100644 --- a/lisp/textmodes/yaml-ts-mode.el +++ b/lisp/textmodes/yaml-ts-mode.el @@ -262,7 +262,9 @@ Calls REPORT-FN directly." :group 'yaml :syntax-table yaml-ts-mode--syntax-table - (when (treesit-ensure-installed 'yaml) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed 'yaml) + (treesit-ready-p 'yaml)) (setq treesit-primary-parser (treesit-parser-create 'yaml)) ;; Comments. diff --git a/lisp/treesit-x.el b/lisp/treesit-x.el index 9d0541b458c..86eb417c7b5 100644 --- a/lisp/treesit-x.el +++ b/lisp/treesit-x.el @@ -142,7 +142,9 @@ of `define-treesit-generic-mode'. ;;;###autoload (defun treesit-generic-mode-setup (lang) "Go into the treesit generic mode MODE." - (when (treesit-ensure-installed lang) + ;; `treesit-ready-p' also checks for buffer size. + (when (and (treesit-ensure-installed lang) + (treesit-ready-p lang)) (setq treesit-primary-parser (treesit-parser-create lang)) (when-let* ((query (treesit-generic-mode-font-lock-query lang))) diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index ce512c6db33..0be1b326d6c 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -826,9 +826,12 @@ should be shown to the user." ;; Authorization header field. (url-http-handle-authentication nil)) ('payment-required ; 402 - ;; This code is reserved for future use - (url-mark-buffer-as-dead buffer) - (error "Somebody wants you to give them money")) + ;; This code is "reserved for future use", but in the + ;; mean time websites have been seen to use it, for + ;; instance anti-bot challenges requiring the "payment" + ;; of a click of a button to prove the visitor is human, + ;; so we no longer raise an `error' here. + t) ('forbidden ; 403 ;; The server understood the request, but is refusing to ;; fulfill it. Authorization will not help and the request diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 2d6f8ee97d0..c79ac50cfc3 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -161,17 +161,23 @@ proceed to mark and unmark other entries, without asking." :version "31.1") (defcustom vc-dir-auto-hide-up-to-date nil - "If non-nil, VC-Dir automatically hides \\+`up-to-date' and \\+`ignored' items. + "Whether VC-Dir automatically removes \\+`up-to-date'/\\+`ignored' files from display. -If the value of this variable is the symbol `revert', \ -\\<vc-dir-mode-map>\\[revert-buffer] in VC-Dir -buffers also does \\[vc-dir-hide-up-to-date]. \ -That is, refreshing the VC-Dir buffer also hides -\\+`up-to-date' and \\+`ignored' items. +If the value is nil, files shown in the VC-Dir buffer will remain on +display if they become \\+`up-to-date' or \\+`ignored'. +If the value is t, files are automatically removed from display when +they become \\+`up-to-date' or \\+`ignored'. +If the value is the symbol `revert', any displayed files that +are \\+`up-to-date' or \\+`ignored' are removed from display +by \\<vc-dir-mode-map>\\[revert-buffer], but they are not automatically removed +when they become \\+`up-to-date' or \\+`ignored'. That is, +refreshing the VC-Dir buffer hides \\+`up-to-date' and \\+`ignored' +files when the value is the symbol `revert'. +Any other value is treated as t. + +VC-Dir never shows \\+`up-to-date' and \\+`ignored' files when the +directory is first displayed. -If the value of this variable is any other non-nil value, then in -addition, hide items whenever their state would change to -\\+`up-to-date' or \\+`ignored'. You can still use `vc-dir-show-fileentry' to manually add an entry for an \\+`up-to-date' or \\+`ignored' file." :type 'boolean |
