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: Yuan Fu
Subject: Re: Duplicated outline-cycle binding, and problems with the new one
Date: Mon, 3 Jan 2022 17:40:22 -0800


> On Jan 2, 2022, at 11:18 AM, Juri Linkov <juri@linkov.net> wrote:
> 
>>>> 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.
> 
> Then maybe something like this (not tested):

[…]

This looks really good to me, for what it’s worth.

Yuan


reply via email to

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