# HG changeset patch # User Stefan Monnier # Date 944548244 0 # Node ID f14026cd976702a8de3a986394ee21a8fc9764aa # Parent 2ddbff6366e94d4a184040bbd2cdc4639409e5df (kill-region): Use the new `delete-and-extract-region' rather than the undo log (which is incorrect with *-change-functions). diff -r 2ddbff6366e9 -r f14026cd9767 lisp/ChangeLog --- a/lisp/ChangeLog Tue Dec 07 04:58:54 1999 +0000 +++ b/lisp/ChangeLog Tue Dec 07 06:30:44 1999 +0000 @@ -1,3 +1,14 @@ +1999-12-07 Stefan Monnier + + * files.el (save-some-buffers): Turn EXITING into the more general + PRED argument to allow specifying a subset of buffers. + + * simple.el (kill-region): Use the new `delete-and-extract-region' + rather than the undo log (which is incorrect with *-change-functions). + + * font-lock.el (font-lock-default-fontify-region): Fix subtle + off-by-one problem that could force re-fontifying the whole buffer. + 1999-12-06 Michael Kifer * viper-cmd.el (viper-minibuffer-standard-hook, @@ -167,7 +178,7 @@ (lm-summary, lm-authors, lm-maintainer, lm-creation-date) (lm-last-modified-date, lm-version, lm-keywords, lm-adapted-by) (lm-commentary, lm-verify, lm-synopsis): Use lm-with-file. - (lm-commentary): fix to handle the case when the change log is + (lm-commentary): Fix to handle the case when the change log is at the end of the file. 1999-12-02 Kenichi Handa @@ -867,7 +878,6 @@ * progmodes/compile.el (compilation-error-regexp-alist): Undo previous change. ->>>>>>> 1.97 1999-10-28 Dave Love * help.el (help-follow): Make arg optional again and really @@ -1255,7 +1265,6 @@ * emacs-lisp/cl-indent.el (common-lisp-indent-function): Use `eq' instead of `eql'. ->>>>>>> 1.86 1999-10-14 Stefan Monnier * ange-ftp.el (ange-ftp-make-tmp-name, ange-ftp-del-tmp-name): diff -r 2ddbff6366e9 -r f14026cd9767 lisp/simple.el --- a/lisp/simple.el Tue Dec 07 04:58:54 1999 +0000 +++ b/lisp/simple.el Tue Dec 07 06:30:44 1999 +0000 @@ -1633,29 +1633,12 @@ to make one entry in the kill ring." (interactive "*r") (condition-case nil - ;; Don't let the undo list be truncated before we can even access it. - (let ((undo-strong-limit (+ (- (max beg end) (min beg end)) 100)) - (old-list buffer-undo-list) - tail - ;; If we can't rely on finding the killed text - ;; in the undo list, save it now as a string. - (string (if (or (eq buffer-undo-list t) - (= beg end)) - (buffer-substring beg end)))) - (delete-region beg end) - ;; Search back in buffer-undo-list for this string, - ;; in case a change hook made property changes. - (setq tail buffer-undo-list) - (unless string - (while (not (stringp (car (car tail)))) - (setq tail (cdr tail))) - ;; If we did not already make the string to use, - ;; use the same one that undo made for us. - (setq string (car (car tail)))) - ;; Add that string to the kill ring, one way or another. - (if (eq last-command 'kill-region) - (kill-append string (< end beg)) - (kill-new string)) + (let ((string (delete-and-extract-region beg end))) + (when string ;STRING is nil if BEG = END + ;; Add that string to the kill ring, one way or another. + (if (eq last-command 'kill-region) + (kill-append string (< end beg)) + (kill-new string))) (setq this-command 'kill-region)) ((buffer-read-only text-read-only) ;; The code above failed because the buffer, or some of the characters