1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-04 11:40:22 +00:00

(url-file-create-wrapper): Use new backquote syntax.

(url-file-file-attributes): Add id-format parameter.
This commit is contained in:
Stefan Monnier 2004-04-16 21:59:12 +00:00
parent f1bfaf653b
commit ca000afff9

View File

@ -220,14 +220,14 @@ to them."
buffer))
(defmacro url-file-create-wrapper (method args)
(` (defalias (quote (, (intern (format "url-ftp-%s" method))))
(defun (, (intern (format "url-file-%s" method))) (, args)
(, (format "FTP/FILE URL wrapper around `%s' call." method))
(setq url (url-file-build-filename url))
(and url ((, method) (,@ (remove '&rest (remove '&optional args)))))))))
`(defalias ',(intern (format "url-ftp-%s" method))
(defun ,(intern (format "url-file-%s" method)) ,args
,(format "FTP/FILE URL wrapper around `%s' call." method)
(setq url (url-file-build-filename url))
(and url (,method ,@(remove '&rest (remove '&optional args)))))))
(url-file-create-wrapper file-exists-p (url))
(url-file-create-wrapper file-attributes (url))
(url-file-create-wrapper file-attributes (url &optional id-format))
(url-file-create-wrapper file-symlink-p (url))
(url-file-create-wrapper file-readable-p (url))
(url-file-create-wrapper file-writable-p (url))