GNU bug report logs -
#56514
29.0.50; Improve ERC's URI scheme integration for irc:// links
Previous Next
Reported by: "J.P." <jp <at> neverwas.me>
Date: Tue, 12 Jul 2022 08:16:01 UTC
Severity: wishlist
Found in version 29.0.50
Fixed in version 29.1
Done: "J.P." <jp <at> neverwas.me>
Bug is archived. No further changes may be made.
Full log
Message #43 received at 56514 <at> debbugs.gnu.org (full text, mbox):
Quick note:
> diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el
> index 03bd8f1352..340d90ba96 100644
> --- a/lisp/erc/erc-compat.el
> +++ b/lisp/erc/erc-compat.el
> @@ -32,6 +32,7 @@
> ;;; Code:
> [...]
> +
> +(when (< emacs-major-version 29)
> + (unless (assoc "\\`irc6?s?://" browse-url-default-handlers)
> + (push '("\\`irc6?s?://" . erc-compat--29-browse-url-irc)
> + browse-url-default-handlers)))
This won't work on 27, so we'll probably have to do something like
(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))
((boundp 'browse-url-browser-function) ; 27
(require 'browse-url)
(let ((existing browse-url-browser-function))
(setq browse-url-browser-function
(if (functionp existing)
(lambda (u &rest r)
(apply (if (string-match-p "\\`irc6?s?://" u)
#'erc-compat--29-browse-url-irc
existing)
u r))
(cons '("\\`irc6?s?://" . erc-compat--29-browse-url-irc)
existing))))))
> +
> (provide 'erc-compat)
This bug report was last modified 1 year and 250 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.