diff options
| author | Tony Zorman <mail@tony-zorman.com> | 2025-08-05 13:08:43 +0200 |
|---|---|---|
| committer | Eli Zaretskii <eliz@gnu.org> | 2025-08-07 16:09:59 +0300 |
| commit | cf86e00c8d07d7380ef732f4d6972ffd83778baa (patch) | |
| tree | 1276113152f68d73d2a33d1d4262b957448dffb1 | |
| parent | 3d8fbb0716df669b552daef8ada02b4357ca7b49 (diff) | |
; * lisp/indent-aux.el: Fix deindenting read-only text (bug#79176).
| -rw-r--r-- | lisp/indent-aux.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/indent-aux.el b/lisp/indent-aux.el index eeb8f1ee6bb..4a05136ac1a 100644 --- a/lisp/indent-aux.el +++ b/lisp/indent-aux.el @@ -50,13 +50,14 @@ is yanked." (delete-and-extract-region beg end) (buffer-substring beg end)))) (with-temp-buffer - ;; Indent/deindent the same as the major mode in the original - ;; buffer. - (setq indent-tabs-mode i-t-m) - (insert text) - (indent-rigidly (point-min) (point-max) - (- indentation)) - (buffer-string)))) + (let ((inhibit-read-only t)) + ;; Indent/deindent the same as the major mode in the original + ;; buffer. + (setq indent-tabs-mode i-t-m) + (insert text) + (indent-rigidly (point-min) (point-max) + (- indentation)) + (buffer-string))))) ;;;###autoload (define-minor-mode kill-ring-deindent-mode |
