577 |
|
|
578 |
(defun browse-url-interactive-arg (prompt) |
(defun browse-url-interactive-arg (prompt) |
579 |
"Read a URL from the minibuffer, prompting with PROMPT. |
"Read a URL from the minibuffer, prompting with PROMPT. |
580 |
Default to the URL at or before point. If invoked with a mouse button, |
If `transient-mark-mode' is non-nil and the mark is active, |
581 |
set point to the position clicked first. Return a list for use in |
it defaults to the current region, else to the URL at or before |
582 |
`interactive' containing the URL and `browse-url-new-window-flag' or its |
point. If invoked with a mouse button, it moves point to the |
583 |
negation if a prefix argument was given." |
position clicked before acting. |
584 |
|
|
585 |
|
This function returns a list (URL NEW-WINDOW-FLAG) |
586 |
|
for use in `interactive'." |
587 |
(let ((event (elt (this-command-keys) 0))) |
(let ((event (elt (this-command-keys) 0))) |
588 |
(and (listp event) (mouse-set-point event))) |
(and (listp event) (mouse-set-point event))) |
589 |
(list (read-string prompt (browse-url-url-at-point)) |
(list (read-string prompt (or (and transient-mark-mode mark-active |
590 |
|
;; rfc2396 Appendix E. |
591 |
|
(replace-regexp-in-string |
592 |
|
"[\t\r\f\n ]+" "" |
593 |
|
(buffer-substring-no-properties |
594 |
|
(region-beginning) (region-end)))) |
595 |
|
(browse-url-url-at-point))) |
596 |
(not (eq (null browse-url-new-window-flag) |
(not (eq (null browse-url-new-window-flag) |
597 |
(null current-prefix-arg))))) |
(null current-prefix-arg))))) |
598 |
|
|
856 |
(or (eq (process-exit-status process) 0) |
(or (eq (process-exit-status process) 0) |
857 |
(let* ((process-environment (browse-url-process-environment))) |
(let* ((process-environment (browse-url-process-environment))) |
858 |
;; Netscape not running - start it |
;; Netscape not running - start it |
859 |
(message "Starting Netscape...") |
(message "Starting %s..." browse-url-netscape-program) |
860 |
(apply 'start-process (concat "netscape" url) nil |
(apply 'start-process (concat "netscape" url) nil |
861 |
browse-url-netscape-program |
browse-url-netscape-program |
862 |
(append browse-url-netscape-startup-arguments (list url)))))) |
(append browse-url-netscape-startup-arguments (list url)))))) |
927 |
(or (eq (process-exit-status process) 0) |
(or (eq (process-exit-status process) 0) |
928 |
(let* ((process-environment (browse-url-process-environment))) |
(let* ((process-environment (browse-url-process-environment))) |
929 |
;; Mozilla is not running - start it |
;; Mozilla is not running - start it |
930 |
(message "Starting Mozilla...") |
(message "Starting %s..." browse-url-mozilla-program) |
931 |
(apply 'start-process (concat "mozilla " url) nil |
(apply 'start-process (concat "mozilla " url) nil |
932 |
browse-url-mozilla-program |
browse-url-mozilla-program |
933 |
(append browse-url-mozilla-startup-arguments (list url)))))) |
(append browse-url-mozilla-startup-arguments (list url)))))) |
977 |
(or (eq (process-exit-status process) 0) |
(or (eq (process-exit-status process) 0) |
978 |
(let* ((process-environment (browse-url-process-environment))) |
(let* ((process-environment (browse-url-process-environment))) |
979 |
;; Galeon is not running - start it |
;; Galeon is not running - start it |
980 |
(message "Starting Galeon...") |
(message "Starting %s..." browse-url-galeon-program) |
981 |
(apply 'start-process (concat "galeon " url) nil |
(apply 'start-process (concat "galeon " url) nil |
982 |
browse-url-galeon-program |
browse-url-galeon-program |
983 |
(append browse-url-galeon-startup-arguments (list url)))))) |
(append browse-url-galeon-startup-arguments (list url)))))) |
1026 |
(or (eq (process-exit-status process) 0) |
(or (eq (process-exit-status process) 0) |
1027 |
(let* ((process-environment (browse-url-process-environment))) |
(let* ((process-environment (browse-url-process-environment))) |
1028 |
;; Epiphany is not running - start it |
;; Epiphany is not running - start it |
1029 |
(message "Starting Epiphany...") |
(message "Starting %s..." browse-url-epiphany-program) |
1030 |
(apply 'start-process (concat "epiphany " url) nil |
(apply 'start-process (concat "epiphany " url) nil |
1031 |
browse-url-epiphany-program |
browse-url-epiphany-program |
1032 |
(append browse-url-epiphany-startup-arguments (list url)))))) |
(append browse-url-epiphany-startup-arguments (list url)))))) |
1107 |
(message "Signalling Mosaic...done") |
(message "Signalling Mosaic...done") |
1108 |
) |
) |
1109 |
;; Mosaic not running - start it |
;; Mosaic not running - start it |
1110 |
(message "Starting Mosaic...") |
(message "Starting %s..." browse-url-mosaic-program) |
1111 |
(apply 'start-process "xmosaic" nil browse-url-mosaic-program |
(apply 'start-process "xmosaic" nil browse-url-mosaic-program |
1112 |
(append browse-url-mosaic-arguments (list url))) |
(append browse-url-mosaic-arguments (list url))) |
1113 |
(message "Starting Mosaic...done")))) |
(message "Starting %s...done" browse-url-mosaic-program)))) |
1114 |
|
|
1115 |
;; --- Grail --- |
;; --- Grail --- |
1116 |
|
|