* Re: [elpa] externals/greader 2ac46a52d4: greader-reading-mode: disabling `view-mode' when we are active.
[not found] ` <20230921124427.69EDDC05819@vcs2.savannah.gnu.org>
@ 2023-09-21 13:29 ` Stefan Monnier
2023-09-21 14:13 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2023-09-21 13:29 UTC (permalink / raw)
To: Michelangelo Rodriguez; +Cc: emacs-devel
> This solution, I hope temporary, is necessary because some
> keys in `greader-reading-mode' and `view-mode' collide, and
> `view-mode' is loaded before greader.
Hmm... if `view-mode` is loaded first, its in `minor-mode-map-alist`
should come afterwards and so should have lower precedence, no?
> I don't like this solution, it seems somehow inelegant,
> but for now it's the only one that comes to mind.
There's indeed a lack of control about relative ordering in (minor)
modes in `minor-mode-map-alist` which occasionally bites us.
You might be able to solve it with:
- (require 'view) to make sure the other entry is there so you can
change its place if needed.
- Manually rearrange the entries right after `define-minor-mode` at the
top-level of your file (i.e. when your file is loaded rather than when
your minor mode is activated).
Another option is to use `minor-mode-overriding-map-alist` (where you'd
put a slightly different modified for `view-mode`), but that
tends to be more invasive.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [elpa] externals/greader 2ac46a52d4: greader-reading-mode: disabling `view-mode' when we are active.
2023-09-21 13:29 ` [elpa] externals/greader 2ac46a52d4: greader-reading-mode: disabling `view-mode' when we are active Stefan Monnier
@ 2023-09-21 14:13 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2023-09-21 14:13 UTC (permalink / raw)
To: Michelangelo Rodriguez; +Cc: emacs-devel
> Another option is to use `minor-mode-overriding-map-alist` (where you'd
> put a slightly different modified for `view-mode`), but that
> tends to be more invasive.
BTW, yet another option can be to use a binding of [remap <the-view-command>]
so as to temporarily override view-mode's binding with ours.
This only makes sense if our binding is conceptually related to
view-modes. If we just happen to use the same key for something
different, this is not a good option (since it'd also apply when the
users change key-bindings so they don't collide).
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-21 14:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <169530026436.5470.1609959274510970863@vcs2.savannah.gnu.org>
[not found] ` <20230921124427.69EDDC05819@vcs2.savannah.gnu.org>
2023-09-21 13:29 ` [elpa] externals/greader 2ac46a52d4: greader-reading-mode: disabling `view-mode' when we are active Stefan Monnier
2023-09-21 14:13 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).