From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Allen Li Newsgroups: gmane.emacs.bugs Subject: bug#28008: 25.2; Resume kmacro definition errors C-u C-u Date: Fri, 29 Sep 2017 20:47:54 -0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1506743362 19346 195.159.176.226 (30 Sep 2017 03:49:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Sep 2017 03:49:22 +0000 (UTC) Cc: 28008@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 30 05:49:16 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dy8m2-0003rg-Qo for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Sep 2017 05:49:06 +0200 Original-Received: from localhost ([::1]:38016 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dy8mA-00050B-Bo for geb-bug-gnu-emacs@m.gmane.org; Fri, 29 Sep 2017 23:49:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dy8m1-0004zz-Qe for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 23:49:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dy8ly-0001k4-OU for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 23:49:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59402) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dy8ly-0001js-KZ for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 23:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dy8ly-00023r-7p for bug-gnu-emacs@gnu.org; Fri, 29 Sep 2017 23:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Allen Li Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Sep 2017 03:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28008 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28008-submit@debbugs.gnu.org id=B28008.15067432827845 (code B ref 28008); Sat, 30 Sep 2017 03:49:02 +0000 Original-Received: (at 28008) by debbugs.gnu.org; 30 Sep 2017 03:48:02 +0000 Original-Received: from localhost ([127.0.0.1]:39850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dy8l0-00022T-JW for submit@debbugs.gnu.org; Fri, 29 Sep 2017 23:48:02 -0400 Original-Received: from mail-qk0-f177.google.com ([209.85.220.177]:46140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dy8kz-00021z-Ol for 28008@debbugs.gnu.org; Fri, 29 Sep 2017 23:48:02 -0400 Original-Received: by mail-qk0-f177.google.com with SMTP id z143so1369574qkb.3 for <28008@debbugs.gnu.org>; Fri, 29 Sep 2017 20:48:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ldVrFwXf4Mr0anoOgyFwaReQu9pbteZDt7qgUeFPUGM=; b=YoZXM2pE8YX5GKX9rAlUZiJsopgKhqdiPupFhmj6qXfJxZ4bnT4Fx22+MqdAh+qyAG R/RCycF9vEfvfBz3TNged373fwnqd5y2r3rGn3synMfdZdSunZu8Mz5ZhlRMhyPYAkBx B6h+U37xCHj0eD07y3q/s4QwTjDsxoyHi7L/c087aThi2KCCRuzO1f3i3wS74mcbZpFa VHBCqpJU+jrya5eB/FE3K+OfMQPzJ6znJ2LXWnJ6VzRWAOPQuDb2cy4lZn05nr02PkMU rJmAUNgALYw/72s1g+FshuqM2Q+2o1cybtl9TmPEfuGfBfGFf9nxsNF1QPQfKg9jUKrh DWcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ldVrFwXf4Mr0anoOgyFwaReQu9pbteZDt7qgUeFPUGM=; b=mqt/bxbIyUIL5C9PxcNbbWNP4ZEdp7BfxzFU9H9LPWgNe5u5X5T8vOoy9sbwjF1pUl xLR9GtkCw2NTDvYhVK6ZRjgaTXIj6Q9SKEJPJK4u2gulccPIYP2/KOTWMDLSjN8PwovO ZrQUPAR4c9+l0g6SlAWxKqtpXsDSVufMU0cxNRxYYZdltnZa3+YgG9ToPOU9xeaEa1tZ Or2VFucHv+/BscEwRWoj0WRwWzek0xCpT79qBsd/75fbJSgIecyQl3gRwkKsVU24L0L1 Gq4JMOtCdwKPb/7Lpj3SwaX2qGM/FDeKQc8Go6yV2GHoGy2QKJrhVSd+Z6ygGDw6jEGc gzww== X-Gm-Message-State: AMCzsaWaGbqbTF/nEs9IAHh1zOivlJfxnODVB1zcaOMnNeFxQDi7qsgO mz4gQrL6hU75sR7Np7JeE2tzzrsPhX7jYdTAb4g= X-Google-Smtp-Source: AOwi7QCjl/2vezQI7yPNKi3fJg4iYMruXVgqmDjAhoPVSvZAQj6H3gnz72q0vI8oE2x7iMpOW5XUsZh5eomzMmxEN9E= X-Received: by 10.55.144.5 with SMTP id s5mr6290347qkd.63.1506743275226; Fri, 29 Sep 2017 20:47:55 -0700 (PDT) Original-Received: by 10.237.60.196 with HTTP; Fri, 29 Sep 2017 20:47:54 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137662 Archived-At: On Tue, Sep 19, 2017 at 12:42 AM, Allen Li wrote: > Actually, to fix case D.2 (where undefined keys exit kmacro definition > without saving), all that is needed is a short Emacs Lisp change. > This keeps the behavior of a bare C-g keyboard-abort of not saving the > kmacro. > > [PATCH] Make undefined keys exit and save kmacro definition > > * lisp/subr.el (undefined): Error out of kmacro definition. > --- > lisp/subr.el | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/lisp/subr.el b/lisp/subr.el > index 79ae1f4830..f0c4e2969d 100644 > --- a/lisp/subr.el > +++ b/lisp/subr.el > @@ -785,8 +785,9 @@ undefined > "Beep to tell the user this binding is undefined." > (interactive) > (ding) > - (message "%s is undefined" (key-description (this-single-command-keys))) > - (setq defining-kbd-macro nil) > + (if defining-kbd-macro > + (error "%s is undefined" (key-description (this-single-command-keys))) > + (message "%s is undefined" (key-description (this-single-command-keys)))) > (force-mode-line-update) > ;; If this is a down-mouse event, don't reset prefix-arg; > ;; pass it to the command run by the up event. > -- > 2.14.1 Any updates on this? I have been running this patch locally (monkey patched) for a week without any issues.