[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Leaving out non-applicable commands on Mx
From: |
Drew Adams |
Subject: |
RE: Leaving out non-applicable commands on Mx |
Date: |
Fri, 8 Jan 2016 19:09:30 -0800 (PST) |
> It is necessary to annotate the functions with the context they are
> suppossed to work on. Something like
>
> (defun foo-something ()
> "docstring"
> (interactive)
> (declare this-applies-to-foo-mode)
> ...)
(put 'foo-something 'applies-to-foo-mode)
Or maybe:
(put 'foo-something
(cl-pushnew 'foo-mode (get 'foo-something 'applicable-modes)))
> Doing that for every function is unnecessary work, so a method for
> saying "all the functions defined on this .el file apply to foo-mode,
> except foo-bar and foo-zoo" is a sensible enhancement. (We also could
> exploit the fact that we know wich functions are autoladed. Most
> autoloaded functions are context-free, while the non-autoloaded
> functions on the same file are context-specific).
>
> Maintaining all this information on an external resource is
> unmanageable, it simply wont work.
Why not?
> So yes, the Elisp source files need
> to be annotated (that's the work I'm volunteering for).
If you can annotate them then you can put those annotations
on their symbols as a property used by your new library, no?
> For reading the annotations (and, possibly, for performance reasons,
> applying the filter) modifications are required on some Emacs
> infrastructure.
Why? What's wrong with `(get SYMBOL 'applies-to-foo-mode)'?
- Re: 4K Bugs, (continued)
- Re: 4K Bugs, Stefan Monnier, 2016/01/08
- Leaving out non-applicable commands on Mx (was: 4K Bugs), Óscar Fuentes, 2016/01/08
- Re: Leaving out non-applicable commands on Mx, John Wiegley, 2016/01/08
- Re: Leaving out non-applicable commands on Mx, Óscar Fuentes, 2016/01/08
- Re: Leaving out non-applicable commands on Mx, John Wiegley, 2016/01/08
- Re: Leaving out non-applicable commands on Mx, Spencer Boucher, 2016/01/08
- RE: Leaving out non-applicable commands on Mx, Drew Adams, 2016/01/08
- Re: Leaving out non-applicable commands on Mx, Óscar Fuentes, 2016/01/08
- Re: Leaving out non-applicable commands on Mx, Óscar Fuentes, 2016/01/08
- RE: Leaving out non-applicable commands on Mx,
Drew Adams <=
- Re: Leaving out non-applicable commands on Mx, Óscar Fuentes, 2016/01/08
- Re: Leaving out non-applicable commands on Mx, Stefan Monnier, 2016/01/08
- RE: Leaving out non-applicable commands on Mx, Drew Adams, 2016/01/08
- RE: Leaving out non-applicable commands on Mx, Drew Adams, 2016/01/08
- Re: Leaving out non-applicable commands on Mx, Óscar Fuentes, 2016/01/08
- Re: Leaving out non-applicable commands on Mx, Yuri Khan, 2016/01/09
- RE: Leaving out non-applicable commands on Mx, Drew Adams, 2016/01/09
- Making `interactive' conditional (was: Leaving out non-applicable commands on Mx), John Wiegley, 2016/01/09
- RE: Making `interactive' conditional (was: Leaving out non-applicable commands on Mx), Drew Adams, 2016/01/09
- RE: Making `interactive' conditional (was: Leaving out non-applicable commands on Mx), Drew Adams, 2016/01/11