This repository has been archived by the owner on Feb 5, 2024. It is now read-only.
forked from emacsattic/wget
-
Notifications
You must be signed in to change notification settings - Fork 1
/
w3-wget.el
44 lines (33 loc) · 1.67 KB
/
w3-wget.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
;;; w3-wget.el --- Interface program of wget on emacs-w3.
;; Copyright (C) 2002, 2004 Masayuki Ataka <[email protected]>
;; $Id: w3-wget.el,v 1.9 2004/10/08 11:04:02 ataka Exp $
;; Authors: Masayuki Ataka <[email protected]>
;; Keywords: w3, WWW, hypermedia
;; This file is a part of emacs-wget.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, you can either send email to this
;; program's maintainer or write to: The Free Software Foundation,
;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
;;; Code:
(autoload 'wget-api "wget" "Application Program Interface for wget")
(defun w3-wget (arg)
"Downlod anchor, image, or current page.
With prefix argument ARG, you can change uri and wget options."
(interactive "P")
(let ((current-uri (if (fboundp 'url-recreate-url)
(url-recreate-url (if (boundp 'url-current-object) url-current-object))
(error "Function url-recreate-url is not available")))
(uri (if (fboundp 'w3-view-this-url)
(w3-view-this-url t)
(error "Function w3-view-this-url is not available"))))
(wget-api uri current-uri arg)))
(provide 'w3-wget)
;;; w3-wget.el ends here