Mercurial > emacs
comparison lisp/browse-url.el @ 19579:bbb59d8bca28
Change the custom group to `hypermedia'.
(browse-url-netscape-version): New variable.
(browse-url-netscape-reload): Use it to account for reported
backwards incompatibility.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 27 Aug 1997 18:43:39 +0000 |
parents | 39815ec1b9f8 |
children | 5c7badcafb2b |
comparison
equal
deleted
inserted
replaced
19578:53f502cfd081 | 19579:bbb59d8bca28 |
---|---|
216 ;; Variables | 216 ;; Variables |
217 | 217 |
218 ;;;###autoload | 218 ;;;###autoload |
219 (defgroup browse-url nil | 219 (defgroup browse-url nil |
220 "Use a web browser to look at a URL." | 220 "Use a web browser to look at a URL." |
221 :group 'applications) | 221 :group 'hypermedia) |
222 | 222 |
223 ;;;###autoload | 223 ;;;###autoload |
224 (defcustom browse-url-browser-function | 224 (defcustom browse-url-browser-function |
225 'browse-url-netscape | 225 'browse-url-netscape |
226 "*Function to display the current buffer in a WWW browser. | 226 "*Function to display the current buffer in a WWW browser. |
377 (or (getenv "TMPDIR") "/tmp") | 377 (or (getenv "TMPDIR") "/tmp") |
378 "*The name of a directory in which to store temporary files | 378 "*The name of a directory in which to store temporary files |
379 generated by functions like `browse-url-of-region'. You might want to | 379 generated by functions like `browse-url-of-region'. You might want to |
380 set this to somewhere with restricted read permissions for privacy's sake." | 380 set this to somewhere with restricted read permissions for privacy's sake." |
381 :type 'string | 381 :type 'string |
382 :group 'browse-url) | |
383 | |
384 (defcustom browse-url-netscape-version | |
385 3 | |
386 "*The version of Netscape you are using. | |
387 This affects how URL reloading is done; the mechanism changed | |
388 incompatibly at version 4." | |
389 :type 'number | |
382 :group 'browse-url) | 390 :group 'browse-url) |
383 | 391 |
384 (defvar browse-url-temp-file-list '()) | 392 (defvar browse-url-temp-file-list '()) |
385 | 393 |
386 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 394 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
658 (append browse-url-netscape-startup-arguments (list url)))))) | 666 (append browse-url-netscape-startup-arguments (list url)))))) |
659 | 667 |
660 (defun browse-url-netscape-reload () | 668 (defun browse-url-netscape-reload () |
661 "Ask Netscape to reload its current document." | 669 "Ask Netscape to reload its current document." |
662 (interactive) | 670 (interactive) |
663 (browse-url-netscape-send "reload")) | 671 ;; Backwards incompatibility reported by |
672 ;; <peter.kruse@psychologie.uni-regensburg.de>. | |
673 (browse-url-netscape-send (if (>= browse-url-netscape-version 4) | |
674 "xfeDoCommand(reload)" | |
675 "reload"))) | |
664 | 676 |
665 (defun browse-url-netscape-send (command) | 677 (defun browse-url-netscape-send (command) |
666 "Send a remote control command to Netscape." | 678 "Send a remote control command to Netscape." |
667 (let* ((process-environment (browse-url-process-environment))) | 679 (let* ((process-environment (browse-url-process-environment))) |
668 (apply 'start-process "netscape" nil | 680 (apply 'start-process "netscape" nil |