bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47521: 28.0.50; [PATCH] [image-mode] reduce calling for image-toggle


From: LinSun
Subject: bug#47521: 28.0.50; [PATCH] [image-mode] reduce calling for image-toggle-display-text
Date: Wed, 31 Mar 2021 20:17:57 +0800

Hi,

 

When open a png file and toggle display from image to text by C-c C-c, the `image-toggle-display-text` will be called twice in function `image-toggle-display-text`.

The first call is from major mode change hook, in follow line will cause `change-major-mode-hook` be run and it’s `image-toggle-display-text` for image-mode.

image-mode.el:730         (major-mode-restore '(image-mode image-mode-as-text))

 

The second call is from the direct call at

image-mode.el:736         (image-toggle-display-text)

 

You can debug-on-entry `image-toggle-display-text` then switch image to text in image-mode by C-c C-c to observe the issue.

 

And the patch is try to reduce calling for `image-toggle-display-text`.

 

Best Regards

Lin Sun


reply via email to

[Prev in Thread] Current Thread [Next in Thread]