;; browse-url-mmm MMM ?
;; browse-url-generic arbitrary
;; browse-url-default-windows-browser MS-Windows browser
+;; browse-url-default-macosx-browser Mac OS X browser
;; browse-url-gnome-moz GNOME interface to Mozilla
;; browse-url-kde KDE konqueror (kfm)
;;;###autoload
(defcustom browse-url-browser-function
- (if (memq system-type '(windows-nt ms-dos cygwin))
- 'browse-url-default-windows-browser
- 'browse-url-default-browser)
+ (cond
+ ((memq system-type '(windows-nt ms-dos cygwin))
+ 'browse-url-default-windows-browser)
+ ((memq system-type '(darwin)) 'browse-url-default-macosx-browser)
+ (t 'browse-url-default-browser))
"*Function to display the current buffer in a WWW browser.
This is used by the `browse-url-at-point', `browse-url-at-mouse', and
`browse-url-of-file' commands.
:value browse-url-generic)
(function-item :tag "Default Windows browser"
:value browse-url-default-windows-browser)
+ (function-item :tag "Default Mac OS X browser"
+ :value browse-url-default-macosx-browser)
(function-item :tag "GNOME invoking Mozilla"
:value browse-url-gnome-moz)
(function-item :tag "Default browser"
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
-;;;###autoload
(defcustom browse-url-browser-display nil
"*The X display for running the browser, if not same as Emacs'."
:type '(choice string (const :tag "Default" nil))
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
-;;;###autoload
(defcustom browse-url-galeon-program "galeon"
"*The name by which to invoke Galeon."
:type 'string
: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.
Passing an interactive argument to \\[browse-url], or specific browser
:version "20.3"
:group 'browse-url)
-;;;###autoload
(defcustom browse-url-save-file nil
"*If non-nil, save the buffer before displaying its file.
Used by the `browse-url-of-file' command."
:options '(browse-url-netscape-reload)
:group 'browse-url)
-(defvar browse-url-usr1-signal
- (if (and (boundp 'emacs-major-version)
- (or (> emacs-major-version 19) (>= emacs-minor-version 29)))
- 'SIGUSR1 ; Why did I think this was in lower case before?
- 30) ; Check /usr/include/signal.h.
- "The argument to `signal-process' for sending SIGUSR1 to XMosaic.
-Emacs 19.29 accepts 'SIGUSR1, earlier versions require an integer
-which is 30 on SunOS and 16 on HP-UX and Solaris.")
-
(defcustom browse-url-CCI-port 3003
"*Port to access XMosaic via CCI.
This can be any number between 1024 and 65535 but must correspond to
:type '(repeat (string :tag "Argument"))
:group 'browse-url)
-;;;###autoload
(defcustom browse-url-generic-program nil
"*The name of the browser program used by `browse-url-generic'."
:type '(choice string (const :tag "None" nil))
(error "Browsing URLs is not supported on this system"))
(w32-shell-execute "open" url)))
+(defun browse-url-default-macosx-browser (url &optional new-window)
+ (interactive (browse-url-interactive-arg "URL: "))
+ (start-process (concat "open " url) nil "open" url))
+
;; --- Netscape ---
(defun browse-url-process-environment ()
Mosaic, IXI Mosaic, Lynx in an xterm, MMM, Konqueror, and then W3."
(apply
(cond
- ((executable-find "gnome-moz-remote") 'browse-url-gnome-moz)
+ ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz)
((executable-find browse-url-mozilla-program) 'browse-url-mozilla)
((executable-find browse-url-galeon-program) 'browse-url-galeon)
((executable-find browse-url-kde-program) 'browse-url-kde)
(append browse-url-galeon-startup-arguments (list url))))))
;; GNOME means of invoking either Mozilla or Netrape.
-
+(defvar browse-url-gnome-moz-program "gnome-moz-remote")
(defcustom browse-url-gnome-moz-arguments '()
"*A list of strings passed to the GNOME mozilla viewer as arguments."
:version "21.1"
(interactive (browse-url-interactive-arg "URL: "))
(apply 'start-process (concat "gnome-moz-remote " url)
nil
- "gnome-moz-remote"
+ browse-url-gnome-moz-program
(append
browse-url-gnome-moz-arguments
(if (browse-url-maybe-new-window new-window)
(kill-buffer nil)
;; Send signal SIGUSR to Mosaic
(message "Signalling Mosaic...")
- (signal-process pid browse-url-usr1-signal)
+ (signal-process pid 'SIGUSR1)
;; Or you could try:
;; (call-process "kill" nil 0 nil "-USR1" (int-to-string pid))
(message "Signalling Mosaic...done")
;; --- Grail ---
-;;;###autoload
(defvar browse-url-grail
(concat (or (getenv "GRAILDIR") "~/.grail") "/user/rcgrail.py")
"Location of Grail remote control client script `rcgrail.py'.
Default to the URL around or before point."
(interactive (browse-url-interactive-arg "KDE URL: "))
(message "Sending URL to KDE...")
- (apply #'start-process `(,(concat "KDE" url) nil ,browse-url-kde-program
- ,@browse-url-kde-args ,url)))
+ (apply #'start-process (concat "KDE " url) nil browse-url-kde-program
+ (append browse-url-kde-args (list url))))
(provide 'browse-url)