mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-01 11:14:55 +00:00
* lisp/url/url-cache (url-store-in-cache): Make `buff' argument really optional.
This commit is contained in:
parent
639b9d87d2
commit
6f6dc4da1d
@ -1,3 +1,7 @@
|
||||
2010-09-11 Julien Danjou <julien@danjou.info>
|
||||
|
||||
* url-cache (url-store-in-cache): Make `buff' argument really optional.
|
||||
|
||||
2010-09-09 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* url-cookie.el (url-cookie-expired-p): Tweak previous change.
|
||||
|
@ -62,14 +62,11 @@ FILE can be created or overwritten."
|
||||
;;;###autoload
|
||||
(defun url-store-in-cache (&optional buff)
|
||||
"Store buffer BUFF in the cache."
|
||||
(if (not (and buff (get-buffer buff)))
|
||||
nil
|
||||
(save-current-buffer
|
||||
(and buff (set-buffer buff))
|
||||
(let* ((fname (url-cache-create-filename (url-view-url t))))
|
||||
(if (url-cache-prepare fname)
|
||||
(let ((coding-system-for-write 'binary))
|
||||
(write-region (point-min) (point-max) fname nil 5)))))))
|
||||
(with-current-buffer (get-buffer (or buff (current-buffer)))
|
||||
(let ((fname (url-cache-create-filename (url-view-url t))))
|
||||
(if (url-cache-prepare fname)
|
||||
(let ((coding-system-for-write 'binary))
|
||||
(write-region (point-min) (point-max) fname nil 5))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun url-is-cached (url)
|
||||
|
Loading…
Reference in New Issue
Block a user