From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#45177: 27.1; Access to invoking top level command in minibuffer Date: Sun, 13 Dec 2020 13:29:06 +0100 Message-ID: <87mtyh6ga5.fsf@gnus.org> References: <87czzg8489.fsf@gnus.org> <05fa5ca7-f960-0d3b-4395-f8219456c030@posteo.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18988"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45177@debbugs.gnu.org To: clemera@posteo.net Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 13 13:30:31 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koQWE-0004qh-V0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 13:30:31 +0100 Original-Received: from localhost ([::1]:38082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koQWE-0008JL-0u for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Dec 2020 07:30:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koQVo-0008Hi-By for bug-gnu-emacs@gnu.org; Sun, 13 Dec 2020 07:30:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koQVm-0006ik-Tq for bug-gnu-emacs@gnu.org; Sun, 13 Dec 2020 07:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1koQVm-0001HI-Pu for bug-gnu-emacs@gnu.org; Sun, 13 Dec 2020 07:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Dec 2020 12:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45177 X-GNU-PR-Package: emacs Original-Received: via spool by 45177-submit@debbugs.gnu.org id=B45177.16078625614769 (code B ref 45177); Sun, 13 Dec 2020 12:30:02 +0000 Original-Received: (at 45177) by debbugs.gnu.org; 13 Dec 2020 12:29:21 +0000 Original-Received: from localhost ([127.0.0.1]:47598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koQV7-0001Er-Kg for submit@debbugs.gnu.org; Sun, 13 Dec 2020 07:29:21 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:57910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koQV5-0001EG-Ce for 45177@debbugs.gnu.org; Sun, 13 Dec 2020 07:29:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FCRD7gB0lrBgO4Z9QgEulwmA+ZkjyDKj+nXMZRtRpAE=; b=b5k8tzohJJAp9aYTL5S/9mAZmv CczL8sZFELXl1vSVBILMhAMwexChnYRPpz9CM2+GBBjzrfKcf3pND0tXtNGq1vE4BbwX7K7LpPWbe kJ0KftUpL3W9tsdrXUjv6Qorf4uvwoVBeK3LEwTYDzigfpfEnYCKk/XE0v9jGMoRFCHM=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1koQUv-0004f7-8t; Sun, 13 Dec 2020 13:29:12 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJ1BMVEUnKjFIWW55hYZX Ym+RmZyMd4beO1DQtL/MydHqHjSzucl8quv////g3T9KAAAAAWJLR0QMgbNRYwAAAAd0SU1FB+QM DQwbKg0MPcAAAAGjSURBVDjLbdFLbsIwEAZgrmDcCxBygcSpVHVpoqrqtmXBvg2EA5DQAxCLAwR5 XzXWdN37dfyIY1MGCYb5/DtOMpvN5nmSJEv9tSCJrxmC/5OR+U1YEkJuQoaQ3wAdIBSblPMyBB3Q kbTUZUA3nJs5obwc4c4uWVgg6QSm4ZmD+RWsCIkiHjIPRQRTgNAIpoDbywEP5vbyDhYZu4pY4Czc ihYeVixMUOaBZZSxac4KBytmyozZfVW95g7sPNMPPW27ppYfqQFul+MUoGla0aEYWOBilrzAGWBo jMj+Tb8PyvJSCSFAB7CEONbvCJRmz8LOh62R5tRXCAUr9Bw3+tlIU31V9QgPehsT+JVj1VsNnQvA xoNsDeyVHsPTNL8IDeKwv5rL1kInq/W6kmFA2IsfZVy7EU7xvBcW8Ke+DrhEHNGBEaLIdgIQhyDQ ejiD6qKzjoB3p6YTtxFAFwcMAOCzVZsoYEGps1LuxD1eUAilEB71Tkq5E++ww1OKEbC+bUAoUBEM Q20C5tVAmAC8yf4TZ/gBFQKeeDv2EAIcbeA/fF18C38TwJZnmmD7qQAAACV0RVh0ZGF0ZTpjcmVh dGUAMjAyMC0xMi0xM1QxMjoyNzo0MiswMDowMOcXzaIAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAt MTItMTNUMTI6Mjc6NDErMDA6MDCnom+DAAAAAElFTkSuQmCC X-Now-Playing: Colleen's _A Flame My Love, A Frequency_: "Separating" In-Reply-To: <05fa5ca7-f960-0d3b-4395-f8219456c030@posteo.de> (clemera@posteo.net's message of "Sat, 12 Dec 2020 14:31:07 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195947 Archived-At: clemera@posteo.net writes: > I don't know anything about the C side of Emacs so I can't be of any > help here. I'm not quite sure where to bind the variable... Does the following work for you? diff --git a/src/callint.c b/src/callint.c index f80436f3d9..a01338dfe1 100644 --- a/src/callint.c +++ b/src/callint.c @@ -283,6 +283,8 @@ DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0, Lisp_Object save_real_this_command = Vreal_this_command; Lisp_Object save_last_command = KVAR (current_kboard, Vlast_command); + specbind (Qrecursive_this_command, Vreal_this_command); + if (NILP (keys)) keys = this_command_keys, key_count = this_command_key_count; else diff --git a/src/keyboard.c b/src/keyboard.c index dbca5be91e..ce2b7f1ef4 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11830,6 +11830,11 @@ syms_of_keyboard (void) doc: /* This is like `this-command', except that commands should never modify it. */); Vreal_this_command = Qnil; + DEFSYM (Qrecursive_this_command, "recursive-this-command"); + DEFVAR_LISP ("recursive-this-command", Vrecursive_this_command, + doc: /* This is like `real-this-command', but bound recursively in `call-interactively. */); + Vrecursive_this_command = Qnil; + DEFVAR_LISP ("this-command-keys-shift-translated", Vthis_command_keys_shift_translated, doc: /* Non-nil if the key sequence activating this command was shift-translated. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no