emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/net/browse-url.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/net/browse-url.el
Date: Sat, 12 Apr 2003 18:21:19 -0400

Index: emacs/lisp/net/browse-url.el
diff -c emacs/lisp/net/browse-url.el:1.27 emacs/lisp/net/browse-url.el:1.28
*** emacs/lisp/net/browse-url.el:1.27   Fri Jan 31 10:20:36 2003
--- emacs/lisp/net/browse-url.el        Sat Apr 12 18:21:18 2003
***************
*** 50,55 ****
--- 50,56 ----
  ;; 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)
  
***************
*** 227,235 ****
  
  ;;;###autoload
  (defcustom browse-url-browser-function
!   (if (memq system-type '(windows-nt ms-dos cygwin))
!       'browse-url-default-windows-browser
!     '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.
--- 228,238 ----
  
  ;;;###autoload
  (defcustom browse-url-browser-function
!   (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.
***************
*** 260,265 ****
--- 263,270 ----
                         :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"
***************
*** 294,300 ****
    :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))
--- 299,304 ----
***************
*** 317,323 ****
    :type '(repeat (string :tag "Argument"))
    :group 'browse-url)
  
- ;;;###autoload
  (defcustom browse-url-galeon-program "galeon"
    "*The name by which to invoke Galeon."
    :type 'string
--- 321,326 ----
***************
*** 349,355 ****
    :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
--- 352,357 ----
***************
*** 408,414 ****
    :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."
--- 410,415 ----
***************
*** 424,438 ****
    :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
--- 425,430 ----
***************
*** 484,490 ****
    :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))
--- 476,481 ----
***************
*** 731,736 ****
--- 722,731 ----
        (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 ()
***************
*** 770,776 ****
  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-mozilla-program) 'browse-url-mozilla)
       ((executable-find browse-url-galeon-program) 'browse-url-galeon)
       ((executable-find browse-url-kde-program) 'browse-url-kde)
--- 765,771 ----
  Mosaic, IXI Mosaic, Lynx in an xterm, MMM, Konqueror, and then W3."
    (apply
      (cond
!      ((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)
***************
*** 952,958 ****
               (append browse-url-galeon-startup-arguments (list 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."
    :version "21.1"
--- 947,953 ----
               (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"
***************
*** 975,981 ****
    (interactive (browse-url-interactive-arg "URL: "))
    (apply 'start-process (concat "gnome-moz-remote " url)
         nil
!        "gnome-moz-remote"
         (append
          browse-url-gnome-moz-arguments
          (if (browse-url-maybe-new-window new-window)
--- 970,976 ----
    (interactive (browse-url-interactive-arg "URL: "))
    (apply 'start-process (concat "gnome-moz-remote " url)
         nil
!        browse-url-gnome-moz-program
         (append
          browse-url-gnome-moz-arguments
          (if (browse-url-maybe-new-window new-window)
***************
*** 1021,1027 ****
          (kill-buffer nil)
          ;; Send signal SIGUSR to Mosaic
          (message "Signalling Mosaic...")
!         (signal-process pid browse-url-usr1-signal)
          ;; Or you could try:
          ;; (call-process "kill" nil 0 nil "-USR1" (int-to-string pid))
          (message "Signalling Mosaic...done")
--- 1016,1022 ----
          (kill-buffer nil)
          ;; Send signal SIGUSR to Mosaic
          (message "Signalling Mosaic...")
!         (signal-process pid 'SIGUSR1)
          ;; Or you could try:
          ;; (call-process "kill" nil 0 nil "-USR1" (int-to-string pid))
          (message "Signalling Mosaic...done")
***************
*** 1034,1040 ****
  
  ;; --- Grail ---
  
- ;;;###autoload
  (defvar browse-url-grail
    (concat (or (getenv "GRAILDIR") "~/.grail") "/user/rcgrail.py")
    "Location of Grail remote control client script `rcgrail.py'.
--- 1029,1034 ----
***************
*** 1280,1287 ****
  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)))
  
  (provide 'browse-url)
  
--- 1274,1281 ----
  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
!                        (append browse-url-kde-args (list url))))
  
  (provide 'browse-url)
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]