aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/net/browse-url.el80
3 files changed, 37 insertions, 53 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 0b26d7abb18..7d9e1f0d83f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -29,6 +29,8 @@ with a prefix argument or by typing C-u C-h C-n.
29** `call-process-shell-command' and `process-file-shell-command' no longer 29** `call-process-shell-command' and `process-file-shell-command' no longer
30take "&rest args". 30take "&rest args".
31 31
32** The option `browse-url-firefox-startup-arguments' no longer has an effect.
33
32** ERC 34** ERC
33 35
34*** New option `erc-rename-buffers'. 36*** New option `erc-rename-buffers'.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 14a12b53a35..a5603941ad1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12015-02-24 Glenn Morris <rgm@gnu.org>
2
3 * net/browse-url.el (browse-url-firefox-startup-arguments):
4 Make obsolete.
5 (browse-url-firefox): Doc fix. Remove -remote, which no longer
6 exists in Firefox 36. (Bug#19921)
7 (browse-url-firefox-sentinel): Remove function.
8
12015-02-23 Eli Zaretskii <eliz@gnu.org> 92015-02-23 Eli Zaretskii <eliz@gnu.org>
2 10
3 * frame.el (blink-cursor-timer-function): Don't increment 11 * frame.el (blink-cursor-timer-function): Don't increment
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index e6ae0d7df06..4819cdc20f6 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -337,6 +337,9 @@ Defaults to the value of `browse-url-firefox-arguments' at the time
337 :type '(repeat (string :tag "Argument")) 337 :type '(repeat (string :tag "Argument"))
338 :group 'browse-url) 338 :group 'browse-url)
339 339
340(make-obsolete-variable 'browse-url-firefox-startup-arguments
341 "it no longer has any effect." "24.5")
342
340(defcustom browse-url-chromium-program 343(defcustom browse-url-chromium-program
341 (let ((candidates '("chromium" "chromium-browser"))) 344 (let ((candidates '("chromium" "chromium-browser")))
342 (while (and candidates (not (executable-find (car candidates)))) 345 (while (and candidates (not (executable-find (car candidates))))
@@ -1102,68 +1105,39 @@ used instead of `browse-url-new-window-flag'."
1102;;;###autoload 1105;;;###autoload
1103(defun browse-url-firefox (url &optional new-window) 1106(defun browse-url-firefox (url &optional new-window)
1104 "Ask the Firefox WWW browser to load URL. 1107 "Ask the Firefox WWW browser to load URL.
1105Default to the URL around or before point. The strings in 1108Defaults to the URL around or before point. Passes the strings
1106variable `browse-url-firefox-arguments' are also passed to 1109in the variable `browse-url-firefox-arguments' to Firefox.
1107Firefox.
1108 1110
1109When called interactively, if variable 1111Interactively, if the variable `browse-url-new-window-flag' is non-nil,
1110`browse-url-new-window-flag' is non-nil, load the document in a 1112loads the document in a new Firefox window. A non-nil prefix argument
1111new Firefox window, otherwise use a random existing one. A 1113reverses the effect of `browse-url-new-window-flag'.
1112non-nil interactive prefix argument reverses the effect of
1113`browse-url-new-window-flag'.
1114 1114
1115If `browse-url-firefox-new-window-is-tab' is non-nil, then 1115If `browse-url-firefox-new-window-is-tab' is non-nil, then
1116whenever a document would otherwise be loaded in a new window, it 1116whenever a document would otherwise be loaded in a new window, it
1117is loaded in a new tab in an existing window instead. 1117is loaded in a new tab in an existing window instead.
1118 1118
1119When called non-interactively, optional second argument 1119Non-interactively, this uses the optional second argument NEW-WINDOW
1120NEW-WINDOW is used instead of `browse-url-new-window-flag'. 1120instead of `browse-url-new-window-flag'.
1121 1121
1122On MS-Windows systems the optional `new-window' parameter is 1122On MS Windows, this ignores `browse-url-new-window-flag' and
1123ignored. Firefox for Windows does not support the \"-remote\" 1123`browse-url-firefox-new-window-is-tab', as well as the NEW-WINDOW argument.
1124command line parameter. Therefore, the 1124It always uses a new window."
1125`browse-url-new-window-flag' and `browse-url-firefox-new-window-is-tab'
1126are ignored as well. Firefox on Windows will always open the requested
1127URL in a new window."
1128 (interactive (browse-url-interactive-arg "URL: ")) 1125 (interactive (browse-url-interactive-arg "URL: "))
1129 (setq url (browse-url-encode-url url)) 1126 (setq url (browse-url-encode-url url))
1130 (let* ((process-environment (browse-url-process-environment)) 1127 (let* ((process-environment (browse-url-process-environment)))
1131 (use-remote 1128 (apply 'start-process
1132 (not (memq system-type '(windows-nt ms-dos)))) 1129 (concat "firefox " url) nil
1133 (process 1130 browse-url-firefox-program
1134 (apply 'start-process 1131 (append
1135 (concat "firefox " url) nil 1132 browse-url-firefox-arguments
1136 browse-url-firefox-program 1133 ;; FIXME someone should check if this limitation
1137 (append 1134 ;; still applies.
1138 browse-url-firefox-arguments 1135 (unless (memq system-type '(windows-nt ms-dos))
1139 (if use-remote 1136 (if (browse-url-maybe-new-window new-window)
1140 (list "-remote" 1137 (if browse-url-firefox-new-window-is-tab
1141 (concat 1138 '("-new-tab")
1142 "openURL(" 1139 '("-new-window"))))
1143 url 1140 (list url)))))
1144 (if (browse-url-maybe-new-window new-window)
1145 (if browse-url-firefox-new-window-is-tab
1146 ",new-tab"
1147 ",new-window"))
1148 ")"))
1149 (list url))))))
1150 ;; If we use -remote, the process exits with status code 2 if
1151 ;; Firefox is not already running. The sentinel runs firefox
1152 ;; directly if that happens.
1153 (when use-remote
1154 (set-process-sentinel process
1155 `(lambda (process change)
1156 (browse-url-firefox-sentinel process ,url))))))
1157
1158(defun browse-url-firefox-sentinel (process url)
1159 "Handle a change to the process communicating with Firefox."
1160 (or (eq (process-exit-status process) 0)
1161 (let* ((process-environment (browse-url-process-environment)))
1162 ;; Firefox is not running - start it
1163 (message "Starting Firefox...")
1164 (apply 'start-process (concat "firefox " url) nil
1165 browse-url-firefox-program
1166 (append browse-url-firefox-startup-arguments (list url))))))
1167 1141
1168;;;###autoload 1142;;;###autoload
1169(defun browse-url-chromium (url &optional _new-window) 1143(defun browse-url-chromium (url &optional _new-window)