1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
From: Artur Malabarba <artur@endlessparentheses.com>
Date: Mon, 27 May 2019 08:56:09 -0300
Subject: Really fix #240 - Error when mode-line-buffer-identification is not
a list
Source: https://github.com/Malabarba/smart-mode-line/commit/999be065b195f2eddb4e1b629f99038d832d44b7
---
smart-mode-line.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/smart-mode-line.el b/smart-mode-line.el
index f0aac89..12f0361 100644
--- a/smart-mode-line.el
+++ b/smart-mode-line.el
@@ -1367,11 +1367,11 @@ doesn't want any buffer-id."
Argument IGNORED is ignored."
(setq sml/name-width-old sml/name-width)
(setq sml/buffer-identification-filling nil)
- (when (or ;; Only calculate all this if it will actually be used
- (equal sml/mode-line-buffer-identification mode-line-buffer-identification)
- (and (listp mode-line-buffer-identification)
- (member (cadr sml/mode-line-buffer-identification) mode-line-buffer-identification))
- (member sml/mode-line-buffer-identification mode-line-buffer-identification))
+ (when (and (listp mode-line-buffer-identification)
+ (or ;; Only calculate all this if it will actually be used
+ (equal sml/mode-line-buffer-identification mode-line-buffer-identification)
+ (member (cadr sml/mode-line-buffer-identification) mode-line-buffer-identification)
+ (member sml/mode-line-buffer-identification mode-line-buffer-identification)))
(setq sml/buffer-identification
(let* ((dir (sml/replacer (abbreviate-file-name (sml/get-directory))))
(sml/use-projectile-p (unless (or (not sml/projectile-loaded-p)
|