[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 29eb459695: Fix whitespace-mode display table restoration logic
From: |
Lars Ingebrigtsen |
Subject: |
master 29eb459695: Fix whitespace-mode display table restoration logic |
Date: |
Fri, 15 Jul 2022 06:07:56 -0400 (EDT) |
branch: master
commit 29eb4596956a74a83ceb4c17835886a23ea0dd20
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix whitespace-mode display table restoration logic
* lisp/whitespace.el (whitespace-display-char-on): Fix the saving
logic -- `whitespace-mode' is on by this point (bug#48583).
---
lisp/whitespace.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 240f99effc..41b0a34f9e 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -2403,9 +2403,11 @@ to `indent-tabs-mode' and `tab-width'."
;; Remember whether a buffer has a local display table.
(unless whitespace-display-table-was-local
(setq whitespace-display-table-was-local t)
- (unless (or whitespace-mode global-whitespace-mode)
- (setq whitespace-display-table
- (copy-sequence buffer-display-table)))
+ ;; Save the old table so we can restore it when
+ ;; `whitespace-mode' is switched off again.
+ (when (or whitespace-mode global-whitespace-mode)
+ (setq whitespace-display-table
+ (copy-sequence buffer-display-table)))
;; Assure `buffer-display-table' is unique
;; when two or more windows are visible.
(setq buffer-display-table
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 29eb459695: Fix whitespace-mode display table restoration logic,
Lars Ingebrigtsen <=