[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#70577: [PATCH] New command other-project-prefix
From: |
Juri Linkov |
Subject: |
Re: bug#70577: [PATCH] New command other-project-prefix |
Date: |
Sun, 28 Apr 2024 19:46:43 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>> +(defun other-project-prefix ()
>> + "\"Switch\" to another project before running an Emacs command.
>> +Makes sure the next command invoked asks for the project to run it in."
>> + (interactive)
>> + (prefix-command-preserve-state)
>> + (letrec ((depth (minibuffer-depth))
>
> In passing, this pattern where you letrec a hook that removes itself,
> and also consider minibuffer-depth, is now in several places.
> The one I am thinking of is vc-edit-next-command but I based that on
> some code of Juri's somewhere.
>
> It would be good to factor out a macro for this pattern, I think.
'display-buffer-override-next-command' doesn't contain 'letrec', but
uses the same pattern, so it could benefit from the new macro indeed.