[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 20669c1: Don't call `image-toggle-display-text' when toggling
From: |
Lars Ingebrigtsen |
Subject: |
master 20669c1: Don't call `image-toggle-display-text' when toggling |
Date: |
Mon, 5 Apr 2021 12:13:00 -0400 (EDT) |
branch: master
commit 20669c1b929699670869afa40ee6d407ccb42848
Author: Lin Sun <lin.sun@zoom.us>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Don't call `image-toggle-display-text' when toggling
*lisp/image-mode.el (image-mode-to-text): Do not call the
image-toggle-display-text twice when toggle image display (bug#47521).
---
lisp/image-mode.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 2de16cb..f4ff35f 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -732,8 +732,9 @@ displays an image file as text."
(setq image-type previous-image-type)
;; Enable image minor mode with `C-c C-c'.
(image-minor-mode 1)
- ;; Show the image file as text.
- (image-toggle-display-text)))
+ (unless (image-get-display-property)
+ ;; Show the image file as text.
+ (image-toggle-display-text))))
(defun image-mode-as-hex ()
"Set a non-image mode as major mode in combination with image minor mode.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 20669c1: Don't call `image-toggle-display-text' when toggling,
Lars Ingebrigtsen <=