mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Fix rare breakage of 'revert-buffer' in 'archive-mode'
* lisp/arc-mode.el (archive--mode-revert): Avoid deletion of some region of the reverted buffer by 'archive-desummarize'. (Bug#79574)
This commit is contained in:
parent
a142cc262e
commit
129119aef1
1 changed files with 6 additions and 0 deletions
|
|
@ -1648,6 +1648,12 @@ as a relative change like \"g+rw\" as for chmod(2)."
|
|||
(defun archive--mode-revert (orig-fun &rest args)
|
||||
(let ((no (archive-get-lineno)))
|
||||
(setq archive-files nil)
|
||||
;; 'orig-fun' will indirectly call 'archive-desummarize', which will
|
||||
;; delete the region between point-min and
|
||||
;; 'archive-proper-file-start'. But the latter will be invalidated
|
||||
;; by 'orig-fun' (which actually reverts the buffer), so by setting
|
||||
;; it to 1 we prevent the damage from that deletion.
|
||||
(setq archive-proper-file-start 1)
|
||||
(let ((coding-system-for-read 'no-conversion))
|
||||
(apply orig-fun t t (cddr args)))
|
||||
(archive-mode)
|
||||
|
|
|
|||
Loading…
Reference in a new issue