diff options
| author | Richard M. Stallman | 1994-06-13 19:35:07 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-06-13 19:35:07 +0000 |
| commit | 2f4b15efbd742f580a4f26e134017a7759689e12 (patch) | |
| tree | 2b086fd5c4572e790d262bbfa479c974b85b9543 | |
| parent | 685ff9f8e6fd8cc43bb4771f8cdb5b8e93668e2d (diff) | |
| download | emacs-2f4b15efbd742f580a4f26e134017a7759689e12.tar.gz emacs-2f4b15efbd742f580a4f26e134017a7759689e12.zip | |
(mouse-save-then-kill-delete-region): Turn off change hooks
for the edit operations that are not real.
| -rw-r--r-- | lisp/mouse.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 8d1c1e90aeb..b447bff5dbe 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -408,11 +408,15 @@ This does not delete the region; it acts like \\[kill-ring-save]." | |||
| 408 | ;; Delete, but make the undo-list entry share with the kill ring. | 408 | ;; Delete, but make the undo-list entry share with the kill ring. |
| 409 | ;; First, delete just one char, so in case buffer is being modified | 409 | ;; First, delete just one char, so in case buffer is being modified |
| 410 | ;; for the first time, the undo list records that fact. | 410 | ;; for the first time, the undo list records that fact. |
| 411 | (delete-region beg | 411 | (let (before-change-function after-change-function |
| 412 | (+ beg (if (> end beg) 1 -1))) | 412 | before-change-functions after-change-functions) |
| 413 | (delete-region beg | ||
| 414 | (+ beg (if (> end beg) 1 -1)))) | ||
| 413 | (let ((buffer-undo-list buffer-undo-list)) | 415 | (let ((buffer-undo-list buffer-undo-list)) |
| 414 | ;; Undo that deletion--but don't change the undo list! | 416 | ;; Undo that deletion--but don't change the undo list! |
| 415 | (primitive-undo 1 buffer-undo-list) | 417 | (let (before-change-function after-change-function |
| 418 | before-change-functions after-change-functions) | ||
| 419 | (primitive-undo 1 buffer-undo-list)) | ||
| 416 | ;; Now delete the rest of the specified region, | 420 | ;; Now delete the rest of the specified region, |
| 417 | ;; but don't record it. | 421 | ;; but don't record it. |
| 418 | (setq buffer-undo-list t) | 422 | (setq buffer-undo-list t) |