mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 18:37:33 +00:00
; * lisp/indent-aux.el: Fix deindenting read-only text (bug#79176).
This commit is contained in:
parent
3d8fbb0716
commit
cf86e00c8d
1 changed files with 8 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue