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

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

bug#52980: elide-head and revert-buffer interaction stops elide-head-sho


From: Stefan Kangas
Subject: bug#52980: elide-head and revert-buffer interaction stops elide-head-show from working
Date: Wed, 5 Jan 2022 01:30:51 -0800

<jakanakaevangeli@chiru.no> writes:

>> +  (if elide-head-mode
>> +      (progn
>> +        (elide-head--hide)
>> +        (add-hook 'before-revert-hook 'elide-head--delete-overlay nil 
>> 'local))
>> +    (elide-head--show)
>> +    (remove-hook 'before-revert-hook 'elide-head--delete-overlay 'local)))
>
> Perhaps change-major-mode-hook would be more appropriate as suggested by
> "(elisp) Creating Buffer-Local". That would make the minor mode clean up
> its overlay if the user executes M-x normal-mode in addition to M-x
> revert-buffer.

I think you're right, thanks!  Updated patch attached.

Attachment: 0001-New-minor-mode-elide-head-mode.patch
Description: Text Data


reply via email to

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