diff options
| author | Juri Linkov | 2011-10-19 12:03:39 +0300 |
|---|---|---|
| committer | Juri Linkov | 2011-10-19 12:03:39 +0300 |
| commit | 195f8db97df38608481a4497cbaf86d8acc9aa55 (patch) | |
| tree | a07f246be6138521faa64c418208425a82980045 | |
| parent | 5abc31ef1857bf04852e4a0f4c599cd7460f4faa (diff) | |
| download | emacs-195f8db97df38608481a4497cbaf86d8acc9aa55.tar.gz emacs-195f8db97df38608481a4497cbaf86d8acc9aa55.zip | |
* lisp/net/browse-url.el (browse-url-browser-function): Add "Chromium".
(browse-url-chromium-program, browse-url-chromium-arguments):
New defcustoms.
(browse-url-default-browser): Check for `browse-url-chromium' and
call `browse-url-chromium-program'.
(browse-url-chromium): New command.
Fixes: debbugs:9779
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/net/browse-url.el | 35 |
2 files changed, 44 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e058f387a93..a2197503492 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-10-19 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * net/browse-url.el (browse-url-browser-function): Add "Chromium". | ||
| 4 | (browse-url-chromium-program, browse-url-chromium-arguments): | ||
| 5 | New defcustoms. | ||
| 6 | (browse-url-default-browser): Check for `browse-url-chromium' and | ||
| 7 | call `browse-url-chromium-program'. | ||
| 8 | (browse-url-chromium): New command. (Bug#9779) | ||
| 9 | |||
| 1 | 2011-10-18 Juanma Barranquero <lekktu@gmail.com> | 10 | 2011-10-18 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 11 | ||
| 3 | * facemenu.el (list-colors-duplicates): On Windows, detect more | 12 | * facemenu.el (list-colors-duplicates): On Windows, detect more |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index f9bc13e1e25..1b42000dfc6 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | ;; Function Browser Earliest version | 36 | ;; Function Browser Earliest version |
| 37 | ;; browse-url-mozilla Mozilla Don't know | 37 | ;; browse-url-mozilla Mozilla Don't know |
| 38 | ;; browse-url-firefox Firefox Don't know (tried with 1.0.1) | 38 | ;; browse-url-firefox Firefox Don't know (tried with 1.0.1) |
| 39 | ;; browse-url-chromium Chromium 3.0 | ||
| 39 | ;; browse-url-galeon Galeon Don't know | 40 | ;; browse-url-galeon Galeon Don't know |
| 40 | ;; browse-url-epiphany Epiphany Don't know | 41 | ;; browse-url-epiphany Epiphany Don't know |
| 41 | ;; browse-url-netscape Netscape 1.1b1 | 42 | ;; browse-url-netscape Netscape 1.1b1 |
| @@ -230,6 +231,7 @@ regexp should probably be \".\" to specify a default browser." | |||
| 230 | :value browse-url-w3-gnudoit) | 231 | :value browse-url-w3-gnudoit) |
| 231 | (function-item :tag "Mozilla" :value browse-url-mozilla) | 232 | (function-item :tag "Mozilla" :value browse-url-mozilla) |
| 232 | (function-item :tag "Firefox" :value browse-url-firefox) | 233 | (function-item :tag "Firefox" :value browse-url-firefox) |
| 234 | (function-item :tag "Chromium" :value browse-url-chromium) | ||
| 233 | (function-item :tag "Galeon" :value browse-url-galeon) | 235 | (function-item :tag "Galeon" :value browse-url-galeon) |
| 234 | (function-item :tag "Epiphany" :value browse-url-epiphany) | 236 | (function-item :tag "Epiphany" :value browse-url-epiphany) |
| 235 | (function-item :tag "Netscape" :value browse-url-netscape) | 237 | (function-item :tag "Netscape" :value browse-url-netscape) |
| @@ -336,6 +338,22 @@ Defaults to the value of `browse-url-firefox-arguments' at the time | |||
| 336 | :type '(repeat (string :tag "Argument")) | 338 | :type '(repeat (string :tag "Argument")) |
| 337 | :group 'browse-url) | 339 | :group 'browse-url) |
| 338 | 340 | ||
| 341 | (defcustom browse-url-chromium-program | ||
| 342 | (let ((candidates '("chromium" "chromium-browser"))) | ||
| 343 | (while (and candidates (not (executable-find (car candidates)))) | ||
| 344 | (setq candidates (cdr candidates))) | ||
| 345 | (or (car candidates) "chromium")) | ||
| 346 | "The name by which to invoke Chromium." | ||
| 347 | :type 'string | ||
| 348 | :version "24.1" | ||
| 349 | :group 'browse-url) | ||
| 350 | |||
| 351 | (defcustom browse-url-chromium-arguments nil | ||
| 352 | "A list of strings to pass to Chromium as arguments." | ||
| 353 | :type '(repeat (string :tag "Argument")) | ||
| 354 | :version "24.1" | ||
| 355 | :group 'browse-url) | ||
| 356 | |||
| 339 | (defcustom browse-url-galeon-program "galeon" | 357 | (defcustom browse-url-galeon-program "galeon" |
| 340 | "The name by which to invoke Galeon." | 358 | "The name by which to invoke Galeon." |
| 341 | :type 'string | 359 | :type 'string |
| @@ -913,6 +931,7 @@ used instead of `browse-url-new-window-flag'." | |||
| 913 | ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) | 931 | ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) |
| 914 | ((executable-find browse-url-mozilla-program) 'browse-url-mozilla) | 932 | ((executable-find browse-url-mozilla-program) 'browse-url-mozilla) |
| 915 | ((executable-find browse-url-firefox-program) 'browse-url-firefox) | 933 | ((executable-find browse-url-firefox-program) 'browse-url-firefox) |
| 934 | ((executable-find browse-url-chromium-program) 'browse-url-chromium) | ||
| 916 | ((executable-find browse-url-galeon-program) 'browse-url-galeon) | 935 | ((executable-find browse-url-galeon-program) 'browse-url-galeon) |
| 917 | ((executable-find browse-url-kde-program) 'browse-url-kde) | 936 | ((executable-find browse-url-kde-program) 'browse-url-kde) |
| 918 | ((executable-find browse-url-netscape-program) 'browse-url-netscape) | 937 | ((executable-find browse-url-netscape-program) 'browse-url-netscape) |
| @@ -1141,6 +1160,22 @@ URL in a new window." | |||
| 1141 | (append browse-url-firefox-startup-arguments (list url)))))) | 1160 | (append browse-url-firefox-startup-arguments (list url)))))) |
| 1142 | 1161 | ||
| 1143 | ;;;###autoload | 1162 | ;;;###autoload |
| 1163 | (defun browse-url-chromium (url &optional new-window) | ||
| 1164 | "Ask the Chromium WWW browser to load URL. | ||
| 1165 | Default to the URL around or before point. The strings in | ||
| 1166 | variable `browse-url-chromium-arguments' are also passed to | ||
| 1167 | Chromium." | ||
| 1168 | (interactive (browse-url-interactive-arg "URL: ")) | ||
| 1169 | (setq url (browse-url-encode-url url)) | ||
| 1170 | (let* ((process-environment (browse-url-process-environment))) | ||
| 1171 | (apply 'start-process | ||
| 1172 | (concat "chromium " url) nil | ||
| 1173 | browse-url-chromium-program | ||
| 1174 | (append | ||
| 1175 | browse-url-chromium-arguments | ||
| 1176 | (list url))))) | ||
| 1177 | |||
| 1178 | ;;;###autoload | ||
| 1144 | (defun browse-url-galeon (url &optional new-window) | 1179 | (defun browse-url-galeon (url &optional new-window) |
| 1145 | "Ask the Galeon WWW browser to load URL. | 1180 | "Ask the Galeon WWW browser to load URL. |
| 1146 | Default to the URL around or before point. The strings in variable | 1181 | Default to the URL around or before point. The strings in variable |