From 7b42f1ee77732a9ab17db7aad68d2136d20148b5 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 21 Jan 2026 22:09:51 +0200 Subject: [PATCH] mu4e: clean up some unneeded backports Remove some functions we no longer need with Emacs 28. There's still some things left, which will be handled in due time. --- mu4e/mu4e-helpers.el | 6 ------ mu4e/mu4e-main.el | 4 ++-- mu4e/mu4e-obsolete.el | 4 +++- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/mu4e/mu4e-helpers.el b/mu4e/mu4e-helpers.el index 47c1f222..17705624 100644 --- a/mu4e/mu4e-helpers.el +++ b/mu4e/mu4e-helpers.el @@ -583,12 +583,6 @@ COMPONENTS." (mapconcat (lambda (part) (if (stringp part) part "")) (cons directory components) "/"))) -(defun mu4e-string-replace (from-string to-string in-string) - "Replace FROM-STRING with TO-STRING in IN-STRING each time it occurs. -Mu4e's version of Emacs 28's `string-replace'." - (replace-regexp-in-string (regexp-quote from-string) - to-string in-string nil 'literal)) - (defun mu4e-plistp (object) "Non-nil if and only if OBJECT is a valid plist. This is mu4e's version of Emacs 29's `plistp'." diff --git a/mu4e/mu4e-main.el b/mu4e/mu4e-main.el index e5cb553c..9bd39646 100644 --- a/mu4e/mu4e-main.el +++ b/mu4e/mu4e-main.el @@ -203,10 +203,10 @@ binding representation, remove that first letter." (bindstr (if (and alt (> (length bindstr) 1)) alt bindstr)) (title ;; remove first letter afrer [] if it equal last of binding - (mu4e-string-replace + (string-replace (concat "[@]" (substring bindstr -1)) "[@]" title)) (title ;; insert binding in [@] - (mu4e-string-replace + (string-replace "[@]" (format "[%s]" (propertize bindstr 'face 'mu4e-highlight-face)) title)) (map (make-sparse-keymap))) diff --git a/mu4e/mu4e-obsolete.el b/mu4e/mu4e-obsolete.el index 58362871..8d234c04 100644 --- a/mu4e/mu4e-obsolete.el +++ b/mu4e/mu4e-obsolete.el @@ -1,6 +1,6 @@ ;;; mu4e-obsolete.el --- Obsolete things -*- lexical-binding: t -*- -;; Copyright (C) 2022-2024 Dirk-Jan C. Binnema +;; Copyright (C) 2022-2026 Dirk-Jan C. Binnema ;; Author: Dirk-Jan C. Binnema ;; Maintainer: Dirk-Jan C. Binnema @@ -283,5 +283,7 @@ ;; mu4e. (define-obsolete-function-alias 'mu4e-clear-caches #'ignore "1.11.15") +(define-obsolete-function-alias 'mu4e-string-replace #'string-replace "1.14.0") + (provide 'mu4e-obsolete) ;;; mu4e-obsolete.el ends here