mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-17 08:10:36 +01:00
- changed function name: 'temporary-filename' to 'temporary-file'.
This commit is contained in:
parent
080c954d54
commit
a683c2aecd
@ -248,7 +248,7 @@
|
||||
(text-utils:strcat home *directory-sep*)
|
||||
home)))
|
||||
|
||||
(defun temporary-filename (&optional (temp-directory nil))
|
||||
(defun temporary-file (&optional (temp-directory nil))
|
||||
(let ((tmpdir (or temp-directory
|
||||
(os-utils:default-temp-dir))))
|
||||
(multiple-value-bind (x filename)
|
||||
@ -261,11 +261,12 @@
|
||||
filename)))
|
||||
|
||||
(defmacro with-anaphoric-temp-file ((stream &key (prefix nil) (unlink nil)) &body body)
|
||||
`(let ((temp-file (temporary-filename ,prefix))) ; anaphora
|
||||
`(let ((temp-file (temporary-file ,prefix))) ; anaphora
|
||||
(unwind-protect
|
||||
(with-open-file (,stream temp-file
|
||||
:element-type '(unsigned-byte 8)
|
||||
:direction :output
|
||||
:if-exists :error
|
||||
:if-exists :supersede
|
||||
:if-does-not-exist :create)
|
||||
,@body)
|
||||
,(if unlink
|
||||
|
@ -98,7 +98,8 @@
|
||||
(gemini-client:gemini-protocol-error (e)
|
||||
(ui:error-message (format nil "~a" e)))
|
||||
(error (e)
|
||||
(ui:error-message (format nil
|
||||
(_ "Error getting ~s: ~a")
|
||||
url
|
||||
e))))))))
|
||||
(ui:notify (format nil
|
||||
(_ "Error getting ~s: ~a")
|
||||
url
|
||||
e)
|
||||
:as-error t)))))))
|
||||
|
@ -281,7 +281,7 @@
|
||||
:delete-file-if-exists
|
||||
:file-hash
|
||||
:home-dir
|
||||
:temporary-filename
|
||||
:temporary-file
|
||||
:with-anaphoric-temp-file
|
||||
:temp-file
|
||||
:file-can-write-p
|
||||
|
@ -761,7 +761,7 @@ Force the checking for new message in the thread the selected message belong."
|
||||
(reply-to sending-message:reply-to)
|
||||
(visibility sending-message:visibility))
|
||||
(sending-message:message-data specials:*send-message-window*)
|
||||
(let ((temp-file (fs:temporary-filename)))
|
||||
(let ((temp-file (fs:temporary-file)))
|
||||
(with-open-file (stream temp-file
|
||||
:direction :output
|
||||
:if-exists :supersede
|
||||
@ -835,7 +835,7 @@ Force the checking for new message in the thread the selected message belong."
|
||||
(loop for line in quoted-lines do
|
||||
(format stream "~a~%" line))))))
|
||||
(add-body ()
|
||||
(let ((temp-file (fs:temporary-filename))
|
||||
(let ((temp-file (fs:temporary-file))
|
||||
(reference-open-file (get-universal-time)))
|
||||
(prepare-reply-body temp-file)
|
||||
(croatoan:end-screen)
|
||||
|
Loading…
x
Reference in New Issue
Block a user