(define-inline erc-dcc-unquote-filename (filename)
(inline-quote
- (string-replace "\\\\" "\\"
- (string-replace "\\\"" "\"" ,filename))))
+ (if (>= emacs-major-version 28)
+ (string-replace
+ "\\\\" "\\"
+ (string-replace "\\\"" "\"" ,filename))
+ (replace-regexp-in-string
+ "\\\\\\\\" "\\"
+ (replace-regexp-in-string "\\\\\"" "\"" ,filename t t) t t))))
(defun erc-dcc-handle-ctcp-send (proc query nick login host to)
"This is called if a CTCP DCC SEND subcommand is sent to the client.
If S is non-nil, it will be used as the quit reason."
(or s
(if (fboundp 'yow)
- (string-replace "\n" "" (yow))
+ (if (>= emacs-major-version 28)
+ (string-replace "\n" "" (yow))
+ (replace-regexp-in-string "\n" "" (yow)))
(erc-quit/part-reason-default))))
(make-obsolete 'erc-quit-reason-zippy "it will be removed." "24.4")
If S is non-nil, it will be used as the quit reason."
(or s
(if (fboundp 'yow)
- (string-replace "\n" "" (yow))
+ (if (>= emacs-major-version 28)
+ (string-replace "\n" "" (yow))
+ (replace-regexp-in-string "\n" "" (yow)))
(erc-quit/part-reason-default))))
(make-obsolete 'erc-part-reason-zippy "it will be removed." "24.4")
(fill-region (point-min) (point-max))
(buffer-string))))
(setq header-line-format
- (string-replace
- "%"
- "%%"
- (if face
- (propertize header 'help-echo help-echo
- 'face face)
- (propertize header 'help-echo help-echo))))))
+ (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)))))))
(t (setq header-line-format
(if face
(propertize header 'face face)
nick user host channel
(if (not (string= reason ""))
(format ": %s"
- (string-replace "%" "%%" reason))
+ (if (>= emacs-major-version 28)
+ (string-replace "%" "%%" reason)
+ (replace-regexp-in-string "%" "%%" reason)))
"")))))