summaryrefslogtreecommitdiff
path: root/lisp/erc/erc.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/erc/erc.el')
-rw-r--r--lisp/erc/erc.el33
1 files changed, 11 insertions, 22 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 3b127bbd492..151d75e7ce1 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -13,7 +13,7 @@
;; Michael Olson (mwolson@gnu.org)
;; Kelvin White (kwhite@gnu.org)
;; Version: 5.4.1
-;; Package-Requires: ((emacs "27.1"))
+;; Package-Requires: ((emacs "27.1") (compat "28.1.2.0"))
;; Keywords: IRC, chat, client, Internet
;; URL: https://www.gnu.org/software/emacs/erc.html
@@ -69,6 +69,8 @@
(require 'iso8601)
(eval-when-compile (require 'subr-x))
+(require 'erc-compat)
+
(defconst erc-version "5.4.1"
"This version of ERC.")
@@ -3519,9 +3521,7 @@ Without SECRET, consult auth-source, possibly passing SERVER as the
"Non-nil when channel is server-local on a network that allows them."
(and-let* (((eq ?& (aref channel 0)))
(chan-types (erc--get-isupport-entry 'CHANTYPES 'single))
- ((if (>= emacs-major-version 28)
- (string-search "&" chan-types)
- (string-match-p "&" chan-types))))))
+ ((string-search "&" chan-types)))))
(defun erc-cmd-JOIN (channel &optional key)
"Join the channel given in CHANNEL, optionally with KEY.
@@ -7005,21 +7005,12 @@ shortened server name instead."
(fill-region (point-min) (point-max))
(buffer-string))))
(setq header-line-format
- (if (>= emacs-major-version 28)
- (string-replace
- "%"
- "%%"
- (if face
- (propertize header 'help-echo help-echo
- 'face face)
- (propertize header 'help-echo help-echo)))
- (replace-regexp-in-string
- "%"
- "%%"
- (if face
- (propertize header 'help-echo help-echo
- 'face face)
- (propertize header 'help-echo help-echo)))))))
+ (string-replace
+ "%"
+ "%%"
+ (if face
+ (propertize header 'help-echo help-echo 'face face)
+ (propertize header 'help-echo help-echo))))))
(t (setq header-line-format
(if face
(propertize header 'face face)
@@ -7304,9 +7295,7 @@ functions."
nick user host channel
(if (not (string= reason ""))
(format ": %s"
- (if (>= emacs-major-version 28)
- (string-replace "%" "%%" reason)
- (replace-regexp-in-string "%" "%%" reason)))
+ (string-replace "%" "%%" reason))
"")))))