X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/0896d93184a719bc994a3e699de27190aac0acb1..9565d1e6f3d09d5cd5afebd1b30a7571a27199cc:/lisp/url/url.el diff --git a/lisp/url/url.el b/lisp/url/url.el index 3b292b4452..9f47e10404 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, 2007 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008, 2009, 2010 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 3, 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,16 +44,15 @@ (require 'url-parse) (require 'url-util) -;; Fixme: customize? convert-standard-filename? -(defvar url-configuration-directory - (cond - ((file-directory-p "~/.url") "~/.url") - ((file-directory-p user-emacs-directory) - (concat user-emacs-directory "url")) - (t "~/.url"))) + +(defcustom url-configuration-directory + (locate-user-emacs-file "url/" ".url/") + "Directory used by the URL package for cookies, history, etc." + :type 'directory + :group 'url) (defun url-do-setup () - "Setup the url package. + "Setup the URL package. This is to avoid conflict with user settings if URL is dumped with Emacs." (unless url-setup-done @@ -241,7 +238,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.