diff --git a/emacs/ps-ccrypt.el b/emacs/ps-ccrypt.el index 819a3ae..aa060e0 100644 --- a/emacs/ps-ccrypt.el +++ b/emacs/ps-ccrypt.el @@ -513,9 +513,10 @@ There should be no more than seven characters after the final `/'." (error nil))) -(defun ps-ccrypt-write-region (start end file &optional append visit) +(defun ps-ccrypt-write-region (start end file &optional append visit lockname mustbenew) (let* ((filename (expand-file-name file)) (visit-file (if (stringp visit) (expand-file-name visit) filename)) + (lock-file (if (stringp lockname) (expand-file-name lockname) nil)) (info (ps-ccrypt-get-encryption-info visit-file))) (if info @@ -575,7 +576,7 @@ There should be no more than seven characters after the final `/'." (ps-ccrypt-run-real-handler 'write-region (list (point-min) (point-max) filename - (and append can-append) 'dont)) + (and append can-append) 'dont lock-file mustbenew)) (erase-buffer)) ) (ps-ccrypt-delete-temp-file temp-file) @@ -602,7 +603,7 @@ There should be no more than seven characters after the final `/'." nil) (ps-ccrypt-run-real-handler 'write-region - (list start end filename append visit))))) + (list start end filename append visit lock-file mustbenew))))) (defun ps-ccrypt-insert-file-contents (file &optional visit beg end replace)