Mercurial > emacs
comparison lisp/diff.el @ 108223:261591829d04
Add optional arg to delete-file to force deletion (Bug#6070).
* eval.c (internal_condition_case_n): Rename from
internal_condition_case_2.
(internal_condition_case_2): New function.
* xdisp.c (safe_call): Use internal_condition_case_n.
* fileio.c (Fdelete_file, internal_delete_file): New arg FORCE.
(internal_delete_file, Frename_file): Callers changed.
* buffer.c (Fkill_buffer):
* callproc.c (delete_temp_file): Callers changed (Bug#6070).
* lisp.h: Update prototypes.
* diff.el (diff-sentinel):
* epg.el (epg--make-temp-file, epg-decrypt-string)
(epg-verify-string, epg-sign-string, epg-encrypt-string):
* jka-compr.el (jka-compr-partial-uncompress)
(jka-compr-call-process, jka-compr-write-region, jka-compr-load):
* server.el (server-sentinel): Use delete-file's new FORCE arg
(Bug#6070).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Mon, 03 May 2010 11:01:21 -0400 |
parents | b67d7273ec18 |
children | 511da81b16c5 |
comparison
equal
deleted
inserted
replaced
108222:ca0eca33fb40 | 108223:261591829d04 |
---|---|
62 | 62 |
63 (defun diff-sentinel (code) | 63 (defun diff-sentinel (code) |
64 "Code run when the diff process exits. | 64 "Code run when the diff process exits. |
65 CODE is the exit code of the process. It should be 0 only if no diffs | 65 CODE is the exit code of the process. It should be 0 only if no diffs |
66 were found." | 66 were found." |
67 (let (delete-by-moving-to-trash) | 67 (if diff-old-temp-file (delete-file diff-old-temp-file t)) |
68 (if diff-old-temp-file (delete-file diff-old-temp-file)) | 68 (if diff-new-temp-file (delete-file diff-new-temp-file t)) |
69 (if diff-new-temp-file (delete-file diff-new-temp-file))) | |
70 (save-excursion | 69 (save-excursion |
71 (goto-char (point-max)) | 70 (goto-char (point-max)) |
72 (let ((inhibit-read-only t)) | 71 (let ((inhibit-read-only t)) |
73 (insert (format "\nDiff finished%s. %s\n" | 72 (insert (format "\nDiff finished%s. %s\n" |
74 (cond ((equal 0 code) " (no differences)") | 73 (cond ((equal 0 code) " (no differences)") |