aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/browse-url.el24
1 files changed, 15 insertions, 9 deletions
diff --git a/lisp/browse-url.el b/lisp/browse-url.el
index c81354e2c4e..33259b621fc 100644
--- a/lisp/browse-url.el
+++ b/lisp/browse-url.el
@@ -94,7 +94,8 @@
94;; <URL:http://lynx.browser.org/>. 94;; <URL:http://lynx.browser.org/>.
95 95
96;; Free graphical browsers that could be used by `browse-url-generic' 96;; Free graphical browsers that could be used by `browse-url-generic'
97;; include Chimera <URL:ftp://ftp.cs.unlv.edu/pub/chimera>, Arena 97;; include Chimera <URL:ftp://ftp.cs.unlv.edu/pub/chimera> and
98;; <URL:http://www.unlv.edu/chimera/>, Arena
98;; <URL:ftp://ftp.yggdrasil.com/pub/dist/web/arena>, Amaya 99;; <URL:ftp://ftp.yggdrasil.com/pub/dist/web/arena>, Amaya
99;; <URL:ftp://ftp.w3.org/pub/amaya>, mMosaic 100;; <URL:ftp://ftp.w3.org/pub/amaya>, mMosaic
100;; <URL:ftp://sig.enst.fr/pub/multicast/mMosaic/> (the latter with 101;; <URL:ftp://sig.enst.fr/pub/multicast/mMosaic/> (the latter with
@@ -261,7 +262,7 @@ Netscape version 1.1N or later or XMosaic version 2.5 or later."
261 262
262(defcustom browse-url-netscape-display nil 263(defcustom browse-url-netscape-display nil
263 "*The X display on which Netscape is running if different from 264 "*The X display on which Netscape is running if different from
264 Emacs's display." 265Emacs's display."
265 :type 'string 266 :type 'string
266 :group 'browse-url) 267 :group 'browse-url)
267 268
@@ -373,6 +374,14 @@ These might set the port, for instance."
373 :type '(repeat (string :tag "Argument")) 374 :type '(repeat (string :tag "Argument"))
374 :group 'browse-url) 375 :group 'browse-url)
375 376
377(defcustom browse-url-temp-dir
378 (or (getenv "TMPDIR") "/tmp")
379 "*The name of a directory in which to store temporary files
380generated by functions like `browse-url-of-region'. You might want to
381set this to somewhere with restricted read permissions for privacy's sake."
382 :type 'string
383 :group 'browse-url)
384
376(defvar browse-url-temp-file-list '()) 385(defvar browse-url-temp-file-list '())
377 386
378;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 387;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -389,7 +398,7 @@ These might set the port, for instance."
389 398
390(defun browse-url-interactive-arg (prompt) 399(defun browse-url-interactive-arg (prompt)
391 "Read a URL from the minibuffer, prompting with PROMPT. 400 "Read a URL from the minibuffer, prompting with PROMPT.
392Default to the URL at or before point. If invoke with a mouse button, 401Default to the URL at or before point. If invoked with a mouse button,
393set point to the position clicked first. Return a list for use in 402set point to the position clicked first. Return a list for use in
394`interactive' containing the URL and `browse-url-new-window-p' or its 403`interactive' containing the URL and `browse-url-new-window-p' or its
395negation if a prefix argument was given." 404negation if a prefix argument was given."
@@ -468,12 +477,9 @@ narrowed."
468 (progn 477 (progn
469 (or browse-url-temp-file-name 478 (or browse-url-temp-file-name
470 (setq browse-url-temp-file-name 479 (setq browse-url-temp-file-name
471 (make-temp-name 480 (convert-standard-filename
472 (expand-file-name (buffer-name) 481 (make-temp-name
473 (or (getenv "TMPDIR") "/tmp"))) 482 (expand-file-name "burl" browse-url-temp-dir)))))
474 browse-url-temp-file-list
475 (cons browse-url-temp-file-name
476 browse-url-temp-file-list)))
477 (setq file-name browse-url-temp-file-name) 483 (setq file-name browse-url-temp-file-name)
478 (write-region (point-min) (point-max) file-name nil 'no-message))) 484 (write-region (point-min) (point-max) file-name nil 'no-message)))
479 (browse-url-of-file file-name)))) 485 (browse-url-of-file file-name))))