[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 75f26646d4 3/7: ; Be nicer when updating browse-url var in erc-
From: |
F. Jason Park |
Subject: |
emacs-29 75f26646d4 3/7: ; Be nicer when updating browse-url var in erc-compat |
Date: |
Wed, 14 Dec 2022 09:44:40 -0500 (EST) |
branch: emacs-29
commit 75f26646d4a569cfb485de4baddcda66ff44b2c3
Author: F. Jason Park <jp@neverwas.me>
Commit: F. Jason Park <jp@neverwas.me>
; Be nicer when updating browse-url var in erc-compat
* lisp/erc/erc-compat.el: Be more cautious about modifying
`browse-url-default-handlers' when loading erc-compat on Emacs 28. A
user may have already added an entry for irc:// URLs before loading
`erc-compat'.
---
lisp/erc/erc-compat.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el
index bd93254758..77625398ab 100644
--- a/lisp/erc/erc-compat.el
+++ b/lisp/erc/erc-compat.el
@@ -391,8 +391,11 @@ If START or END is negative, it counts from the end."
(cond ((fboundp 'browse-url-irc)) ; 29
((boundp 'browse-url-default-handlers) ; 28
- (cl-pushnew '("\\`irc6?s?://" . erc-compat--29-browse-url-irc)
- browse-url-default-handlers))
+ (setf (alist-get "\\`irc6?s?://" browse-url-default-handlers
+ nil nil (lambda (a _)
+ (and (stringp a)
+ (string-match-p a "irc://localhost"))))
+ #'erc-compat--29-browse-url-irc))
((boundp 'browse-url-browser-function) ; 27
(require 'browse-url)
(let ((existing browse-url-browser-function))
- emacs-29 updated (2d96a18cd0 -> 102a3e3b44), F. Jason Park, 2022/12/14
- emacs-29 f0c9088878 6/7: Set erc-network to a "given" ID instead of failing, F. Jason Park, 2022/12/14
- emacs-29 0155fc67be 2/7: Respect a nil erc-session-password when reconnecting, F. Jason Park, 2022/12/14
- emacs-29 9ac80e8a6e 1/7: Add dedicated auth-source section in ERC manual, F. Jason Park, 2022/12/14
- emacs-29 44b04c0ac1 4/7: Actually accept non-symbols as IDs in erc-open, F. Jason Park, 2022/12/14
- emacs-29 75f26646d4 3/7: ; Be nicer when updating browse-url var in erc-compat,
F. Jason Park <=
- emacs-29 102a3e3b44 7/7: Don't send erc-sasl-user as USER command argument, F. Jason Park, 2022/12/14
- emacs-29 09c0c6b2ba 5/7: Limit casemapping to appropriate ranges in ERC, F. Jason Park, 2022/12/14