summaryrefslogtreecommitdiff
path: root/llama.el
AgeCommit message (Collapse)Author
2024-09-20Reword documentation to avoid `%' being linkified in docstringJonas Bernoulli
Suggested-by: L. Andrew <flandrew@tutanota.com>
2024-09-20Remove a style recommendationJonas Bernoulli
Suggested-by: L. Andrew <flandrew@tutanota.com>
2024-09-15No longer highlight % and & in function positionJonas Bernoulli
2024-09-15Support backquote construct in place of FNJonas Bernoulli
2024-09-15Add special handling of backquoteJonas Bernoulli
2024-09-15llama--collect: CosmeticsJonas Bernoulli
2024-09-15Handle explicit unused arguments in vectors and dotted-lists tooJonas Bernoulli
To do so, merge the code-paths for regular lists, dotted-lists and vectors.
2024-09-15llama--collect: Change order of symbols in error messageJonas Bernoulli
Show them in the same order as they appear in the code. Suggested-by: L. Andrew <flandrew@tutanota.com>
2024-09-07No longer support shorthands in function positionJonas Bernoulli
2024-09-07llama--collect: Correct name of internal variableJonas Bernoulli
2024-09-07llama--collect: Fix return value for dotted listsJonas Bernoulli
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.
2024-08-17Remove Package-Version headerJonas Bernoulli
I'll have to wait until the next release to be able to add this again. Closes #2.
2024-08-15Fix format of Package-Requires headerJonas Bernoulli
Closes #1.
2024-08-11Update homepage urlJonas Bernoulli
2024-08-10Add Package-Version and Package-Requires headersJonas Bernoulli
Emacs 26.1 is needed for `mapcan', but I wouldn't want to support older releases anyway.
2024-07-23Always advise elisp-mode-syntax-propertizeJonas Bernoulli
2024-06-09elisp--expect-function-p@llama: Add docstringJonas Bernoulli
2024-06-09Use define-advice instead of advice-addJonas Bernoulli
2024-05-30Hide the empty symbol from loaddefs-generate--compute-prefixesJonas Bernoulli
2024-05-20Hide the empty symbol from completing-readJonas Bernoulli
Re https://github.com/minad/vertico/discussions/481.
2024-05-20Correct outdated examplesJonas Bernoulli
2024-04-15Update contact informationJonas Bernoulli
2024-04-03llama-erased-argument: Rename to llama-deleted-argumentJonas Bernoulli
"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.
2024-04-03llama-erase-argument: Rearrange properties of box attributeJonas Bernoulli
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.
2024-03-23Update documentationJonas Bernoulli
2024-03-23llama--collect: Signal error on all argument conflictsJonas Bernoulli
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').
2024-03-23Make unused arguments at mandatoriness border optional by defaultJonas Bernoulli
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.
2024-03-23##: Use while to drop trailing unused argumentsJonas Bernoulli
Using `seq-drop-while' would be nicer, but we want to avoid dependencies.
2024-03-23##: Order steps chronologicallyJonas Bernoulli
2024-03-23##: Completely separate handling of rest argumentsJonas Bernoulli
2024-03-23##: Shorten name of a let-bound variableJonas Bernoulli
2024-03-23Support explicit unused argumentsJonas Bernoulli
- 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.)
2024-03-23llama--arguments: CosmeticsJonas Bernoulli
2024-03-23llama--collect: Rename DATA argument to EXPRJonas Bernoulli
2024-03-23##: Rename ARGS argument to BODYJonas Bernoulli
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.
2024-03-12llama-font-lock-keywords: Also match & by itselfJonas Bernoulli
2024-02-28llama--arguments: CosmeticsJonas Bernoulli
2024-02-28llama--arguments: Reduce nestingJonas Bernoulli
2024-02-28llama-font-lock-keywords: Replace unnecessary backquote with quoteJonas Bernoulli
2024-02-28llama--collect: Skip quoted listsJonas Bernoulli
2024-02-28llama--collect: Handle dotted listsJonas Bernoulli
2024-02-28llama--collect: Use separate clause for nested ## no-opJonas Bernoulli
2024-02-28No longer use and-let* macroJonas Bernoulli
This macro was only added in Emacs 26.1.
2024-02-28No longer depend on seq packageJonas Bernoulli
2024-01-01Bump copyright yearsJonas Bernoulli
2023-12-15Drop support for the legacy %* argumentJonas Bernoulli
2023-12-15llama--collect: Fix error messageJonas Bernoulli
2023-12-15Optionally fontify ## and its special argumentsJonas Bernoulli
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.
2023-12-15Override elisp-mode-syntax-propertize to leave ## aloneJonas Bernoulli
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.
2023-09-01Fix typoJonas Bernoulli