[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Re: Current mode command discovery
From: |
Drew Adams |
Subject: |
RE: [External] : Re: Current mode command discovery |
Date: |
Mon, 22 Feb 2021 05:27:52 +0000 |
> * The :enable thing in menu items
Don't forget :filter (which can also apply to commands bound to keyboard keys).
> All of these are ways to say that the command exists, but can't be
> executed right now. We could introduce one new mechanism that replaces
> all this spread-out information in one place, where it belongs:
>
> (defun kill-region (...)
> (declare (inhibited (lambda ()
> (and (not (region-active-p))
> "The region is not active"))))...)
> Or something along those lines.
Again, a lispy way to attach such info (and not just info saying why a command
can't be invoked right ow) to a named function is to just use symbol
properties. Why do you insist on modifying source code this way?
It's not like these are declarations for the byte-compiler. There's no need to
hard-code this info in the source code.
Or even if you insist on doing it there, just use `put'. That lets anyone do
it anywhere: users, anyone, anytime.
- Re: Current mode command discovery, (continued)
- Re: Current mode command discovery, Lars Ingebrigtsen, 2021/02/19
- Re: Current mode command discovery, chad, 2021/02/19
- Re: Current mode command discovery, Stefan Monnier, 2021/02/19
- RE: [External] : Re: Current mode command discovery, Drew Adams, 2021/02/19
- Re: [External] : Re: Current mode command discovery, Eli Zaretskii, 2021/02/20
- RE: [External] : Re: Current mode command discovery, Drew Adams, 2021/02/20
- RE: [External] : Re: Current mode command discovery, Drew Adams, 2021/02/21
- Re: Current mode command discovery, Lars Ingebrigtsen, 2021/02/20
- Re: Current mode command discovery, Stefan Monnier, 2021/02/20
- Re: Current mode command discovery, Lars Ingebrigtsen, 2021/02/21
- RE: [External] : Re: Current mode command discovery,
Drew Adams <=
- RE: [External] : Re: Current mode command discovery, Drew Adams, 2021/02/20
- Re: Current mode command discovery, Stefan Kangas, 2021/02/19
- RE: [External] : Re: Current mode command discovery, Drew Adams, 2021/02/17
- Re: Current mode command discovery, Jean Louis, 2021/02/20
- Re: Current mode command discovery, Robert Pluim, 2021/02/17
- Re: Current mode command discovery, Lars Ingebrigtsen, 2021/02/17
- RE: [External] : Re: Current mode command discovery, Drew Adams, 2021/02/14
Re: Current mode command discovery, Óscar Fuentes, 2021/02/14