# HG changeset patch # User Richard M. Stallman # Date 872097762 0 # Node ID 5b3f4890f7576e6173e5624945f18feba13f471c # Parent 2e2b54ae9b9ddeb6263741be9c2e4f50bafc8b77 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. diff -r 2e2b54ae9b9d -r 5b3f4890f757 lisp/browse-url.el --- a/lisp/browse-url.el Wed Aug 20 16:31:20 1997 +0000 +++ b/lisp/browse-url.el Wed Aug 20 17:22:42 1997 +0000 @@ -94,7 +94,8 @@ ;; . ;; Free graphical browsers that could be used by `browse-url-generic' -;; include Chimera , Arena +;; include Chimera and +;; , Arena ;; , Amaya ;; , mMosaic ;; (the latter with @@ -261,7 +262,7 @@ (defcustom browse-url-netscape-display nil "*The X display on which Netscape is running if different from - Emacs's display." +Emacs's display." :type 'string :group 'browse-url) @@ -373,6 +374,14 @@ :type '(repeat (string :tag "Argument")) :group 'browse-url) +(defcustom browse-url-temp-dir + (or (getenv "TMPDIR") "/tmp") + "*The name of a directory in which to store temporary files +generated by functions like `browse-url-of-region'. You might want to +set this to somewhere with restricted read permissions for privacy's sake." + :type 'string + :group 'browse-url) + (defvar browse-url-temp-file-list '()) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -389,7 +398,7 @@ (defun browse-url-interactive-arg (prompt) "Read a URL from the minibuffer, prompting with PROMPT. -Default to the URL at or before point. If invoke with a mouse button, +Default to the URL at or before point. If invoked with a mouse button, set point to the position clicked first. Return a list for use in `interactive' containing the URL and `browse-url-new-window-p' or its negation if a prefix argument was given." @@ -468,12 +477,9 @@ (progn (or browse-url-temp-file-name (setq browse-url-temp-file-name - (make-temp-name - (expand-file-name (buffer-name) - (or (getenv "TMPDIR") "/tmp"))) - browse-url-temp-file-list - (cons browse-url-temp-file-name - browse-url-temp-file-list))) + (convert-standard-filename + (make-temp-name + (expand-file-name "burl" browse-url-temp-dir))))) (setq file-name browse-url-temp-file-name) (write-region (point-min) (point-max) file-name nil 'no-message))) (browse-url-of-file file-name))))