mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-25 10:47:00 +00:00
(mouse-save-then-kill-delete-region): Turn off change hooks
for the edit operations that are not real.
This commit is contained in:
parent
685ff9f8e6
commit
2f4b15efbd
@ -408,11 +408,15 @@ This does not delete the region; it acts like \\[kill-ring-save]."
|
||||
;; Delete, but make the undo-list entry share with the kill ring.
|
||||
;; First, delete just one char, so in case buffer is being modified
|
||||
;; for the first time, the undo list records that fact.
|
||||
(let (before-change-function after-change-function
|
||||
before-change-functions after-change-functions)
|
||||
(delete-region beg
|
||||
(+ beg (if (> end beg) 1 -1)))
|
||||
(+ beg (if (> end beg) 1 -1))))
|
||||
(let ((buffer-undo-list buffer-undo-list))
|
||||
;; Undo that deletion--but don't change the undo list!
|
||||
(primitive-undo 1 buffer-undo-list)
|
||||
(let (before-change-function after-change-function
|
||||
before-change-functions after-change-functions)
|
||||
(primitive-undo 1 buffer-undo-list))
|
||||
;; Now delete the rest of the specified region,
|
||||
;; but don't record it.
|
||||
(setq buffer-undo-list t)
|
||||
|
Loading…
Reference in New Issue
Block a user