[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Suggested default change for browse-url-browser-function
From: |
Lars Magne Ingebrigtsen |
Subject: |
Suggested default change for browse-url-browser-function |
Date: |
Mon, 08 Nov 2010 22:13:10 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
I was wondering where to plug in the correct mailto: behaviour in
shr.el, and it strikes me that perhaps this should be left to
browse-url, since that's controlling all the other url-browsing
behaviour.
So with that in mind, I propose the following change. It means that
anybody who uses browse-url on a mailto: link in Emacs will end up in
Message mode by default instead of popping up a browser.
The downside to doing it this way is that (I think) many people have
already set `browse-url-browser-function' to something else, so changing
the default won't actually have any significant effect, and mailto:
links still won't work for many people.
=== modified file 'lisp/net/browse-url.el'
*** lisp/net/browse-url.el 2010-10-09 00:52:12 +0000
--- lisp/net/browse-url.el 2010-11-08 20:51:32 +0000
***************
*** 214,226 ****
:group 'external
:group 'comm)
;;;###autoload
(defcustom browse-url-browser-function
! (cond
! ((memq system-type '(windows-nt ms-dos cygwin))
! 'browse-url-default-windows-browser)
! ((memq system-type '(darwin)) 'browse-url-default-macosx-browser)
! (t 'browse-url-default-browser))
"Function to display the current buffer in a WWW browser.
This is used by the `browse-url-at-point', `browse-url-at-mouse', and
`browse-url-of-file' commands.
--- 214,230 ----
:group 'external
:group 'comm)
+ (autoload 'message-mailto "message")
+
;;;###autoload
(defcustom browse-url-browser-function
! `(("\\`mailto:" . message-mailto)
! ("." .
! `(cond
! ((memq system-type '(windows-nt ms-dos cygwin))
! 'browse-url-default-windows-browser)
! ((memq system-type '(darwin)) 'browse-url-default-macosx-browser)
! (t 'browse-url-default-browser))))
"Function to display the current buffer in a WWW browser.
This is used by the `browse-url-at-point', `browse-url-at-mouse', and
`browse-url-of-file' commands.
***************
*** 260,266 ****
(function :tag "Your own function")
(alist :tag "Regexp/function association list"
:key-type regexp :value-type function))
! :version "21.1"
:group 'browse-url)
(defcustom browse-url-netscape-program "netscape"
--- 264,270 ----
(function :tag "Your own function")
(alist :tag "Regexp/function association list"
:key-type regexp :value-type function))
! :version "24.1"
:group 'browse-url)
(defcustom browse-url-netscape-program "netscape"
--
(domestic pets only, the antidote for overdose, milk.)
address@hidden * Lars Magne Ingebrigtsen
- Suggested default change for browse-url-browser-function,
Lars Magne Ingebrigtsen <=