2606 |
(set-buffer (buffer-base-buffer))) |
(set-buffer (buffer-base-buffer))) |
2607 |
(if (buffer-modified-p) |
(if (buffer-modified-p) |
2608 |
(let ((recent-save (recent-auto-save-p)) |
(let ((recent-save (recent-auto-save-p)) |
2609 |
|
msg |
2610 |
setmodes tempsetmodes) |
setmodes tempsetmodes) |
2611 |
;; On VMS, rename file and buffer to get rid of version number. |
;; On VMS, rename file and buffer to get rid of version number. |
2612 |
(if (and (eq system-type 'vax-vms) |
(if (and (eq system-type 'vax-vms) |
2653 |
(save-excursion |
(save-excursion |
2654 |
(goto-char (point-max)) |
(goto-char (point-max)) |
2655 |
(insert ?\n)))) |
(insert ?\n)))) |
2656 |
|
(setq msg (current-message)) |
2657 |
;; Support VC version backups. |
;; Support VC version backups. |
2658 |
(vc-before-save) |
(vc-before-save) |
2659 |
(or (run-hook-with-args-until-success 'write-contents-hooks) |
(or (run-hook-with-args-until-success 'write-contents-hooks) |
2660 |
(run-hook-with-args-until-success 'local-write-file-hooks) |
(run-hook-with-args-until-success 'local-write-file-hooks) |
2661 |
(run-hook-with-args-until-success 'write-file-hooks) |
(run-hook-with-args-until-success 'write-file-hooks) |
2662 |
;; If a hook returned t, file is already "written". |
(progn |
2663 |
;; Otherwise, write it the usual way now. |
(unless (equal msg (current-message)) |
2664 |
(setq setmodes (basic-save-buffer-1))) |
(sit-for 2)) |
2665 |
|
;; If a hook returned t, file is already "written". |
2666 |
|
;; Otherwise, write it the usual way now. |
2667 |
|
(setq setmodes (basic-save-buffer-1)))) |
2668 |
;; Now we have saved the current buffer. Let's make sure |
;; Now we have saved the current buffer. Let's make sure |
2669 |
;; that buffer-file-coding-system is fixed to what |
;; that buffer-file-coding-system is fixed to what |
2670 |
;; actually used for saving by binding it locally. |
;; actually used for saving by binding it locally. |
3736 |
(let ((available (get-free-disk-space "."))) |
(let ((available (get-free-disk-space "."))) |
3737 |
(when available |
(when available |
3738 |
;; Replace "total" with "used", to avoid confusion. |
;; Replace "total" with "used", to avoid confusion. |
3739 |
(replace-match "used") |
(replace-match "total used in directory") |
3740 |
(end-of-line) |
(end-of-line) |
3741 |
(insert " available " available)))))))))) |
(insert " available " available)))))))))) |
3742 |
|
|