[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS
From: |
Drew Adams |
Subject: |
bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS |
Date: |
Sat, 1 Dec 2012 20:50:56 -0800 |
> > The application of property `pure' to `kbd' is not in
> > byte-opt.el. It is in subr.el. And in my code it would,
> > likewise, be in an ordinary Lisp library.
>
> I wouldn't call subr.el "an ordinary Lisp library"; perhaps it's the
> word "basic" in "basic lisp subroutines for Emacs".
You can argue that merely by virtue of belonging to the GNU Emacs distribution
none of its libraries is completely "ordinary" - they are not user libraries.
I meant that it is not special wrt byte-compiling or the byte compiler (AFAIK).
If you want to say that wrt the use of `pure' it is more special than my library
`foo', then it behooves you to say what makes it special wrt byte-compiling.
That is my question.
> > I was just asking whether you know of something that makes
> > this special to Emacs Dev and not appropriate for user
> > libraries. If you don't know of anything, fine; perhaps
> > someone else does.
>
> No, I don't know of something that makes it special to Emacs, other
> than the interiorities of the byte-optimizer are undocumented except
> in the source code. It's almost by definition what I would call
> "internal".
I was not asking what makes byte-opt.el special wrt byte-compiling. I was
asking what makes subr.el - in particular, its definition of `kbd', special.
Why would it be appropriate to apply `pure' to `kbd' but not to a user function
`foo' with the same definition? I'm trying to understand/learn.
> I suppose we will have to agree to disagree on this, because I don't
> share your impulse to document every nook and cranny of Emacs.
Hyperbole. Let's please stick to this bug report and documentation of this
feature of applying property `pure'.
> > It is a question: whether `pure' is information that users
> > can reasonably use to inform the byte compiler that a function
> > is what the compiler would expect of a pure function, i.e.,
> > what the code you pointed me to would expect, in order to
> > be able to perform that particular optimization.
>
> If it were so, it would be documented, don't you think.
No, I don't think that is necessarily the case (`if it should be documented it
would already be documented'). Any more than the fact that the change of `kbd'
to a function is documented in NEWS. That is a recent change, and perhaps
someone has just not yet had a chance to update NEWS.
Is the use of `pure' recent also? Grepping Emacs 23.4 I find 4 occurrences
outside byte-opt.el (all in smie.el), so it is at least that old. Grepping
Emacs 22.3 I find only one occurrence, which is in byte-opt.el itself. Grepping
Emacs 21.3.1 I find no occurrences.
So it has been around for a while, but clearly it has not been used much so far,
even by Emacs Dev. (The self-documentation of Emacs is for Emacs Dev too, BTW.)
> In the section of the Elisp manual dedicated to the
> byte-optimizer. Only that section does not exist.
There is a section that is about compiler declarations, but so far it is
specific to `declare-function'. That seems to be the only compiler declaration
Emacs Lisp has, so far (?).
Perhaps the use of `pure', if appropriate for users (still my question), could
be elevated to a declaration form: `declare-pure' or whatever.
(And there are of course other user forms that affect byte compilation in some
way, such as `with-no-warnings'.)
- bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS, Drew Adams, 2012/12/01
- bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS, Juanma Barranquero, 2012/12/01
- bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS, Drew Adams, 2012/12/01
- bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS, Juanma Barranquero, 2012/12/01
- bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS, Drew Adams, 2012/12/01
- bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS, Juanma Barranquero, 2012/12/01
- bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS, Drew Adams, 2012/12/01
- bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS, Juanma Barranquero, 2012/12/01
- bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS,
Drew Adams <=
- bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS, Michael Heerdegen, 2012/12/02
bug#13052: 24.3.50; mention recent change of `kbd' to a function in NEWS, Chong Yidong, 2012/12/02