From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Q: How to programatically terminate repeat-mode Date: Sat, 10 Sep 2022 12:41:54 -0700 Message-ID: References: <86r10jghs7.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30271"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 10 21:43:02 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oX6NX-0007db-Sn for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Sep 2022 21:42:59 +0200 Original-Received: from localhost ([::1]:53376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oX6NW-0006Ha-Eq for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Sep 2022 15:42:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oX6Mc-0005cZ-DP for emacs-devel@gnu.org; Sat, 10 Sep 2022 15:42:02 -0400 Original-Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:46801) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oX6MZ-00078A-Ta for emacs-devel@gnu.org; Sat, 10 Sep 2022 15:42:01 -0400 Original-Received: by mail-pl1-x62c.google.com with SMTP id jm11so4817155plb.13 for ; Sat, 10 Sep 2022 12:41:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=N03ndW1076wLr2fZ3V0QXRvtb0BCP4A4k65DTRH5QlU=; b=cIThWqy1HEEVzyZ76scDXbrb+mMYRpC0o/YEMGTPjddZfNvmLqpQ6MxJTJjuFnqKwC QFkfYpy45sqcbN7eOCqMAHKP5AB0Ynj1bOIwNfTN3LFFz8uOcKCw1HThlrQFM4aPeBdV DFf/XrUltRmJ+5t/IBzzvC0J+cjwk/EUr3QF9O0fcjttJPOBx4Jb5PDbkUQad+gYmu3H RFd33UEMb4/IgDzKmcgiBPKFGbiQSnIuwogd5PGURI/yA7i2OEpicTYY5TtvGwSxMW40 WomCx3Q15/ueih39eRwdEvb5YbmYD1bFPQXfj6mzUC51YNF5SMJOftY0ukDcWZPAO3Ab q3JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date; bh=N03ndW1076wLr2fZ3V0QXRvtb0BCP4A4k65DTRH5QlU=; b=Jhzkuj1pLOIcXU1h34HCqP1ejhblYl4HI6g6m9bus/+NZ87qi1BQB+U0TZjeIdnbi9 Iz/nlol8J4EKCm5MO6Ndnde2e+4p2AUrxUOfU3J1hHheKSfOvZgqJwCVaXs7KU+ALEVV c3ZWQT7nDDSJ7rueab78oGN+YG+JyDBL12PKCAzOEeTl/6Eh+OeSUXJJkXbtmEVpKmcM bPS2EgMBL+Pw1QNGKrZOdlPnjXUzpLfJrMKAnmZqNq8za8ywDGIAaD5TH2KPPZ9CMMHi FRWRMFHXYcG2yKxwvGfCqaThrCsYc3Iyh0vIQDqyI0rf7bxgkDOc6tDeBD2g5auXeMrc yilQ== X-Gm-Message-State: ACgBeo1oHSy5nB2wCyK1QYuf5XE+2sVSekiNA9Bfih4ZFyOULPKrlK0W XSMhhvULUtAV477pzDylBvsgUhOYiUOm2A== X-Google-Smtp-Source: AA6agR6EKwu7RB715+UfgfgDrKqrNp6NTwUWCbzzbhNxTzoY9Vgo+rOSpqS4IM93viA4WyYAD/8bYw== X-Received: by 2002:a17:903:40cc:b0:177:e44f:1fff with SMTP id t12-20020a17090340cc00b00177e44f1fffmr17890582pld.133.1662838916822; Sat, 10 Sep 2022 12:41:56 -0700 (PDT) Original-Received: from raman9 (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id k2-20020a6555c2000000b0041c0c9c0072sm2546596pgs.64.2022.09.10.12.41.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Sep 2022 12:41:56 -0700 (PDT) In-Reply-To: <86r10jghs7.fsf@mail.linkov.net> (Juri Linkov's message of "Sat, 10 Sep 2022 22:18:16 +0300") Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=raman@google.com; helo=mail-pl1-x62c.google.com X-Spam_score_int: -175 X-Spam_score: -17.6 X-Spam_bar: ----------------- X-Spam_report: (-17.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:295144 Archived-At: Juri Linkov writes: will try your suggestions. Would be nice to have a simple API to do this. >> I have been using repeat-mode to good effect in emacspeak e.g. in the >> context of its media player etc. >> >> One issue I have is that once a command to stop media has been >> executed, I'd like the repeat to stop i.e. without me executing >> another explicit kbd command like C-g to terminate the repeat. > > The simplest way is just not to put the property 'repeat-map' > on the symbol of the command that stops media. Then executing > this command will terminate the repeat. > >> How do I do this from lisp? > > It's no easy to do the same from Lisp because in repeat-post-hook > the value of 'exitfun' returned from 'set-transient-map' is not > exposed outside. Maybe the value of 'exitfun' should be stored > in a variable? Currently 'exitfun' is used only by repeat-exit-timer. > >> I'd rather not call keyboard-quit explicitly -- that sounds like >> overkill? > > Or you could put 'repeat-exit-key' on 'unread-command-events'. --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =817=A94 Id: kg:/m/0285kf1 =950=DC8