diff options
| author | Richard M. Stallman | 1997-08-20 17:22:42 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-20 17:22:42 +0000 |
| commit | bc6d0d715c4cde7a8ac99b2fc99fb6484f43b1fe (patch) | |
| tree | 959f1979ce148653e0451177faaf486003cc8b58 | |
| parent | a03eaf1c044d56d10fc36425e95bb683791a622a (diff) | |
| download | emacs-bc6d0d715c4cde7a8ac99b2fc99fb6484f43b1fe.tar.gz emacs-bc6d0d715c4cde7a8ac99b2fc99fb6484f43b1fe.zip | |
Minor doc fixes.
(browse-url-temp-dir): New variable.
(browse-url-of-buffer): Use browse-url-temp-dir. Don't construct
a temporary file name which includes an arbitrary buffer name to
avoid losing on non-unixy systems.
| -rw-r--r-- | lisp/browse-url.el | 24 |
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." | 265 | Emacs'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 | ||
| 380 | generated by functions like `browse-url-of-region'. You might want to | ||
| 381 | set 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. |
| 392 | Default to the URL at or before point. If invoke with a mouse button, | 401 | Default to the URL at or before point. If invoked with a mouse button, |
| 393 | set point to the position clicked first. Return a list for use in | 402 | set 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 |
| 395 | negation if a prefix argument was given." | 404 | negation 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)))) |