1 |
;;; url.el --- Uniform Resource Locator retrieval tool |
;;; url.el --- Uniform Resource Locator retrieval tool |
2 |
|
|
3 |
;; Copyright (c) 1996, 1997, 1998, 1999, 2001, 2004, 2005 |
;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, |
4 |
;; Free Software Foundation, Inc. |
;; 2005 Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Bill Perry <wmperry@gnu.org> |
;; Author: Bill Perry <wmperry@gnu.org> |
7 |
;; Keywords: comm, data, processes, hypermedia |
;; Keywords: comm, data, processes, hypermedia |
56 |
(require 'url-parse) |
(require 'url-parse) |
57 |
(require 'url-util) |
(require 'url-util) |
58 |
|
|
59 |
;; Fixme: customize? convert-standard-filename? |
;; Fixme: customize? convert-standard-filename? |
60 |
;;;###autoload |
;;;###autoload |
61 |
(defvar url-configuration-directory "~/.url") |
(defvar url-configuration-directory "~/.url") |
62 |
|
|
71 |
|
|
72 |
(mailcap-parse-mailcaps) |
(mailcap-parse-mailcaps) |
73 |
(mailcap-parse-mimetypes) |
(mailcap-parse-mimetypes) |
74 |
|
|
75 |
;; Register all the authentication schemes we can handle |
;; Register all the authentication schemes we can handle |
76 |
(url-register-auth-scheme "basic" nil 4) |
(url-register-auth-scheme "basic" nil 4) |
77 |
(url-register-auth-scheme "digest" nil 7) |
(url-register-auth-scheme "digest" nil 7) |
79 |
(setq url-cookie-file |
(setq url-cookie-file |
80 |
(or url-cookie-file |
(or url-cookie-file |
81 |
(expand-file-name "cookies" url-configuration-directory))) |
(expand-file-name "cookies" url-configuration-directory))) |
82 |
|
|
83 |
(setq url-history-file |
(setq url-history-file |
84 |
(or url-history-file |
(or url-history-file |
85 |
(expand-file-name "history" url-configuration-directory))) |
(expand-file-name "history" url-configuration-directory))) |
86 |
|
|
87 |
;; Parse the global history file if it exists, so that it can be used |
;; Parse the global history file if it exists, so that it can be used |
88 |
;; for URL completion, etc. |
;; for URL completion, etc. |
89 |
(url-history-parse-history) |
(url-history-parse-history) |
229 |
(message "Viewing externally") |
(message "Viewing externally") |
230 |
(kill-buffer (current-buffer))) |
(kill-buffer (current-buffer))) |
231 |
(display-buffer (current-buffer)) |
(display-buffer (current-buffer)) |
232 |
(add-hook 'kill-buffer-hook |
(add-hook 'kill-buffer-hook |
233 |
`(lambda () (mm-destroy-parts ',handle)) |
`(lambda () (mm-destroy-parts ',handle)) |
234 |
nil |
nil |
235 |
t))))) |
t))))) |