From 34a1304edeb5a71ab22132bef8b4251f41cd1cda Mon Sep 17 00:00:00 2001 From: Jessie Hildebrandt Date: Fri, 3 Sep 2021 07:42:56 -0400 Subject: [PATCH] Accommodate new flymake variable name in Emacs 28+ --- mood-line.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mood-line.el b/mood-line.el index 9d93050..22ae4d4 100644 --- a/mood-line.el +++ b/mood-line.el @@ -291,7 +291,11 @@ (defun mood-line-segment-flymake () "Displays information about the current status of flymake in the mode-line (if available)." (when (and (boundp 'flymake-mode) flymake-mode) - (concat (mood-line--string-trim (format-mode-line flymake--mode-line-format)) " "))) + ;; Depending on Emacs version, flymake stores the mode-line segment using one of two variable names + (let ((flymake-segment-format (if (boundp 'flymake-mode-line-format) + flymake-mode-line-format + flymake--mode-line-format))) + (concat (mood-line--string-trim (format-mode-line flymake-segment-format)) " ")))) (defun mood-line-segment-process () "Displays the current value of `mode-line-process' in the mode-line."