X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/947612be2c71d2478179694e8dfa538b9e8e07c1..142e26a72e9b8bbbec23c6bf7234e9f2544b5f89:/lisp/url/url.el diff --git a/lisp/url/url.el b/lisp/url/url.el index a95c7e39c0..b219520de4 100644 --- a/lisp/url/url.el +++ b/lisp/url/url.el @@ -1,27 +1,25 @@ ;;; url.el --- Uniform Resource Locator retrieval tool ;; Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, -;; 2005, 2006 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ;; Author: Bill Perry ;; Keywords: comm, data, processes, hypermedia ;; This file is part of GNU Emacs. ;; -;; GNU Emacs is free software; you can redistribute it and/or modify +;; GNU Emacs 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. -;; +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + ;; GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -46,12 +44,16 @@ (require 'url-parse) (require 'url-util) -;; Fixme: customize? convert-standard-filename? -(defvar url-configuration-directory - (cond - ((file-directory-p "~/.url") "~/.url") - ((file-directory-p "~/.emacs.d") "~/.emacs.d/url") - (t "~/.url"))) + +;; FIXME convert-standard-filename? +(defcustom url-configuration-directory + (if (and (file-directory-p user-emacs-directory) + (not (file-directory-p "~/.url"))) + (expand-file-name "url" user-emacs-directory) + "~/.url") + "Directory used by the URL package for cookies, history, etc." + :type 'directory + :group 'url) (defun url-do-setup () "Setup the url package. @@ -240,7 +242,9 @@ no further processing). URL is either a string or a parsed URL." ;; XXX: The callback must always be called. Any ;; exception is a bug that should be fixed, not worked ;; around. - (setq retrieval-done t)) + (progn ;; Call delete-process so we run any sentinel now. + (delete-process proc) + (setq retrieval-done t))) ;; We used to use `sit-for' here, but in some cases it wouldn't ;; work because apparently pending keyboard input would always ;; interrupt it before it got a chance to handle process input.