* Re: [nongnu] elpa/evil 460af439e5: Suppress operator for some normal state commands
[not found] ` <20221003205825.2E812C11D79@vcs2.savannah.gnu.org>
@ 2022-10-08 0:01 ` Stefan Monnier
0 siblings, 0 replies; only message in thread
From: Stefan Monnier @ 2022-10-08 0:01 UTC (permalink / raw)
To: Tom Dalziel; +Cc: emacs-devel
ELPA Syncer [2022-10-03 16:58:25] wrote:
> branch: elpa/evil
> commit 460af439e51da7f6602732318ff52820bd2286fd
> Author: Tom Dalziel <tom_dl@hotmail.com>
> Commit: Tom Dalziel <33435574+tomdl89@users.noreply.github.com>
>
> Suppress operator for some normal state commands
[...]
> @@ -2002,11 +2093,12 @@ with regard to indentation."
> (or (and (>= char ?A) (<= char ?Z))
> (assq char (default-value 'evil-markers-alist))))
>
> -(defun evil-set-marker (char &optional pos advance)
> +(evil-define-command evil-set-marker (char &optional pos advance)
> "Set the marker denoted by CHAR to position POS.
> POS defaults to the current position of point.
> If ADVANCE is t, the marker advances when inserting text at it;
> otherwise, it stays behind."
> + :suppress-operator t
> (interactive (list (read-char)))
> (catch 'done
> (let ((marker (evil-get-marker char t)) alist)
This hunk breaks compilation of `evil-common.el` (unless you call the
compiler after you loaded that non-compiled file, to fix the
circularity by hand):
When compiling the file, the compiler needs to macro expand this
`evil-define-command`. The macro is defined a few lines earlier, so
that part works fine, but the macro calls during its expansion a few
other functions defined in that same file: while the functions are
defined earlier in the file, this still breaks because when the file is
compiled the `defun`s are not yet executed (i.e. the functions get
compiled but they don't get defined). So we get an error of the form:
Error: void-function (evil-interactive-form)
debug(error (void-function evil-interactive-form))
evil-interactive-form((list (read-char)))
apply(evil-interactive-form (list (read-char)))
[...]
macroexpand-1((evil-define-command evil-set-marker ...
[...]
To fix this, we need either:
- wrap inside `eval-and-compile` all the functions used during the macro
expansion of `evil-define-command`.
- Move the definition of `evil-set-marker` to another file, like
`evil-commands.el`.
Stefan
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-08 0:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <166483070487.28727.16591732760971661957@vcs2.savannah.gnu.org>
[not found] ` <20221003205825.2E812C11D79@vcs2.savannah.gnu.org>
2022-10-08 0:01 ` [nongnu] elpa/evil 460af439e5: Suppress operator for some normal state commands Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).