diff options
author | Miles Bader <miles@gnu.org> | 2006-12-16 01:29:26 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2006-12-16 01:29:26 +0000 |
commit | 4bc5d7668ef47295810f28a14d67b4a9e12a341f (patch) | |
tree | 2e22bd79984f0772c43e294babc07c1508ce95ce /lisp/net/browse-url.el | |
parent | b44bfd5e9bf3a0e853bc0d4788e4c89a01a70d6a (diff) | |
parent | c3342e8eb3eaf4560210fd030383a940640648f2 (diff) | |
download | emacs-4bc5d7668ef47295810f28a14d67b4a9e12a341f.tar.gz emacs-4bc5d7668ef47295810f28a14d67b4a9e12a341f.tar.bz2 emacs-4bc5d7668ef47295810f28a14d67b4a9e12a341f.zip |
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
Diffstat (limited to 'lisp/net/browse-url.el')
-rw-r--r-- | lisp/net/browse-url.el | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 3f514a2aaab..33006731622 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -760,17 +760,23 @@ Prompts for a URL, defaulting to the URL at or before point. Variable (interactive (browse-url-interactive-arg "URL: ")) (unless (interactive-p) (setq args (or args (list browse-url-new-window-flag)))) - (if (functionp browse-url-browser-function) - (apply browse-url-browser-function url args) - ;; The `function' can be an alist; look down it for first match - ;; and apply the function (which might be a lambda). - (catch 'done - (dolist (bf browse-url-browser-function) - (when (string-match (car bf) url) - (apply (cdr bf) url args) - (throw 'done t))) - (error "No browse-url-browser-function matching URL %s" - url)))) + (let ((process-environment (copy-sequence process-environment))) + ;; When connected to various displays, be careful to use the display of + ;; the currently selected frame, rather than the original start display, + ;; which may not even exist any more. + (if (stringp (frame-parameter (selected-frame) 'display)) + (setenv "DISPLAY" (frame-parameter (selected-frame) 'display))) + (if (functionp browse-url-browser-function) + (apply browse-url-browser-function url args) + ;; The `function' can be an alist; look down it for first match + ;; and apply the function (which might be a lambda). + (catch 'done + (dolist (bf browse-url-browser-function) + (when (string-match (car bf) url) + (apply (cdr bf) url args) + (throw 'done t))) + (error "No browse-url-browser-function matching URL %s" + url))))) ;;;###autoload (defun browse-url-at-point (&optional arg) |