comparison lisp/browse-url.el @ 22425:b235f1b173f3

Don't require dired when compiling. (browse-url-lynx-input-delay, browse-url-lynx-input-attempts): Remove customization. (browse-url-grail): Respect new-window arg (Barry Warsaw).
author Dave Love <fx@gnu.org>
date Wed, 10 Jun 1998 19:00:39 +0000
parents 67273fd206b7
children f189183483a2
comparison
equal deleted inserted replaced
22424:d8368e1df721 22425:b235f1b173f3
215 ;;; Code: 215 ;;; Code:
216 216
217 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 217 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
218 ;; Variables 218 ;; Variables
219 219
220 (eval-when-compile (require 'dired) 220 (eval-when-compile (require 'thingatpt)
221 (require 'thingatpt)
222 (require 'term)) 221 (require 'term))
223 222
224 (defgroup browse-url nil 223 (defgroup browse-url nil
225 "Use a web browser to look at a URL." 224 "Use a web browser to look at a URL."
226 :prefix "browse-url-" 225 :prefix "browse-url-"
454 (const :tag "Disregard" :value nil) 453 (const :tag "Disregard" :value nil)
455 (const :tag "Warn, don't emit URL" :value warn)) 454 (const :tag "Warn, don't emit URL" :value warn))
456 :version "20.3" 455 :version "20.3"
457 :group 'browse-url) 456 :group 'browse-url)
458 457
459 (defcustom browse-url-lynx-input-attempts 10 458 (defvar browse-url-lynx-input-attempts 10
460 "*How many times to try to move down from a series of lynx input fields." 459 "*How many times to try to move down from a series of lynx input fields.")
461 :version "20.3"
462 :type 'integer
463 :group 'browse-url)
464 460
465 (defcustom browse-url-lynx-input-delay 0.2 461 (defcustom browse-url-lynx-input-delay 0.2
466 "How many seconds to wait for lynx between moves down from an input field." 462 "How many seconds to wait for lynx between moves down from an input field.")
467 :version "20.3"
468 :type 'number
469 :group 'browse-url)
470 463
471 (defvar browse-url-temp-file-list '()) 464 (defvar browse-url-temp-file-list '())
472 465
473 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 466 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
474 ;; URL input 467 ;; URL input
767 760
768 When called non-interactively, optional second argument NEW-WINDOW is 761 When called non-interactively, optional second argument NEW-WINDOW is
769 used instead of `browse-url-new-window-p'." 762 used instead of `browse-url-new-window-p'."
770 (interactive (browse-url-interactive-arg "Mosaic URL: ")) 763 (interactive (browse-url-interactive-arg "Mosaic URL: "))
771 (let ((pidfile (expand-file-name "~/.mosaicpid")) 764 (let ((pidfile (expand-file-name "~/.mosaicpid"))
772 pid pidbuf) 765 pid)
773 (if (file-readable-p pidfile) 766 (if (file-readable-p pidfile)
774 (save-excursion 767 (save-excursion
775 (find-file pidfile) 768 (find-file pidfile)
776 (goto-char (point-min)) 769 (goto-char (point-min))
777 (setq pid (read (current-buffer))) 770 (setq pid (read (current-buffer)))
816 (message "Sending URL to Grail...") 809 (message "Sending URL to Grail...")
817 (save-excursion 810 (save-excursion
818 (set-buffer (get-buffer-create " *Shell Command Output*")) 811 (set-buffer (get-buffer-create " *Shell Command Output*"))
819 (erase-buffer) 812 (erase-buffer)
820 ;; don't worry about this failing. 813 ;; don't worry about this failing.
821 (call-process browse-url-grail nil 0 nil url) 814 (if new-window
815 (call-process browse-url-grail nil 0 nil "-b" url)
816 (call-process browse-url-grail nil 0 nil url))
822 (message "Sending URL to Grail... done"))) 817 (message "Sending URL to Grail... done")))
823 818
824 ;; --- Mosaic using CCI --- 819 ;; --- Mosaic using CCI ---
825 820
821 ;;;###autoload
826 (defun browse-url-cci (url &optional new-window) 822 (defun browse-url-cci (url &optional new-window)
827 "Ask the XMosaic WWW browser to load URL. 823 "Ask the XMosaic WWW browser to load URL.
828 Default to the URL around or before point. 824 Default to the URL around or before point.
829 825
830 This function only works for XMosaic version 2.5 or later. You must 826 This function only works for XMosaic version 2.5 or later. You must