aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-12-08 03:17:10 +0000
committerStefan Monnier2006-12-08 03:17:10 +0000
commitaddc252e942e740e4d7603949c7f5594f4d07e47 (patch)
treea78ddc301d75af300da7d37f48be777ae277c3f7
parentc2c93894cadc28a139c96a869ecda0eb8f709a0d (diff)
downloademacs-addc252e942e740e4d7603949c7f5594f4d07e47.tar.gz
emacs-addc252e942e740e4d7603949c7f5594f4d07e47.zip
(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 4b02e94cc47..c641766360d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12006-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * net/browse-url.el (browse-url): Set DISPLAY to the one of the
4 current frame, in case we're connected to several displays.
5
12006-12-08 Juanma Barranquero <lekktu@gmail.com> 62006-12-08 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * frame.el (other-frame): Doc fix. 8 * frame.el (other-frame): Doc fix.
@@ -20,9 +25,10 @@
202006-12-05 Kim F. Storm <storm@cua.dk> 252006-12-05 Kim F. Storm <storm@cua.dk>
21 26
22 * emulation/cua-base.el (cua-paste-pop-rotate-temporarily): Doc fix. 27 * emulation/cua-base.el (cua-paste-pop-rotate-temporarily): Doc fix.
23 (cua-paste-pop): Rework last change for cua-paste-pop-rotate-temporarily, 28 (cua-paste-pop): Rework last change for
24 so first M-y and C-y works alike, pasting the head of the kill-ring, and 29 cua-paste-pop-rotate-temporarily, so first M-y and C-y works alike,
25 prefix arg C-u M-y inserts the text inserted by the last M-y command. 30 pasting the head of the kill-ring, and prefix arg C-u M-y inserts the
31 text inserted by the last M-y command.
26 32
272006-12-05 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org> 332006-12-05 Micha,Ak(Bl Cadilhac <michael.cadilhac@lrde.org>
28 34
@@ -39,8 +45,7 @@
39 * progmodes/fortran.el (fortran-mode-abbrev-table) 45 * progmodes/fortran.el (fortran-mode-abbrev-table)
40 * progmodes/octave-mod.el (octave-abbrev-table) 46 * progmodes/octave-mod.el (octave-abbrev-table)
41 * progmodes/sql.el (sql-mode-abbrev-table): Define abbrevs even 47 * progmodes/sql.el (sql-mode-abbrev-table): Define abbrevs even
42 if abbrev-table is non-nil (saved user abbrevs may have been 48 if abbrev-table is non-nil (saved user abbrevs may have been restored).
43 restored).
44 49
45 * progmodes/vhdl-mode.el (vhdl-mode-abbrev-table-init): Do not 50 * progmodes/vhdl-mode.el (vhdl-mode-abbrev-table-init): Do not
46 clear abbrev table, else saved abbrevs will not be restored. 51 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 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
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)