branch: master
commit c42fcb2b46d2d80de3351b7e4f39be85289cde9f
Author: Dmitry Gutov <[email protected]>
Commit: Steve Purcell <[email protected]>

    Compatibility fix for mode line format of Emacs 23
    
    Patch from https://bugs.gentoo.org/311259?id=311259
---
 mmm-utils.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mmm-utils.el b/mmm-utils.el
index 04ef1f4..98abdb8 100644
--- a/mmm-utils.el
+++ b/mmm-utils.el
@@ -78,7 +78,11 @@ substituted for the corresponding REGEXP wherever it 
matches."
     (save-match-data
       (dolist (pair arg-pairs)
         (while (string-match (car pair) string)
-          (setq string (replace-match (cdr pair) t t string))))))
+          (setq string (replace-match
+                        (if (fboundp 'format-mode-line)
+                            (format-mode-line (cdr pair))
+                          (cdr pair))
+                        t t string))))))
   string)
 
 (defun mmm-format-matches (string &optional on-string)

Reply via email to