Mercurial > emacs
comparison lisp/mouse.el @ 29344:2f44841e5506
(mouse-save-then-kill-delete-region): Don't bind
before-change-function, after-change-function.
author | Dave Love <fx@gnu.org> |
---|---|
date | Wed, 31 May 2000 22:48:20 +0000 |
parents | c0732e5c1f58 |
children | 42c2692d3933 |
comparison
equal
deleted
inserted
replaced
29343:d34547dec008 | 29344:2f44841e5506 |
---|---|
951 ;; just delete. | 951 ;; just delete. |
952 (delete-region beg end) | 952 (delete-region beg end) |
953 ;; Delete, but make the undo-list entry share with the kill ring. | 953 ;; Delete, but make the undo-list entry share with the kill ring. |
954 ;; First, delete just one char, so in case buffer is being modified | 954 ;; First, delete just one char, so in case buffer is being modified |
955 ;; for the first time, the undo list records that fact. | 955 ;; for the first time, the undo list records that fact. |
956 (let (before-change-function after-change-function | 956 (let (before-change-functions after-change-functions) |
957 before-change-functions after-change-functions) | |
958 (delete-region beg | 957 (delete-region beg |
959 (+ beg (if (> end beg) 1 -1)))) | 958 (+ beg (if (> end beg) 1 -1)))) |
960 (let ((buffer-undo-list buffer-undo-list)) | 959 (let ((buffer-undo-list buffer-undo-list)) |
961 ;; Undo that deletion--but don't change the undo list! | 960 ;; Undo that deletion--but don't change the undo list! |
962 (let (before-change-function after-change-function | 961 (let (before-change-functions after-change-functions) |
963 before-change-functions after-change-functions) | |
964 (primitive-undo 1 buffer-undo-list)) | 962 (primitive-undo 1 buffer-undo-list)) |
965 ;; Now delete the rest of the specified region, | 963 ;; Now delete the rest of the specified region, |
966 ;; but don't record it. | 964 ;; but don't record it. |
967 (setq buffer-undo-list t) | 965 (setq buffer-undo-list t) |
968 (if (/= (length (car kill-ring)) (- (max end beg) (min end beg))) | 966 (if (/= (length (car kill-ring)) (- (max end beg) (min end beg))) |