File: 0002-Really-fix-240-Error-when-mode-line-buffer-identific.patch

package info (click to toggle)
smart-mode-line 2.13-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 596 kB
  • sloc: lisp: 1,381; makefile: 5
file content (31 lines) | stat: -rw-r--r-- 1,686 bytes parent folder | download
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)