diff options
| author | Glenn Morris | 2015-02-24 18:02:11 -0500 |
|---|---|---|
| committer | Glenn Morris | 2015-02-24 18:02:11 -0500 |
| commit | 1b0ebbdb566a8dfa5f45ce121b2c835e9760091f (patch) | |
| tree | bdb00e611f8134c519ca59acf0e98d4c2f40d6ab | |
| parent | 18178922a8074627fe4e4e2fd0c9d21839f172c4 (diff) | |
| download | emacs-1b0ebbdb566a8dfa5f45ce121b2c835e9760091f.tar.gz emacs-1b0ebbdb566a8dfa5f45ce121b2c835e9760091f.zip | |
browse-url-firefox: update for firefox 36's removal of -remote
Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1080319
* lisp/net/browse-url.el (browse-url-firefox-startup-arguments):
Make obsolete.
(browse-url-firefox): Doc fix. Remove -remote.
(browse-url-firefox-sentinel): Remove function.
* etc/NEWS: Mention this.
Fixes: debbugs:19921
| -rw-r--r-- | etc/NEWS | 2 | ||||
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/net/browse-url.el | 80 |
3 files changed, 37 insertions, 53 deletions
| @@ -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 |
| 30 | take "&rest args". | 30 | take "&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 @@ | |||
| 1 | 2015-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 | |||
| 1 | 2015-02-23 Eli Zaretskii <eliz@gnu.org> | 9 | 2015-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. |
| 1105 | Default to the URL around or before point. The strings in | 1108 | Defaults to the URL around or before point. Passes the strings |
| 1106 | variable `browse-url-firefox-arguments' are also passed to | 1109 | in the variable `browse-url-firefox-arguments' to Firefox. |
| 1107 | Firefox. | ||
| 1108 | 1110 | ||
| 1109 | When called interactively, if variable | 1111 | Interactively, 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 | 1112 | loads the document in a new Firefox window. A non-nil prefix argument |
| 1111 | new Firefox window, otherwise use a random existing one. A | 1113 | reverses the effect of `browse-url-new-window-flag'. |
| 1112 | non-nil interactive prefix argument reverses the effect of | ||
| 1113 | `browse-url-new-window-flag'. | ||
| 1114 | 1114 | ||
| 1115 | If `browse-url-firefox-new-window-is-tab' is non-nil, then | 1115 | If `browse-url-firefox-new-window-is-tab' is non-nil, then |
| 1116 | whenever a document would otherwise be loaded in a new window, it | 1116 | whenever a document would otherwise be loaded in a new window, it |
| 1117 | is loaded in a new tab in an existing window instead. | 1117 | is loaded in a new tab in an existing window instead. |
| 1118 | 1118 | ||
| 1119 | When called non-interactively, optional second argument | 1119 | Non-interactively, this uses the optional second argument NEW-WINDOW |
| 1120 | NEW-WINDOW is used instead of `browse-url-new-window-flag'. | 1120 | instead of `browse-url-new-window-flag'. |
| 1121 | 1121 | ||
| 1122 | On MS-Windows systems the optional `new-window' parameter is | 1122 | On MS Windows, this ignores `browse-url-new-window-flag' and |
| 1123 | ignored. Firefox for Windows does not support the \"-remote\" | 1123 | `browse-url-firefox-new-window-is-tab', as well as the NEW-WINDOW argument. |
| 1124 | command line parameter. Therefore, the | 1124 | It always uses a new window." |
| 1125 | `browse-url-new-window-flag' and `browse-url-firefox-new-window-is-tab' | ||
| 1126 | are ignored as well. Firefox on Windows will always open the requested | ||
| 1127 | URL 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) |