From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Explanation Request for the Function set-transient-map in subr.el Date: Sun, 28 Nov 2021 14:45:03 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3240"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Help Gnu Emacs To: xenodasein@tutanota.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 28 20:46:23 2021 Return-path: Envelope-to: geh-help-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 1mrQ7z-0000cw-Fk for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 28 Nov 2021 20:46:23 +0100 Original-Received: from localhost ([::1]:42726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrQ7y-0000ji-7E for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 28 Nov 2021 14:46:22 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrQ6q-0000jU-HK for help-gnu-emacs@gnu.org; Sun, 28 Nov 2021 14:45:12 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrQ6n-0004t3-KD for help-gnu-emacs@gnu.org; Sun, 28 Nov 2021 14:45:11 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1815B80488; Sun, 28 Nov 2021 14:45:07 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9A657801D5; Sun, 28 Nov 2021 14:45:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1638128705; bh=NcogCjfIJDIsSBvB3L4fnk88pPWJx0fQOjrtTsGCP6I=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=VpUzItUXMtoOW5laKbcz46+OmND08K/dC0jUJz1BFtRCJSJEbc81pEqmn+fUQKL2Z nVJUys7inarH2MGouaKWJOdXkyPEC95ioKUj/MYiUSEuafV00ePlNWsZXS22kImoy8 UdsZt5PmYT3+eYeNg3JpnJntMntCzsNNkZSyklXJAJBvrQ67cWADjJTrA5vMIDf2Ok V6EVFDsKy9bpHVb7G3kgjwt5uP8QtF2yog05XkZPKU5KpJg5FMSy9KmEok7UUViYyy wo3M+s4903pva6yuZvy0TQOpXdmwWkR0E+QXrtXjkFtxW2NDjKaM0Eo750BjlBGpR/ O3LfOQ2O/KDnA== Original-Received: from ceviche (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4606E12036E; Sun, 28 Nov 2021 14:45:05 -0500 (EST) In-Reply-To: (xenodasein@tutanota.de's message of "Sun, 28 Nov 2021 19:12:56 +0100 (CET)") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:134709 Archived-At: xenodasein@tutanota.de [2021-11-28 19:12:56] wrote: > Thanks for your clarification on isearch issue. >>> ((eq t keep-pred) >>> =A0 (let ((mc (lookup-key map (this-command-keys-vector)))) >>> =A0 ;; If the key is unbound `this-command` is >>> =A0 ;; nil and so is `mc`. >>> =A0=A0=A0 (and mc (eq this-command mc)))) > > I'm still not clear why exactly this expression is used though: (eq this-= command mc). > What are the possible values of mc here on the last line? This tests whether the user typed a key-sequence from `map` as opposed to some other one. E.g. when you use `text-scale-adjust`, you want to "stay" in the transient map as long as the user uses one of the keys in the `map` (basically, +, -, or 0) and if the user types some other key, we immediately/automatically exit from this transient map. Stefan