|
From: | Basil L. Contovounesios |
Subject: | Re: scratch/command 064f146 1/2: Change command to interactive ... modes |
Date: | Sun, 14 Feb 2021 17:52:45 +0000 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Kangas <stefankangas@gmail.com> writes: > "Basil L. Contovounesios" <contovob@tcd.ie> writes: >> Stefan Kangas <stefankangas@gmail.com> writes: >> >>> (defmacro future-interactive (arg-descriptor &rest modes) >>> (if (< emacs-major-version 28) >>> `(interactive ,arg-descriptor) >>> `(interactive ,arg-descriptor ,@(mapcar #'eval modes)))) >> >> Why is the eval necessary? > > Because the correct interactive form is: > > (interactive ... foo-mode) > > Rather than: > > (interactive ... 'foo-mode) > >>> (defun foo (arg) >>> (future-interactive "P" 'fundamental-mode) ^^ Then don't do that ;). -- Basil
[Prev in Thread] | Current Thread | [Next in Thread] |