(defcustom browse-url-netscape-program "netscape"
;; Info about netscape-remote from Karl Berry.
- "The name by which to invoke Netscape.
+ "*The name by which to invoke Netscape.
The free program `netscape-remote' from
<URL:http://home.netscape.com/newsref/std/remote.c> is said to start
:group 'browse-url)
(defcustom browse-url-netscape-arguments nil
- "A list of strings to pass to Netscape as arguments."
+ "*A list of strings to pass to Netscape as arguments."
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
(defcustom browse-url-netscape-startup-arguments browse-url-netscape-arguments
- "A list of strings to pass to Netscape when it starts up.
+ "*A list of strings to pass to Netscape when it starts up.
Defaults to the value of `browse-url-netscape-arguments' at the time
`browse-url' is loaded."
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
(defcustom browse-url-mozilla-program "mozilla"
- "The name by which to invoke Mozilla."
+ "*The name by which to invoke Mozilla."
:type 'string
:group 'browse-url)
(defcustom browse-url-mozilla-arguments nil
- "A list of strings to pass to Mozilla as arguments."
+ "*A list of strings to pass to Mozilla as arguments."
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
(defcustom browse-url-mozilla-startup-arguments browse-url-mozilla-arguments
- "A list of strings to pass to Mozilla when it starts up.
+ "*A list of strings to pass to Mozilla when it starts up.
Defaults to the value of `browse-url-mozilla-arguments' at the time
`browse-url' is loaded."
:type '(repeat (string :tag "Argument"))
;;;###autoload
(defcustom browse-url-galeon-program "galeon"
- "The name by which to invoke Galeon."
+ "*The name by which to invoke Galeon."
:type 'string
:group 'browse-url)
(defcustom browse-url-galeon-arguments nil
- "A list of strings to pass to Galeon as arguments."
+ "*A list of strings to pass to Galeon as arguments."
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
(defcustom browse-url-galeon-startup-arguments browse-url-galeon-arguments
- "A list of strings to pass to Galeon when it starts up.
+ "*A list of strings to pass to Galeon when it starts up.
Defaults to the value of `browse-url-galeon-arguments' at the time
`browse-url' is loaded."
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
+(defcustom browse-url-galeon-new-window-is-tab nil
+ "*Whether to open up new windows in a tab or a new window.
+If non-nil, then open the URL in a new tab rather than a new window if
+`browse-url-galeon' is asked to open it in a new window."
+ :type 'boolean
+ :group 'browse-url)
+
;;;###autoload
(defcustom browse-url-new-window-flag nil
"*If non-nil, always open a new browser window with appropriate browsers.
:group 'browse-url)
(defcustom browse-url-mosaic-program "xmosaic"
- "The name by which to invoke Mosaic (or mMosaic)."
+ "*The name by which to invoke Mosaic (or mMosaic)."
:type 'string
:version "20.3"
:group 'browse-url)
(defcustom browse-url-mosaic-arguments nil
- "A list of strings to pass to Mosaic as arguments."
+ "*A list of strings to pass to Mosaic as arguments."
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
+(defcustom browse-url-mosaic-pidfile "~/.mosaicpid"
+ "*The name of the pidfile created by Mosaic."
+ :type 'string
+ :group 'browse-url)
+
(defcustom browse-url-filename-alist
(\` ; Backquote syntax won't work.
(("^/\\(ftp@\\|anonymous@\\)?\\([^:]+\\):/*" . "ftp://\\2/")
'(("^\\([a-zA-Z]:\\)[\\/]" . "file:\\1/")
("^[\\/][\\/]+" . "file://"))))
("^/+" . "file:/")))
- "An alist of (REGEXP . STRING) pairs used by `browse-url-of-file'.
+ "*An alist of (REGEXP . STRING) pairs used by `browse-url-of-file'.
Any substring of a filename matching one of the REGEXPs is replaced by
the corresponding STRING using `replace-match', not treating STRING
literally. All pairs are applied in the order given. The default
:group 'browse-url)
(defcustom browse-url-of-file-hook nil
- "Run after `browse-url-of-file' has asked a browser to load a file.
+ "*Run after `browse-url-of-file' has asked a browser to load a file.
Set this to `browse-url-netscape-reload' to force Netscape to load the
file rather than displaying a cached copy."
which is 30 on SunOS and 16 on HP-UX and Solaris.")
(defcustom browse-url-CCI-port 3003
- "Port to access XMosaic via CCI.
+ "*Port to access XMosaic via CCI.
This can be any number between 1024 and 65535 but must correspond to
the value set in the browser."
:type 'integer
(make-variable-buffer-local 'browse-url-temp-file-name)
(defcustom browse-url-xterm-program "xterm"
- "The name of the terminal emulator used by `browse-url-lynx-xterm'.
+ "*The name of the terminal emulator used by `browse-url-lynx-xterm'.
This might, for instance, be a separate colour version of xterm."
:type 'string
:group 'browse-url)
(defcustom browse-url-lynx-emacs-args (and (not window-system)
'("-show_cursor"))
- "A list of strings defining options for Lynx in an Emacs buffer.
+ "*A list of strings defining options for Lynx in an Emacs buffer.
The default is none in a window system, otherwise `-show_cursor' to
indicate the position of the current link in the absence of
:group 'browse-url)
(defcustom browse-url-gnudoit-program "gnudoit"
- "The name of the `gnudoit' program used by `browse-url-w3-gnudoit'."
+ "*The name of the `gnudoit' program used by `browse-url-w3-gnudoit'."
:type 'string
:group 'browse-url)
:group 'browse-url)
(defcustom browse-url-temp-dir temporary-file-directory
- "The name of a directory for browse-url's temporary files.
+ "*The name of a directory for browse-url's temporary files.
Such files are generated by functions like `browse-url-of-region'.
You might want to set this to somewhere with restricted read permissions
for privacy's sake."
(defcustom browse-url-netscape-version
3
- "The version of Netscape you are using.
+ "*The version of Netscape you are using.
This affects how URL reloading is done; the mechanism changed
incompatibly at version 4."
:type 'number
:version "20.3"
:group 'browse-url)
-(defvar browse-url-lynx-input-attempts 10
- "*How many times to try to move down from a series of lynx input fields.")
+(defcustom browse-url-lynx-input-attempts 10
+ "*How many times to try to move down from a series of lynx input fields."
+ :type 'integer
+ :group 'browse-url)
(defcustom browse-url-lynx-input-delay 0.2
- "How many seconds to wait for lynx between moves down from an input field.")
+ "*How many seconds to wait for lynx between moves down from an input field."
+ :type 'number
+ :group 'browse-url)
(defcustom browse-url-kde-program "kfmclient"
- "The name by which to invoke the KDE web browser."
+ "*The name by which to invoke the KDE web browser."
:type 'string
:version "21.1"
:group 'browse-url)
;; interactive-p needs to be called at a function's top-level, hence
;; the macro.
(defmacro browse-url-maybe-new-window (arg)
- `(if (interactive-p)
+ `(if (not (interactive-p))
,arg
browse-url-new-window-flag))
(interactive "e")
(save-excursion
(mouse-set-point event)
- (browse-url-at-point browse-url-new-window-flag)))
+ ;; This handles browse-url-new-window-flag properly
+ ;; when it gets no arg.
+ (browse-url-at-point)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Browser-specific commands
random existing one. A non-nil interactive prefix argument reverses
the effect of `browse-url-new-window-flag'.
+If `browse-url-galeon-new-window-is-tab' is non-nil, then whenever a
+document would otherwise be loaded in a new window, it is loaded in a
+new tab in an existing window instead.
+
When called non-interactively, optional second argument NEW-WINDOW is
used instead of `browse-url-new-window-flag'."
(interactive (browse-url-interactive-arg "URL: "))
browse-url-galeon-program
(append
browse-url-galeon-arguments
- (if new-window '("-w" "--noraise"))
- (list "-x" url)))))
+ (if (browse-url-maybe-new-window new-window)
+ (if browse-url-galeon-new-window-is-tab
+ '("--new-tab")
+ '("--new-window" "--noraise"))
+ '("--existing"))
+ (list url)))))
(set-process-sentinel process
`(lambda (process change)
(browse-url-galeon-sentinel process ,url)))))
;; GNOME means of invoking either Mozilla or Netrape.
(defcustom browse-url-gnome-moz-arguments '()
- "A list of strings passed to the GNOME mozilla viewer as arguments."
+ "*A list of strings passed to the GNOME mozilla viewer as arguments."
:version "21.1"
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
When called non-interactively, optional second argument NEW-WINDOW is
used instead of `browse-url-new-window-flag'."
(interactive (browse-url-interactive-arg "Mosaic URL: "))
- (let ((pidfile (expand-file-name "~/.mosaicpid"))
+ (let ((pidfile (expand-file-name browse-url-mosaic-pidfile))
pid)
(if (file-readable-p pidfile)
(save-excursion
(set-buffer (get-buffer-create " *Shell Command Output*"))
(erase-buffer)
;; don't worry about this failing.
- (if new-window
+ (if (browse-url-maybe-new-window new-window)
(call-process browse-url-grail nil 0 nil "-b" url)
(call-process browse-url-grail nil 0 nil url))
(message "Sending URL to Grail... done")))