# HG changeset patch # User Richard M. Stallman # Date 1009679952 0 # Node ID d0809974975f9e33ac66a07a15a1dda531e5af96 # Parent 14520c1c2d6381490d2c6d6ba2d7d770c34b121a (basic-save-buffer): If a before-write hook displays an echo area message, pause before calling basic-save-buffer-1. diff -r 14520c1c2d63 -r d0809974975f lisp/files.el --- a/lisp/files.el Sun Dec 30 00:56:40 2001 +0000 +++ b/lisp/files.el Sun Dec 30 02:39:12 2001 +0000 @@ -2606,6 +2606,7 @@ (set-buffer (buffer-base-buffer))) (if (buffer-modified-p) (let ((recent-save (recent-auto-save-p)) + msg setmodes tempsetmodes) ;; On VMS, rename file and buffer to get rid of version number. (if (and (eq system-type 'vax-vms) @@ -2652,14 +2653,18 @@ (save-excursion (goto-char (point-max)) (insert ?\n)))) + (setq msg (current-message)) ;; Support VC version backups. (vc-before-save) (or (run-hook-with-args-until-success 'write-contents-hooks) (run-hook-with-args-until-success 'local-write-file-hooks) (run-hook-with-args-until-success 'write-file-hooks) - ;; If a hook returned t, file is already "written". - ;; Otherwise, write it the usual way now. - (setq setmodes (basic-save-buffer-1))) + (progn + (unless (equal msg (current-message)) + (sit-for 2)) + ;; If a hook returned t, file is already "written". + ;; Otherwise, write it the usual way now. + (setq setmodes (basic-save-buffer-1)))) ;; Now we have saved the current buffer. Let's make sure ;; that buffer-file-coding-system is fixed to what ;; actually used for saving by binding it locally. @@ -3731,7 +3736,7 @@ (let ((available (get-free-disk-space "."))) (when available ;; Replace "total" with "used", to avoid confusion. - (replace-match "used") + (replace-match "total used in directory") (end-of-line) (insert " available " available))))))))))