aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2006-12-08 03:17:10 +0000
committerStefan Monnier <[email protected]>2006-12-08 03:17:10 +0000
commitaddc252e942e740e4d7603949c7f5594f4d07e47 (patch)
treea78ddc301d75af300da7d37f48be777ae277c3f7
parentc2c93894cadc28a139c96a869ecda0eb8f709a0d (diff)
(browse-url): Set DISPLAY to the one of the
current frame, in case we're connected to several displays.
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/net/browse-url.el28
2 files changed, 27 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4b02e94cc4..c641766360 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2006-12-08 Stefan Monnier <[email protected]>
+
+ * net/browse-url.el (browse-url): Set DISPLAY to the one of the
+ current frame, in case we're connected to several displays.
+
2006-12-08 Juanma Barranquero <[email protected]>
* frame.el (other-frame): Doc fix.
@@ -20,9 +25,10 @@
2006-12-05 Kim F. Storm <[email protected]>
* emulation/cua-base.el (cua-paste-pop-rotate-temporarily): Doc fix.
- (cua-paste-pop): Rework last change for cua-paste-pop-rotate-temporarily,
- so first M-y and C-y works alike, pasting the head of the kill-ring, and
- prefix arg C-u M-y inserts the text inserted by the last M-y command.
+ (cua-paste-pop): Rework last change for
+ cua-paste-pop-rotate-temporarily, so first M-y and C-y works alike,
+ pasting the head of the kill-ring, and prefix arg C-u M-y inserts the
+ text inserted by the last M-y command.
2006-12-05 Micha,Ak(Bl Cadilhac <[email protected]>
@@ -39,8 +45,7 @@
* progmodes/fortran.el (fortran-mode-abbrev-table)
* progmodes/octave-mod.el (octave-abbrev-table)
* progmodes/sql.el (sql-mode-abbrev-table): Define abbrevs even
- if abbrev-table is non-nil (saved user abbrevs may have been
- restored).
+ if abbrev-table is non-nil (saved user abbrevs may have been restored).
* progmodes/vhdl-mode.el (vhdl-mode-abbrev-table-init): Do not
clear abbrev table, else saved abbrevs will not be restored.
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 3f514a2aaa..3300673162 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)