| Age | Commit message (Collapse) | Author |
|
Suggested-by: L. Andrew <flandrew@tutanota.com>
|
|
Suggested-by: L. Andrew <flandrew@tutanota.com>
|
|
|
|
|
|
|
|
|
|
To do so, merge the code-paths for regular lists, dotted-lists and
vectors.
|
|
Show them in the same order as they appear in the code.
Suggested-by: L. Andrew <flandrew@tutanota.com>
|
|
|
|
|
|
Previously only the last cons-cell was returned. Now the expression is
returned unchanged. That means that we still do not remove explicit
unused arguments from the returned value. As before these have to be
placed elsewhere.
|
|
I'll have to wait until the next release to be able to add this again.
Closes #2.
|
|
Closes #1.
|
|
|
|
Emacs 26.1 is needed for `mapcan', but I wouldn't want to support
older releases anyway.
|
|
|
|
|
|
|
|
|
|
Re https://github.com/minad/vertico/discussions/481.
|
|
|
|
|
|
"Delete" and "remove" are the terms usually used in Emacs/Lisp,
and the former seems more fitting, since I tend to think of this
as a destructive transformation.
|
|
The order should not matter, but a user reported privately that on
Emacs 29.3 it does; we get an "Invalid face box" error otherwise.
|
|
|
|
The assert was needlessly limited to the first argument, to catch
specifically `%1'vs`%' and `&1'vs`&' (but also, e.g., `%1'vs`_&'). Now
be also detect `%N'vs`&N', `%N'vs`_%N' and even conflicts were multiple
aspects differ (e.g., `%2'vs`_&2').
We could just use `%N' in the arglist when both `%N' and `_%N' appear
in the body. Since `_%N' is dropped from the body, that wouldn't result
in an unbound variable error, as would happen in other cases. But that
would both complicate the implementation and hide a user mistake, which
could be of consequence (e.g., if they actually meant `_%N+1').
|
|
Previously we turned
(##list %1 &3)
into
(lambda (%1 _%2 &optional &3) (list %1 &3))
now we use
(lambda (%1 &optional _&2 &3) (list %1 &3))
The new approach is better because even if the first form would have
been "correct", the latter will nearly¹ always at least be "valid".
The same isn't true for the old approach. If we make an argument
mandatory that should be optional, and the callers does not pass that
argument, that's an error. These cases are several magnitudes more
likely.
¹ The exception being callers that check a functions *minimal* arity
to determine what arguments to pass. In the unlikely case that one
should ever encounter such a caller, one can use an explicit _%N,
as one previously would frequently have had to use _&N.
|
|
Using `seq-drop-while' would be nicer, but we want to avoid
dependencies.
|
|
|
|
|
|
|
|
- Support trailing unused (mandatory and/or optional) arguments.
- Support unused optional arguments, in between (used and/or unused)
mandatory arguments and used optional arguments. (In a later step
we will start preferring optional arguments, for unused arguments
that are not explicitly named.)
|
|
|
|
|
|
That's kinda the point, isn't it? We only have to provide the
body and the arguments are deduced from that. This change does
lead to some dissonance in existing descriptions, which will have
to be reduced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This macro was only added in Emacs 26.1.
|
|
|
|
|
|
|
|
|
|
Note that if `llama-fontify-mode' is disabled, then
`font-lock-type-face' is used for optional arguments because the
respective entry in `lisp-el-font-lock-keywords-2' (IMO) matches a bit
too eagerly. By default `llama-optional-arguments' inherits from that
face and doesn't make any changes, so toggling `llama-fontify-mode',
usually has no effect on the appearance of these arguments.
|
|
In Emacs 29.1 a syntax property rule was added to treat `##' as the
symbol it is (except in comments and docstrings). However `##' is
different from other symbols in that no space has to used in between
it and the following symbol, to prevent them from becoming one symbol,
we take advantage of that idiosyncrasy.
We revert this because the feature that depend on `##' having symbol
syntax are less important than the features that would get confused
and treat `##' and the following symbol as one symbol.
However, in docstrings and comments `##' (with the `...' around it)
should be fontified like other symbols, so there we do give it symbol
syntax - unlike the commented out code, which explicitly prevented
that.
|
|
|