Mercurial > emacs
comparison lisp/net/browse-url.el @ 90729:6588c6259dfb
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 545-562)
- Update from CVS
- Update from erc--emacs--22
- Merge from gnus--rel--5.10
- erc-iswitchb: Temporarily enable iswitchb mode
* gnus--rel--5.10 (patch 172-176)
- Merge from emacs--devo--0
- Update from CVS
- Update from CVS: lisp/legacy-gnus-agent.el: Add Copyright notice.
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-156
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sat, 16 Dec 2006 01:29:26 +0000 |
parents | a8190f7e546e 00d6850d1b3e |
children | 95d0cdf160ea |
comparison
equal
deleted
inserted
replaced
90728:a65a92d83186 | 90729:6588c6259dfb |
---|---|
758 Prompts for a URL, defaulting to the URL at or before point. Variable | 758 Prompts for a URL, defaulting to the URL at or before point. Variable |
759 `browse-url-browser-function' says which browser to use." | 759 `browse-url-browser-function' says which browser to use." |
760 (interactive (browse-url-interactive-arg "URL: ")) | 760 (interactive (browse-url-interactive-arg "URL: ")) |
761 (unless (interactive-p) | 761 (unless (interactive-p) |
762 (setq args (or args (list browse-url-new-window-flag)))) | 762 (setq args (or args (list browse-url-new-window-flag)))) |
763 (if (functionp browse-url-browser-function) | 763 (let ((process-environment (copy-sequence process-environment))) |
764 (apply browse-url-browser-function url args) | 764 ;; When connected to various displays, be careful to use the display of |
765 ;; The `function' can be an alist; look down it for first match | 765 ;; the currently selected frame, rather than the original start display, |
766 ;; and apply the function (which might be a lambda). | 766 ;; which may not even exist any more. |
767 (catch 'done | 767 (if (stringp (frame-parameter (selected-frame) 'display)) |
768 (dolist (bf browse-url-browser-function) | 768 (setenv "DISPLAY" (frame-parameter (selected-frame) 'display))) |
769 (when (string-match (car bf) url) | 769 (if (functionp browse-url-browser-function) |
770 (apply (cdr bf) url args) | 770 (apply browse-url-browser-function url args) |
771 (throw 'done t))) | 771 ;; The `function' can be an alist; look down it for first match |
772 (error "No browse-url-browser-function matching URL %s" | 772 ;; and apply the function (which might be a lambda). |
773 url)))) | 773 (catch 'done |
774 (dolist (bf browse-url-browser-function) | |
775 (when (string-match (car bf) url) | |
776 (apply (cdr bf) url args) | |
777 (throw 'done t))) | |
778 (error "No browse-url-browser-function matching URL %s" | |
779 url))))) | |
774 | 780 |
775 ;;;###autoload | 781 ;;;###autoload |
776 (defun browse-url-at-point (&optional arg) | 782 (defun browse-url-at-point (&optional arg) |
777 "Ask a WWW browser to load the URL at or before point. | 783 "Ask a WWW browser to load the URL at or before point. |
778 Doesn't let you edit the URL like `browse-url'. Variable | 784 Doesn't let you edit the URL like `browse-url'. Variable |