emacs-devel
[Top][All Lists]
Advanced

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

Re: Duplicated outline-cycle binding, and problems with the new one


From: Stefan Monnier
Subject: Re: Duplicated outline-cycle binding, and problems with the new one
Date: Sun, 02 Jan 2022 14:07:46 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> Overall, from my limited knowledge, I think the old approach is more
>> reliable: I wouldn’t have this problem with the old approach.  And the
>> new functionality added by the new approach and
>> outline-minor-mode-cycle-filter can be easily implemented in the old
>> approach.  We don’t need to fiddle with font-lock-keywords with the
>> old approach, either.  How about we go back to the old approach?
>
> Some time ago we discussed this possibility, but it will require writing
> too many wrappers for different modes, for example, for diff-mode:
>
>   (defvar-keymap diff-mode-shared-map
>     "TAB" (lambda () (interactive)
>             (if (and outline-minor-mode (outline-on-heading-p))
>                 (outline-cycle)
>               (diff-hunk-next)))
>   ...

Why?  The old approach used a conditional binding, so it should "just
work" without the major modes knowing about it.


        Stefan




reply via email to

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