/[emacs]/emacs/lisp/net/browse-url.el
ViewVC logotype

Diff of /emacs/lisp/net/browse-url.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27 by lektu, Fri Jan 31 15:20:36 2003 UTC revision 1.28 by monnier, Sat Apr 12 22:21:18 2003 UTC
# Line 50  Line 50 
50  ;; browse-url-mmm                     MMM         ?  ;; browse-url-mmm                     MMM         ?
51  ;; browse-url-generic                 arbitrary  ;; browse-url-generic                 arbitrary
52  ;; browse-url-default-windows-browser MS-Windows browser  ;; browse-url-default-windows-browser MS-Windows browser
53    ;; browse-url-default-macosx-browser  Mac OS X browser
54  ;; browse-url-gnome-moz               GNOME interface to Mozilla  ;; browse-url-gnome-moz               GNOME interface to Mozilla
55  ;; browse-url-kde                     KDE konqueror (kfm)  ;; browse-url-kde                     KDE konqueror (kfm)
56    
# Line 227  Line 228 
228    
229  ;;;###autoload  ;;;###autoload
230  (defcustom browse-url-browser-function  (defcustom browse-url-browser-function
231    (if (memq system-type '(windows-nt ms-dos cygwin))    (cond
232        'browse-url-default-windows-browser     ((memq system-type '(windows-nt ms-dos cygwin))
233      'browse-url-default-browser)      'browse-url-default-windows-browser)
234       ((memq system-type '(darwin)) 'browse-url-default-macosx-browser)
235       (t 'browse-url-default-browser))
236    "*Function to display the current buffer in a WWW browser.    "*Function to display the current buffer in a WWW browser.
237  This is used by the `browse-url-at-point', `browse-url-at-mouse', and  This is used by the `browse-url-at-point', `browse-url-at-mouse', and
238  `browse-url-of-file' commands.  `browse-url-of-file' commands.
# Line 260  regexp should probably be \".\" to speci Line 263  regexp should probably be \".\" to speci
263                           :value browse-url-generic)                           :value browse-url-generic)
264            (function-item :tag "Default Windows browser"            (function-item :tag "Default Windows browser"
265                           :value browse-url-default-windows-browser)                           :value browse-url-default-windows-browser)
266              (function-item :tag "Default Mac OS X browser"
267                             :value browse-url-default-macosx-browser)
268            (function-item :tag "GNOME invoking Mozilla"            (function-item :tag "GNOME invoking Mozilla"
269                           :value browse-url-gnome-moz)                           :value browse-url-gnome-moz)
270            (function-item :tag "Default browser"            (function-item :tag "Default browser"
# Line 294  Defaults to the value of `browse-url-net Line 299  Defaults to the value of `browse-url-net
299    :type '(repeat (string :tag "Argument"))    :type '(repeat (string :tag "Argument"))
300    :group 'browse-url)    :group 'browse-url)
301    
 ;;;###autoload  
302  (defcustom browse-url-browser-display nil  (defcustom browse-url-browser-display nil
303    "*The X display for running the browser, if not same as Emacs'."    "*The X display for running the browser, if not same as Emacs'."
304    :type '(choice string (const :tag "Default" nil))    :type '(choice string (const :tag "Default" nil))
# Line 317  Defaults to the value of `browse-url-moz Line 321  Defaults to the value of `browse-url-moz
321    :type '(repeat (string :tag "Argument"))    :type '(repeat (string :tag "Argument"))
322    :group 'browse-url)    :group 'browse-url)
323    
 ;;;###autoload  
324  (defcustom browse-url-galeon-program "galeon"  (defcustom browse-url-galeon-program "galeon"
325    "*The name by which to invoke Galeon."    "*The name by which to invoke Galeon."
326    :type 'string    :type 'string
# Line 349  If non-nil, then open the URL in a new t Line 352  If non-nil, then open the URL in a new t
352    :type 'boolean    :type 'boolean
353    :group 'browse-url)    :group 'browse-url)
354    
 ;;;###autoload  
355  (defcustom browse-url-new-window-flag nil  (defcustom browse-url-new-window-flag nil
356    "*If non-nil, always open a new browser window with appropriate browsers.    "*If non-nil, always open a new browser window with appropriate browsers.
357  Passing an interactive argument to \\[browse-url], or specific browser  Passing an interactive argument to \\[browse-url], or specific browser
# Line 408  address to an HTTP URL: Line 410  address to an HTTP URL:
410    :version "20.3"    :version "20.3"
411    :group 'browse-url)    :group 'browse-url)
412    
 ;;;###autoload  
413  (defcustom browse-url-save-file nil  (defcustom browse-url-save-file nil
414    "*If non-nil, save the buffer before displaying its file.    "*If non-nil, save the buffer before displaying its file.
415  Used by the `browse-url-of-file' command."  Used by the `browse-url-of-file' command."
# Line 424  file rather than displaying a cached cop Line 425  file rather than displaying a cached cop
425    :options '(browse-url-netscape-reload)    :options '(browse-url-netscape-reload)
426    :group 'browse-url)    :group 'browse-url)
427    
 (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.")  
   
428  (defcustom browse-url-CCI-port 3003  (defcustom browse-url-CCI-port 3003
429    "*Port to access XMosaic via CCI.    "*Port to access XMosaic via CCI.
430  This can be any number between 1024 and 65535 but must correspond to  This can be any number between 1024 and 65535 but must correspond to
# Line 484  These might set the port, for instance." Line 476  These might set the port, for instance."
476    :type '(repeat (string :tag "Argument"))    :type '(repeat (string :tag "Argument"))
477    :group 'browse-url)    :group 'browse-url)
478    
 ;;;###autoload  
479  (defcustom browse-url-generic-program nil  (defcustom browse-url-generic-program nil
480    "*The name of the browser program used by `browse-url-generic'."    "*The name of the browser program used by `browse-url-generic'."
481    :type '(choice string (const :tag "None" nil))    :type '(choice string (const :tag "None" nil))
# Line 731  to use." Line 722  to use."
722          (error "Browsing URLs is not supported on this system"))          (error "Browsing URLs is not supported on this system"))
723      (w32-shell-execute "open" url)))      (w32-shell-execute "open" url)))
724    
725    (defun browse-url-default-macosx-browser (url &optional new-window)
726      (interactive (browse-url-interactive-arg "URL: "))
727      (start-process (concat "open " url) nil "open" url))
728    
729  ;; --- Netscape ---  ;; --- Netscape ---
730    
731  (defun browse-url-process-environment ()  (defun browse-url-process-environment ()
# Line 770  The order attempted is gnome-moz-remote, Line 765  The order attempted is gnome-moz-remote,
765  Mosaic, IXI Mosaic, Lynx in an xterm, MMM, Konqueror, and then W3."  Mosaic, IXI Mosaic, Lynx in an xterm, MMM, Konqueror, and then W3."
766    (apply    (apply
767      (cond      (cond
768       ((executable-find "gnome-moz-remote") 'browse-url-gnome-moz)       ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz)
769       ((executable-find browse-url-mozilla-program) 'browse-url-mozilla)       ((executable-find browse-url-mozilla-program) 'browse-url-mozilla)
770       ((executable-find browse-url-galeon-program) 'browse-url-galeon)       ((executable-find browse-url-galeon-program) 'browse-url-galeon)
771       ((executable-find browse-url-kde-program) 'browse-url-kde)       ((executable-find browse-url-kde-program) 'browse-url-kde)
# Line 952  used instead of `browse-url-new-window-f Line 947  used instead of `browse-url-new-window-f
947                 (append browse-url-galeon-startup-arguments (list url))))))                 (append browse-url-galeon-startup-arguments (list url))))))
948    
949  ;; GNOME means of invoking either Mozilla or Netrape.  ;; GNOME means of invoking either Mozilla or Netrape.
950    (defvar browse-url-gnome-moz-program "gnome-moz-remote")
951  (defcustom browse-url-gnome-moz-arguments '()  (defcustom browse-url-gnome-moz-arguments '()
952    "*A list of strings passed to the GNOME mozilla viewer as arguments."    "*A list of strings passed to the GNOME mozilla viewer as arguments."
953    :version "21.1"    :version "21.1"
# Line 975  used instead of `browse-url-new-window-f Line 970  used instead of `browse-url-new-window-f
970    (interactive (browse-url-interactive-arg "URL: "))    (interactive (browse-url-interactive-arg "URL: "))
971    (apply 'start-process (concat "gnome-moz-remote " url)    (apply 'start-process (concat "gnome-moz-remote " url)
972           nil           nil
973           "gnome-moz-remote"           browse-url-gnome-moz-program
974           (append           (append
975            browse-url-gnome-moz-arguments            browse-url-gnome-moz-arguments
976            (if (browse-url-maybe-new-window new-window)            (if (browse-url-maybe-new-window new-window)
# Line 1021  used instead of `browse-url-new-window-f Line 1016  used instead of `browse-url-new-window-f
1016            (kill-buffer nil)            (kill-buffer nil)
1017            ;; Send signal SIGUSR to Mosaic            ;; Send signal SIGUSR to Mosaic
1018            (message "Signalling Mosaic...")            (message "Signalling Mosaic...")
1019            (signal-process pid browse-url-usr1-signal)            (signal-process pid 'SIGUSR1)
1020            ;; Or you could try:            ;; Or you could try:
1021            ;; (call-process "kill" nil 0 nil "-USR1" (int-to-string pid))            ;; (call-process "kill" nil 0 nil "-USR1" (int-to-string pid))
1022            (message "Signalling Mosaic...done")            (message "Signalling Mosaic...done")
# Line 1034  used instead of `browse-url-new-window-f Line 1029  used instead of `browse-url-new-window-f
1029    
1030  ;; --- Grail ---  ;; --- Grail ---
1031    
 ;;;###autoload  
1032  (defvar browse-url-grail  (defvar browse-url-grail
1033    (concat (or (getenv "GRAILDIR") "~/.grail") "/user/rcgrail.py")    (concat (or (getenv "GRAILDIR") "~/.grail") "/user/rcgrail.py")
1034    "Location of Grail remote control client script `rcgrail.py'.    "Location of Grail remote control client script `rcgrail.py'.
# Line 1280  don't offer a form of remote control." Line 1274  don't offer a form of remote control."
1274  Default to the URL around or before point."  Default to the URL around or before point."
1275    (interactive (browse-url-interactive-arg "KDE URL: "))    (interactive (browse-url-interactive-arg "KDE URL: "))
1276    (message "Sending URL to KDE...")    (message "Sending URL to KDE...")
1277    (apply #'start-process `(,(concat "KDE" url) nil ,browse-url-kde-program    (apply #'start-process (concat "KDE " url) nil browse-url-kde-program
1278                             ,@browse-url-kde-args ,url)))                           (append browse-url-kde-args (list url))))
1279    
1280  (provide 'browse-url)  (provide 'browse-url)
1281    

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26