GNU bug report logs - #30309
C-u M-x insert-kbd-macro RET RET inserts many unrelated "bindings" (menu separators?)

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Robert Pluim <rpluim@HIDDEN>; Keywords: confirmed easy; dated Wed, 31 Jan 2018 16:28:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 30309 <at> debbugs.gnu.org:


Received: (at 30309) by debbugs.gnu.org; 16 Apr 2019 07:47:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 16 03:47:48 2019
Received: from localhost ([127.0.0.1]:36219 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hGIol-0003Pn-SX
	for submit <at> debbugs.gnu.org; Tue, 16 Apr 2019 03:47:48 -0400
Received: from mail-ed1-f53.google.com ([209.85.208.53]:43106)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1hGIog-0003PV-Ns
 for 30309 <at> debbugs.gnu.org; Tue, 16 Apr 2019 03:47:43 -0400
Received: by mail-ed1-f53.google.com with SMTP id j20so6807874edq.10
 for <30309 <at> debbugs.gnu.org>; Tue, 16 Apr 2019 00:47:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list
 :date:in-reply-to:message-id:mime-version:content-transfer-encoding;
 bh=ShT2mHpdCle0MTN2zoScPYQmG7oziYPF9VqXAX8hYyY=;
 b=CKPCytIJ1bMkULMXX/MoiQidgT0oIOH1vf50mqBFldMNXEE1TwEong1AH2cBinywVD
 O/QHHXrY82dtkRlvjD449av4Qg+CJria/IakXyZB7MeBBU/m7cPVnsyaylOW9Q6X83tp
 RtmrhFmn+RhT1Z9Ndu4IkxePARgRL1Marth1YMN0WoZgL/eSCcUuhO+nUtn6WtakanZo
 dgSf9XPNlA6nQZJqmBGuieKNuILSbjwWm+r0NMvctu0zcTf3k0fhBQnbJdFilH/NZfrE
 J1g+cfYzIWEzWun7N4gHq3QIsD4cQMNCAAhaVJ9heBYpaByUnT7tfxk9EvPf901JksUc
 QZ2g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to
 :gmane-reply-to-list:date:in-reply-to:message-id:mime-version
 :content-transfer-encoding;
 bh=ShT2mHpdCle0MTN2zoScPYQmG7oziYPF9VqXAX8hYyY=;
 b=VDs1LrtHLqrjLD9CWvmNWN3vRFGhx6OF3WoD2cA4Y/veTs8hRSXFUf1VHmMJc+HFlT
 TqqF9LNGjcfjSFOMj31Od3+4PcV/93I9IeCKPLHE3gkleNoKgGcdXEGR77EcrhywQx7H
 rV5HcginfbizKz9yA4QSL09yKx4XM4pNz6CUBFccZPmqpK29x6Xohz9ahikTah2hzylF
 MJeTxxG/QcB7TBhSKfeN1kmCJQlBJARsELG4Yx/pZJhme6kUk1tPsYb6+Qy8bZ9+6Qwj
 8q3+2zHHAWpvgPjRvlQ3I7OHBWVSu9p2Y3qSSWLwym3UsTFoOdH3mq4bKXKIcWhUa8Ez
 eEYg==
X-Gm-Message-State: APjAAAV92KWemKHwqveda+fxdIhSkfmSJTVnSYLP/YQ3Ozl3Qu8L8ejE
 zAfGU5nwWhCFyHiIIV+d+7SN8Hsq
X-Google-Smtp-Source: APXvYqyf7TQg/2lsY5845VZDymtg8/3IRrRJkYOjwdActwI3++54oBytL2B5AyjGaXGmN6EMvMuFNw==
X-Received: by 2002:a50:a4aa:: with SMTP id w39mr50754528edb.206.1555400856304; 
 Tue, 16 Apr 2019 00:47:36 -0700 (PDT)
Received: from rpluim-mac ([149.5.228.1])
 by smtp.gmail.com with ESMTPSA id o58sm12461486edc.74.2019.04.16.00.47.34
 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);
 Tue, 16 Apr 2019 00:47:35 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#30309: Surprising behaviour of insert-kbd-macro
References: <87inbit2nm.fsf@HIDDEN> <87vafbdj6i.fsf@HIDDEN>
 <m2a7lr0xno.fsf@HIDDEN>
 <CAM-tV-9P-fjsOSUJ+Vr=T4_-hrXcak-Hh34nmJXOjsO=zRAGPA@HIDDEN>
 <m2y34xg1ob.fsf@HIDDEN> <87pnpmztl4.fsf@HIDDEN>
X-Debbugs-No-Ack: yes
Mail-Copies-To: never
Gmane-Reply-To-List: yes
Date: Tue, 16 Apr 2019 09:47:34 +0200
In-Reply-To: <87pnpmztl4.fsf@HIDDEN> (Noam Postavsky's message of "Mon, 15
 Apr 2019 20:23:19 -0400")
Message-ID: <m2o9564cix.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 30309
Cc: 30309 <at> debbugs.gnu.org, Noam Postavsky <npostavs@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Mon, 15 Apr 2019 20:23:19 -0400, Noam Postavsky <npostavs@HIDDEN=
m> said:

    Noam> Robert Pluim <rpluim@HIDDEN> writes:
    >> That would work as well. Something like this (utterly untested
    >> beyond 'insert-kbd-macro'):

    >> DEFUN ("where-is-internal", Fwhere_is_internal,
    >> Swhere_is_internal, 1, 5, 0, doc: /* Return list of keys that
    >> invoke DEFINITION.  +If DEFINITION is nil, return nil.

    >> + if (NILP (definition)) + return Qnil; +

    Noam> Hmm, on the one hand no keys invoke 'nil', so returning nil
    Noam> in that situation is already covered by the current
    Noam> docstring (and doing something else could be considered a
    Noam> plain bug).  On the other hand, I see it returns keys for
    Noam> which (define-key global-map KEY nil) was called, which is
    Noam> potentially useful.  I don't know if anything uses that, but
    Noam> I hesitate to remove the capability.

I don=CA=BCt know either, so best leave it alone.

    Noam> By the way, I noticed the diff below also fixes this bug,
    Noam> although I don't quite understand why.

That results in

    (setq last-kbd-macro
       nil)
    (global-set-key [S-down-mouse-1] 'last-kbd-macro)
    (global-set-key [horizontal-scroll-bar drag-mouse-1] 'last-kbd-macro)
    (global-set-key [horizontal-scroll-bar mouse-1] 'last-kbd-macro)
    (global-set-key [vertical-scroll-bar drag-mouse-1] 'last-kbd-macro)
    (global-set-key [vertical-scroll-bar mouse-1] 'last-kbd-macro)

which I guess is better, but not perfect.

Robert




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30309; Package emacs. Full text available.

Message received at 30309 <at> debbugs.gnu.org:


Received: (at 30309) by debbugs.gnu.org; 16 Apr 2019 00:23:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 15 20:23:29 2019
Received: from localhost ([127.0.0.1]:35863 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hGBsn-0003Nj-5z
	for submit <at> debbugs.gnu.org; Mon, 15 Apr 2019 20:23:29 -0400
Received: from mail-qk1-f170.google.com ([209.85.222.170]:35970)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1hGBsk-0003NV-WD
 for 30309 <at> debbugs.gnu.org; Mon, 15 Apr 2019 20:23:27 -0400
Received: by mail-qk1-f170.google.com with SMTP id k130so11100707qke.3
 for <30309 <at> debbugs.gnu.org>; Mon, 15 Apr 2019 17:23:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=/dYAUBnufrgsOeAocjSmSqwC1KBpQu/ydIsSOHSUQSs=;
 b=J/hrTFxmbBBjbUocYQ/qK8StvIu7NdrmmPMpafeITmtG+UJ/iTLE9xpO3FA676s0u7
 8qXnorsOTfbkDDZaXQppNyI8T0/vnOmn+Yr0WUmxJXxvwzZ6EuyncTQrOgE4BPQ5Nape
 ACzf/MiIylwdx0qYW/wEDYGTnpdewv86m9dfp3PJOMv4cdC3ShKi1007pEqMwfPOBgV6
 ZzUD1QhDUpRboe0EbEYHk55cQZeQMh61kMZwRRuoIq1Z0wTm/ekyGxLRA7FbrdbAb81n
 BYOpZr1OeEL5f+TCD10XesnjIKD/Av8E/B93VWHb15OZAxNhh5xao19NElFMUQAohhL7
 wr2A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=/dYAUBnufrgsOeAocjSmSqwC1KBpQu/ydIsSOHSUQSs=;
 b=AxQnDOvGFHa0eOStn8pzNipMqpVA/YlY0ovT6U5JZZALOsVJQXj9hYSH3q9c6LX6fR
 K8SrLr1atWx94LmvJyyGWMbEIfMuFuQY35DkYR+9JxalMnzZOSodX5sHPmKdng52NS8+
 qRxVtYfZHRfhJyKWFaef6MfpipznSgph08FZgT7r+qraU8V8KlXTAP490t/7vE7vtVo4
 sSuWH24oWtNu9KXQK/gFdloIB3GRvuveXHpaDsGv5DqB61J3yTggYgv305/bHPoiHNrx
 qD+5AYXPHWJMjLkT4fhAajOK4XUz1DTNkVe2tBEYylPE+9FNMWlIOm/KTFBOfvwRBotn
 wLqQ==
X-Gm-Message-State: APjAAAXcSFNbxmvm24oApKFMhITrSkECDVV+QZtGIcD6IY+zdftXHpvf
 A+5cJROcaGfADMiVVVXIieK8K2wr
X-Google-Smtp-Source: APXvYqyS+jHcaPraxEGHFE6oNi4MBOydNFCjloRL/CNgYJTiTIBs6zuZBfVSmCjYEzn6bXVTwbqbLw==
X-Received: by 2002:a05:620a:15c4:: with SMTP id
 o4mr57966495qkm.175.1555374201454; 
 Mon, 15 Apr 2019 17:23:21 -0700 (PDT)
Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 b7sm28516075qkc.47.2019.04.15.17.23.20
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 15 Apr 2019 17:23:20 -0700 (PDT)
From: Noam Postavsky <npostavs@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#30309: Surprising behaviour of insert-kbd-macro
References: <87inbit2nm.fsf@HIDDEN> <87vafbdj6i.fsf@HIDDEN>
 <m2a7lr0xno.fsf@HIDDEN>
 <CAM-tV-9P-fjsOSUJ+Vr=T4_-hrXcak-Hh34nmJXOjsO=zRAGPA@HIDDEN>
 <m2y34xg1ob.fsf@HIDDEN>
Date: Mon, 15 Apr 2019 20:23:19 -0400
In-Reply-To: <m2y34xg1ob.fsf@HIDDEN> (Robert Pluim's message of "Fri, 29
 Mar 2019 16:06:44 +0100")
Message-ID: <87pnpmztl4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 30309
Cc: 30309 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Robert Pluim <rpluim@HIDDEN> writes:

> That would work as well. Something like this (utterly untested beyond
> 'insert-kbd-macro'):

>  DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0,
>         doc: /* Return list of keys that invoke DEFINITION.
> +If DEFINITION is nil, return nil.

> +  if (NILP (definition))
> +    return Qnil;
> +

Hmm, on the one hand no keys invoke 'nil', so returning nil in that
situation is already covered by the current docstring (and doing
something else could be considered a plain bug).  On the other hand, I
see it returns keys for which (define-key global-map KEY nil) was
called, which is potentially useful.  I don't know if anything uses
that, but I hesitate to remove the capability.

By the way, I noticed the diff below also fixes this bug, although I
don't quite understand why.

--- i/lisp/macros.el
+++ w/lisp/macros.el
@@ -127,7 +127,7 @@ (defun insert-kbd-macro (macroname &optional keys)
     (insert ")\n")
     (if keys
         (let ((keys (or (where-is-internal (symbol-function macroname)
-                                           '(keymap))
+                                           '(keymap) nil t)
                         (where-is-internal macroname '(keymap)))))
 	  (while keys
 	    (insert "(global-set-key ")





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30309; Package emacs. Full text available.

Message received at 30309 <at> debbugs.gnu.org:


Received: (at 30309) by debbugs.gnu.org; 29 Mar 2019 15:06:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 29 11:06:56 2019
Received: from localhost ([127.0.0.1]:35969 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9t5q-0002zc-7x
	for submit <at> debbugs.gnu.org; Fri, 29 Mar 2019 11:06:54 -0400
Received: from mail-wm1-f41.google.com ([209.85.128.41]:40814)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1h9t5o-0002zM-BA
 for 30309 <at> debbugs.gnu.org; Fri, 29 Mar 2019 11:06:52 -0400
Received: by mail-wm1-f41.google.com with SMTP id z24so3217441wmi.5
 for <30309 <at> debbugs.gnu.org>; Fri, 29 Mar 2019 08:06:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list
 :date:in-reply-to:message-id:mime-version;
 bh=rkh4DGcBl76/T7fp/7RO0lzaubORu1PgsKzPJGfMvEA=;
 b=aoXN7Br/1o2aikRJ0VzqN/83LJe60DUJ46er1wI89kNWYCqhcbRAhv2P7TPM36zc7b
 TeyTaelW1vwEfSFvOYvztERiNF+msG9N2W/BT3M9aRsJbJN1MFI/iuizFo8UmmUAxFZw
 ZR3S7Ux2d0003Vk9aJbUw0utDCeBCg/RR21o8meV7vAKJU8nqc9M+2a3BsPbnBBca9zm
 V5wSNtDXyR0P8D8+ojnjUR5DZdwiSKjf5ET2+6MFb2BG8/xqw6IJTzuypC6B/7z3w9Bk
 P4ixC79rz1bdGC2Ti1QYABhhEUN7walZJbQGyLexM1+5jRuPVL+mHiZGrQYu+71g8tUU
 QJfA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to
 :gmane-reply-to-list:date:in-reply-to:message-id:mime-version;
 bh=rkh4DGcBl76/T7fp/7RO0lzaubORu1PgsKzPJGfMvEA=;
 b=EOQgoisReEc/ddRkORzC0D9KfVICif60XpqHtRdvaxAJZwpeOVNyk5NKisHhfyyFgh
 VbcfGNSDBqUha3swpVn18pkCKZU9guHbCBAci8dnZqS2+oL6yxe5z339WhgerGlogCOv
 rF2Hhgk/Mir1F7RVd5k+GcUJhwTXZhCBQllIGqc0KDJyCJ7onWBmQ8sFF8n/CyGHmufR
 ar7KOx5JI5xgqcRpKPJFiq3Z4wnQs3CXzbXmFEPEkwv8kWpCOrIVlyklXPfnLpsxEZbg
 bo8wOUWUYGzyNqK0YYuFwgA5GtbinxReWwi4ZSAeW1XGJpjYHnokHQaGH4cSfUh/cy8L
 ATXA==
X-Gm-Message-State: APjAAAU/ldTurQxhzrpgW94OifDdPeEeTHrqNPAXdiy7cGIKecGO0vGj
 ZpdcrfV3I/dio3Y4q4xdkpgO4zKz
X-Google-Smtp-Source: APXvYqyGU/geFqEkps9SVvRSsUvp982Y3pGa4+uI4/cGMU8Pi5mS0gQFm7h9gfShC6QRlHpIBBV0Ig==
X-Received: by 2002:a1c:9cc1:: with SMTP id f184mr4075223wme.150.1553872006147; 
 Fri, 29 Mar 2019 08:06:46 -0700 (PDT)
Received: from rpluim-mac ([149.5.228.1])
 by smtp.gmail.com with ESMTPSA id e1sm4028833wrw.66.2019.03.29.08.06.44
 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);
 Fri, 29 Mar 2019 08:06:44 -0700 (PDT)
From: Robert Pluim <rpluim@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#30309: Surprising behaviour of insert-kbd-macro
References: <87inbit2nm.fsf@HIDDEN> <87vafbdj6i.fsf@HIDDEN>
 <m2a7lr0xno.fsf@HIDDEN>
 <CAM-tV-9P-fjsOSUJ+Vr=T4_-hrXcak-Hh34nmJXOjsO=zRAGPA@HIDDEN>
X-Debbugs-No-Ack: yes
Mail-Copies-To: never
Gmane-Reply-To-List: yes
Date: Fri, 29 Mar 2019 16:06:44 +0100
In-Reply-To: <CAM-tV-9P-fjsOSUJ+Vr=T4_-hrXcak-Hh34nmJXOjsO=zRAGPA@HIDDEN>
 (Noam Postavsky's message of "Fri, 29 Mar 2019 10:16:50 -0400")
Message-ID: <m2y34xg1ob.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 30309
Cc: 30309 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>>> On Fri, 29 Mar 2019 10:16:50 -0400, Noam Postavsky <npostavs@HIDDEN> said:

    Noam> On Fri, 30 Nov 2018 at 03:37, Robert Pluim <rpluim@HIDDEN> wrote:
    >> So I guess just checking for last-kbd-macro should be enough,
    >> since that should never have a legitimate key binding.

    Noam> I think avoiding passing nil to where-is-internal would be
    Noam> cleaner (or else stop where-is-internal from looking for
    Noam> bindings of nil). And it would handle the non-interactive
    Noam> case of

    Noam> (insert-kbd-macro 'something-not-fbound t)

That would work as well. Something like this (utterly untested beyond
'insert-kbd-macro'):

diff --git a/src/keymap.c b/src/keymap.c
index 2ac3d33460..2e9f3d5a96 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2489,6 +2489,7 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps,
 
 DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0,
        doc: /* Return list of keys that invoke DEFINITION.
+If DEFINITION is nil, return nil.
 If KEYMAP is a keymap, search only KEYMAP and the global keymap.
 If KEYMAP is nil, search all the currently active keymaps, except
  for `overriding-local-map' (which is ignored).
@@ -2536,6 +2537,9 @@ The optional 5th arg NO-REMAP alters how command remapping is handled:
   bool remapped = 0;
   Lisp_Object tem = Qnil;
 
+  if (NILP (definition))
+    return Qnil;
+
   /* Refresh the C version of the modifier preference.  */
   where_is_preferred_modifier
     = parse_solitary_modifier (Vwhere_is_preferred_modifier);




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30309; Package emacs. Full text available.

Message received at 30309 <at> debbugs.gnu.org:


Received: (at 30309) by debbugs.gnu.org; 29 Mar 2019 14:17:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 29 10:17:12 2019
Received: from localhost ([127.0.0.1]:35939 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1h9sJf-0001p9-C2
	for submit <at> debbugs.gnu.org; Fri, 29 Mar 2019 10:17:07 -0400
Received: from mail-oi1-f172.google.com ([209.85.167.172]:33119)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1h9sJd-0001od-Uv
 for 30309 <at> debbugs.gnu.org; Fri, 29 Mar 2019 10:17:06 -0400
Received: by mail-oi1-f172.google.com with SMTP id e5so1787103oii.0
 for <30309 <at> debbugs.gnu.org>; Fri, 29 Mar 2019 07:17:05 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=SQk9Of9I12lTRKYnJOI8aiCVSeoQxHaebfO1J5SQrVw=;
 b=kfFus6yB9fdKPrlxgWHSpBoYRr3ZZPK5JmzxJxCfcYH8wEYOYqrRttfafWdwmpLgBK
 ibWcnCMKrqB3P/UqQb0W5+O0Z9wf0+wSxyiuXgMhaQNXinoKq5CCpZ/8EJiOqt+RsgL7
 UWUbtLTpmPlLFPUIQpUaze1tVlsbvKXzkLpsQxUBgjyZC4RzQR1mnzQ3qV7P0MCzapz3
 XOJm2QKlpi5UBwj9FJpWkFsALE6XoMHyuU/DuvPNZMnmB7ToIThrffRY802ObxXpv4XV
 yP+J3CGd2kbLcvgL5HWLFURMxbL++CIlK2nfRNz6qcqBCb5kstBXjrIY1KB+FleBsZRP
 npIg==
X-Gm-Message-State: APjAAAW9q/J7lX8vU8o0cwXijR6b6YN8iqzf59J9ipEGV1NL3SZJ98B9
 Qt9wgFOeQSFa7NE1LzPPn3XKKY2norWXZhcl2Yw=
X-Google-Smtp-Source: APXvYqzF12JsKMIOG/OaWk8LsHQpXFcTWPBAlGAYerJu0xkF3VcaADNsxXveNj3V9usrGzWrVga3oeF8N0j03hrTSRU=
X-Received: by 2002:aca:bbc3:: with SMTP id l186mr3885195oif.23.1553869020343; 
 Fri, 29 Mar 2019 07:17:00 -0700 (PDT)
MIME-Version: 1.0
References: <87inbit2nm.fsf@HIDDEN> <87vafbdj6i.fsf@HIDDEN>
 <m2a7lr0xno.fsf@HIDDEN>
In-Reply-To: <m2a7lr0xno.fsf@HIDDEN>
From: Noam Postavsky <npostavs@HIDDEN>
Date: Fri, 29 Mar 2019 10:16:50 -0400
Message-ID: <CAM-tV-9P-fjsOSUJ+Vr=T4_-hrXcak-Hh34nmJXOjsO=zRAGPA@HIDDEN>
Subject: Re: bug#30309: Surprising behaviour of insert-kbd-macro
To: Robert Pluim <rpluim@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 30309
Cc: 30309 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Fri, 30 Nov 2018 at 03:37, Robert Pluim <rpluim@HIDDEN> wrote:

> So I guess just checking for last-kbd-macro should be enough, since
> that should never have a legitimate key binding.

I think avoiding passing nil to where-is-internal would be cleaner (or
else stop where-is-internal from looking for bindings of nil). And it
would handle the non-interactive case of

(insert-kbd-macro 'something-not-fbound t)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30309; Package emacs. Full text available.

Message received at 30309 <at> debbugs.gnu.org:


Received: (at 30309) by debbugs.gnu.org; 30 Nov 2018 08:36:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Nov 30 03:36:55 2018
Received: from localhost ([127.0.0.1]:55497 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gSeIB-0000Gm-9q
	for submit <at> debbugs.gnu.org; Fri, 30 Nov 2018 03:36:55 -0500
Received: from mail-wr1-f48.google.com ([209.85.221.48]:39614)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1gSeI9-0000GX-AS
 for 30309 <at> debbugs.gnu.org; Fri, 30 Nov 2018 03:36:53 -0500
Received: by mail-wr1-f48.google.com with SMTP id t27so4417725wra.6
 for <30309 <at> debbugs.gnu.org>; Fri, 30 Nov 2018 00:36:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list
 :date:in-reply-to:message-id:mime-version;
 bh=EUCD2uh5UEh+EqR57IK9NunpFxSkTmir9xsbplhPEfA=;
 b=gTDqaJj+BihEFR5kjUZ84wV151OB3TaNCCMtGX2mJXnwhvUWUxY0J/biixKChMoInv
 jTvQFO/+Altr0xIKGGz02JUJYMirGD2qdbZKsV4iDvo0/x2lsjuLbIqBkH9Zn57l7MU1
 vk8AhjG/x2r0oHPEvbR3wD8rYWb+4JkdzGWKh6xdTJ+D0vwUYJ1enmCNooCtqMr/elXo
 3JCrQ8tFG8hxFZbV0hPO/DTKXDXA+VOQsTMObvKstuoGHQcFiQJp8okMXxdvP6oO89Jx
 4uoaPltRgWlkhn/Dl/MBlSYIAL5AvDOHy5MagBAVFMiUG6EKoxDD0oblIzaUNoQwbsXk
 2BxA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to
 :gmane-reply-to-list:date:in-reply-to:message-id:mime-version;
 bh=EUCD2uh5UEh+EqR57IK9NunpFxSkTmir9xsbplhPEfA=;
 b=sEL2mp1XQuW63s4O5ERCOUpa1eFr9ACwGeHnifYywZ7jC1l4BNyarY4JRQZpINx8Hu
 +PadBilZ3VmowPvnREF4M8tEZp4QoZxVUJIMIkmuQKO6IYkJYf1Mlc6L0PPF3U/g7vik
 b9/bGOFgIx0vCRmMlr5+gBg61WtfIdJW2FoTUC66gqUxlqJ4t8udVDhlOulL8qM01IlS
 jXJC+ZRGDMWTwQFTqxmdr1eSvVHMYrpVWZIAXucB427jEa2PRYzPFqAPSwjJPnCjevjz
 Ynp9FLmy8um4Q/RtMpXNgrKt2N0DRR+RE9MGXi28bk45o7PBMv97lg6uzN/1OExkiF6p
 ENzA==
X-Gm-Message-State: AA+aEWYtyIJ1XT+cQY5IP7vyPxPeKSrZW5orG5qGFRQlKbwGrhLo9vsx
 YVLtAwaSwkL0WZ2Vdb8+QhFel2RKWYI=
X-Google-Smtp-Source: AFSGD/V+Qiu5JoMe4MbeEmTAt6MJQXcHC/OAC0UPf/Kh/3kPU0wajAAMYqa9GRTbopFs6nu7HT6H7w==
X-Received: by 2002:a5d:5443:: with SMTP id w3mr3825850wrv.4.1543567007079;
 Fri, 30 Nov 2018 00:36:47 -0800 (PST)
Received: from rpluim-mac ([149.5.228.1])
 by smtp.gmail.com with ESMTPSA id y34sm10251870wrd.68.2018.11.30.00.36.45
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Fri, 30 Nov 2018 00:36:46 -0800 (PST)
From: Robert Pluim <rpluim@HIDDEN>
To: Noam Postavsky <npostavs@HIDDEN>
Subject: Re: bug#30309: Surprising behaviour of insert-kbd-macro
References: <87inbit2nm.fsf@HIDDEN> <87vafbdj6i.fsf@HIDDEN>
X-Debbugs-No-Ack: yes
Mail-Copies-To: never
Gmane-Reply-To-List: yes
Date: Fri, 30 Nov 2018 09:36:43 +0100
In-Reply-To: <87vafbdj6i.fsf@HIDDEN> (Noam Postavsky's message
 of "Mon, 05 Feb 2018 20:02:29 -0500")
Message-ID: <m2a7lr0xno.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 30309
Cc: 30309 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Noam Postavsky <npostavs@HIDDEN> writes:

> tags 30309 + confirmed easy
> retitle 30309 C-u M-x insert-kbd-macro RET RET inserts many unrelated "bindings" (menu separators?)
> quit
>
> Robert Pluim <rpluim@HIDDEN> writes:
>
>> #emacs-26
>> emacs -Q
>> C-u M-x insert-kbd-macro RET RET
>> =>
>> (setq last-kbd-macro
>>    nil)
>> (global-set-key [C-down-mouse-2 s2] 'last-kbd-macro)
>> (global-set-key [C-down-mouse-2 s1] 'last-kbd-macro)
>> (global-set-key [menu-bar help-menu sep1] 'last-kbd-macro)
> [...]
>
> Yeah, I guess no keybindings should be inserted in that case.

So I guess just checking for last-kbd-macro should be enough, since
that should never have a legitimate key binding.

diff --git i/lisp/macros.el w/lisp/macros.el
index 4078b983ec..53a688a367 100644
--- i/lisp/macros.el
+++ w/lisp/macros.el
@@ -125,7 +125,7 @@ insert-kbd-macro
         ;; (kmacro-create [<keys>] 0 "%d").
 	(prin1 definition (current-buffer))))
     (insert ")\n")
-    (if keys
+    (and keys (not (eq macroname 'last-kbd-macro))
         (let ((keys (or (where-is-internal (symbol-function macroname)
                                            '(keymap))
                         (where-is-internal macroname '(keymap)))))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30309; Package emacs. Full text available.
Changed bug title to 'C-u M-x insert-kbd-macro RET RET inserts many unrelated "bindings" (menu separators?)' from 'Surprising behaviour of insert-kbd-macro' Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) easy and confirmed. Request was from Noam Postavsky <npostavs@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 30309 <at> debbugs.gnu.org:


Received: (at 30309) by debbugs.gnu.org; 6 Feb 2018 01:02:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 05 20:02:41 2018
Received: from localhost ([127.0.0.1]:59252 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1eirej-0004it-Ai
	for submit <at> debbugs.gnu.org; Mon, 05 Feb 2018 20:02:41 -0500
Received: from mail-io0-f180.google.com ([209.85.223.180]:40707)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>)
 id 1eiref-0004iZ-9A; Mon, 05 Feb 2018 20:02:39 -0500
Received: by mail-io0-f180.google.com with SMTP id t22so704303ioa.7;
 Mon, 05 Feb 2018 17:02:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=1MZUlFoz/ZsHlxqYvIlcAzgKesyV9n7W9WIIFMcZDB0=;
 b=LE3SbDypijDqtOzzfLfCoLu9RHl91n6r70MKmTJF/fp+t5SbTXKQXRfEfc82PO3xdT
 CdtXpzS1Xw3hWmdJxpHOdOUh8K4wlkRRo7F/F2C2ENdIhdhHKuq7rOBF5Lt114p9xRkk
 0zqvOupFY+oF2Rb61XWmY3jm1biwb8n8YBgAHca4MzYVIaRND7rDkxGj7HRgJKr4ATUp
 v4jO9zHtIlTG8xpS3we1Q2Oky8ZqVPT27swMeq/D4j2MpJCbi5Z2R0MaJFhfZiY6Eh0w
 V+g6Jofg9AK9jsds4HQPAYKgMTqcvV1JdtQzPCBvqdhQlM5hIFijq6LsLj4/OOUXyn02
 zetg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=1MZUlFoz/ZsHlxqYvIlcAzgKesyV9n7W9WIIFMcZDB0=;
 b=VH/5ajT9pL6mPTQ9lke3jxRMQHbicSZbA4Xk9ixHSSpb9g6F6dzYmTpyawPQ07jVat
 dWemR4FYkqgQLPMfpyNhp/5ZI1S5c5k2czLEKrlBViCIvq24D4VdO6qprbaSs4fkxmoV
 32N1i6GfUe7oMfN7EaVtcr7ZzP+7CcVFj7bjhyQS/bnTUmBhIiNcTIzMd8tK/2vzkAZD
 2PrxNSjvyTTviyn8baFFt+ez/hTgV8LQwry+BTdmk9Pq1icQGtGgMsB0c2VNc6n9i3So
 YMyUZxS0uAZZ3moAwKw1DuBbsxtjeHWKZ7ovuWdJTYyAmvkjsMFJqiNFJsT94kKZUvOQ
 eW9g==
X-Gm-Message-State: APf1xPCMU4tShjZJeEPQgYBl8uvTh1u0CjPl7s9m7Fai5kQ6wFaxN8SK
 OplvWVqv1O3dSLDzAQZJApP1Xg==
X-Google-Smtp-Source: AH8x226PcFK3A1byoMyi5kZVYosC7GgJaOWwVGuHREQVMDdAfQGOATxtGLzqv+NVJhp6q8n3LsN7MA==
X-Received: by 10.107.59.87 with SMTP id i84mr814095ioa.99.1517878951498;
 Mon, 05 Feb 2018 17:02:31 -0800 (PST)
Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34])
 by smtp.googlemail.com with ESMTPSA id
 f7sm5939323ioe.81.2018.02.05.17.02.30
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 05 Feb 2018 17:02:30 -0800 (PST)
From: Noam Postavsky <npostavs@HIDDEN>
To: 30309 <at> debbugs.gnu.org
Subject: Re: bug#30309: Surprising behaviour of insert-kbd-macro
References: <87inbit2nm.fsf@HIDDEN>
Date: Mon, 05 Feb 2018 20:02:29 -0500
In-Reply-To: <87inbit2nm.fsf@HIDDEN> (Robert Pluim's message of "Wed, 31
 Jan 2018 17:26:53 +0100")
Message-ID: <87vafbdj6i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 30309
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.2 (/)

tags 30309 + confirmed easy
retitle 30309 C-u M-x insert-kbd-macro RET RET inserts many unrelated "bindings" (menu separators?)
quit

Robert Pluim <rpluim@HIDDEN> writes:

> #emacs-26
> emacs -Q
> C-u M-x insert-kbd-macro RET RET
> =>
> (setq last-kbd-macro
>    nil)
> (global-set-key [C-down-mouse-2 s2] 'last-kbd-macro)
> (global-set-key [C-down-mouse-2 s1] 'last-kbd-macro)
> (global-set-key [menu-bar help-menu sep1] 'last-kbd-macro)
[...]

Yeah, I guess no keybindings should be inserted in that case.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#30309; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Jan 2018 16:27:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 31 11:27:19 2018
Received: from localhost ([127.0.0.1]:51421 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1egvEF-0007Nw-HZ
	for submit <at> debbugs.gnu.org; Wed, 31 Jan 2018 11:27:19 -0500
Received: from eggs.gnu.org ([208.118.235.92]:58111)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1egvED-0007Nh-9n
 for submit <at> debbugs.gnu.org; Wed, 31 Jan 2018 11:27:17 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rpluim@HIDDEN>) id 1egvE5-00051a-9z
 for submit <at> debbugs.gnu.org; Wed, 31 Jan 2018 11:27:11 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
 TVD_SPACE_RATIO,T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:51071)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <rpluim@HIDDEN>) id 1egvE5-00051S-5s
 for submit <at> debbugs.gnu.org; Wed, 31 Jan 2018 11:27:09 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49053)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rpluim@HIDDEN>) id 1egvDv-0006IE-T8
 for bug-gnu-emacs@HIDDEN; Wed, 31 Jan 2018 11:27:08 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rpluim@HIDDEN>) id 1egvDt-0004yT-76
 for bug-gnu-emacs@HIDDEN; Wed, 31 Jan 2018 11:26:59 -0500
Received: from mail-wr0-x235.google.com ([2a00:1450:400c:c0c::235]:40861)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <rpluim@HIDDEN>) id 1egvDs-0004xt-Sy
 for bug-gnu-emacs@HIDDEN; Wed, 31 Jan 2018 11:26:57 -0500
Received: by mail-wr0-x235.google.com with SMTP id i56so15636332wra.7
 for <bug-gnu-emacs@HIDDEN>; Wed, 31 Jan 2018 08:26:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:mail-copies-to:gmane-reply-to-list:date:message-id
 :user-agent:mime-version;
 bh=cef5JIxNFCiz+1m0XrKGoiKRZIifJ0rg/zkxWOZ1MTg=;
 b=FYnbAInwf0E19oMwOtKJM4ZHjVD+8162Y3ywecspVmK50gpaIn+nNDPI2myeDpoh8Z
 ECYGnVPywMtFWOixXx8R9US2tbwATodazcewVTiT1Jj+mYRaOC/8FhFrRJKaC3QefN+P
 9BdJxgr4j6wTRI7nyCVRgKvu8wRgKHgQYtZu0tEHNuWqaJEhi0sqnN+YNf8fYK+dlImT
 myJ3iCogXBKEnx+s2UYAmNrekkWX3elW/EvmnWxk4IsbPymXpx1Z2OYkyMPWKw5rwVCg
 wWgW3WkdOsfV/rt/qmGdTM0FONfO5VQN9raDJSNxL3etsPuFWGXiXs+CH35MrQ8traev
 dbZA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:mail-copies-to
 :gmane-reply-to-list:date:message-id:user-agent:mime-version;
 bh=cef5JIxNFCiz+1m0XrKGoiKRZIifJ0rg/zkxWOZ1MTg=;
 b=AZz8AQaErOtBqGskYt+kLFMtLU80YqytE8xm37KWUXlP3q6ciHApSv5WMTX3gcWUMq
 V8Dl5ZLQpWiNKLaoKUdCxeydMxZ4ui5bN/ib39bS6Qm92ndgDJxp/sawuyJb0di+C7j+
 pqOgSMS5aOq3VOHJ22KdJhBRhgh5QAMmiv9+tSSXNHVI4XLH9jlS47oFevDvGRW1bflW
 6q36LNvM+1ANimSG5f+n7Q9f20an4gNP3oM68LiGrF4AwC9QQkNDpYMNDF/ePq+F1MQJ
 GhWKeIRReYzhlttEG+odyP6yxx9AoBSmyxC5EB2YPFO1EiolmVzIwl7HKVp2QMqpXBbY
 FcPw==
X-Gm-Message-State: AKwxytf8IWf0AvsZC3xnsWXijfjcz4hcPtLo0MMS5yEF8lD9CI0w3ooN
 AzU/Nu17W+rZ2CJLNfZsuvTfVd2R
X-Google-Smtp-Source: AH8x226Q6muCfdtDRiNsaGCRF+rg8wzHTPpWbc26yyeGIeqpHYSicy1+Jq8relpxaHz6MolglGcRuw==
X-Received: by 10.223.157.6 with SMTP id k6mr13024184wre.273.1517416015170;
 Wed, 31 Jan 2018 08:26:55 -0800 (PST)
Received: from rpluim-ubuntu (vav06-1-78-207-202-134.fbx.proxad.net.
 [78.207.202.134])
 by smtp.gmail.com with ESMTPSA id z81sm101314wmc.32.2018.01.31.08.26.54
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 31 Jan 2018 08:26:54 -0800 (PST)
From: Robert Pluim <rpluim@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Surprising behaviour of insert-kbd-macro
X-Debbugs-No-Ack: yes
Mail-Copies-To: never
Gmane-Reply-To-List: yes
Date: Wed, 31 Jan 2018 17:26:53 +0100
Message-ID: <87inbit2nm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

#emacs-26
emacs -Q
C-u M-x insert-kbd-macro RET RET
=>
(setq last-kbd-macro
   nil)
(global-set-key [C-down-mouse-2 s2] 'last-kbd-macro)
(global-set-key [C-down-mouse-2 s1] 'last-kbd-macro)
(global-set-key [menu-bar help-menu sep1] 'last-kbd-macro)
(global-set-key [menu-bar help-menu sep2] 'last-kbd-macro)
(global-set-key [menu-bar help-menu sep4] 'last-kbd-macro)
(global-set-key [menu-bar file separator-save] 'last-kbd-macro)
(global-set-key [menu-bar file separator-print] 'last-kbd-macro)
(global-set-key [menu-bar file separator-window] 'last-kbd-macro)
(global-set-key [menu-bar file separator-frame] 'last-kbd-macro)
(global-set-key [menu-bar file separator-exit] 'last-kbd-macro)
(global-set-key [menu-bar edit separator-search] 'last-kbd-macro)
(global-set-key [menu-bar edit separator-bookmark] 'last-kbd-macro)
(global-set-key [menu-bar options highlight-separator] 'last-kbd-macro)
(global-set-key [menu-bar options edit-options-separator] 'last-kbd-macro)
(global-set-key [menu-bar options cursor-separator] 'last-kbd-macro)
(global-set-key [menu-bar options debugger-separator] 'last-kbd-macro)
(global-set-key [menu-bar options mule-separator] 'last-kbd-macro)
(global-set-key [menu-bar options showhide-separator] 'last-kbd-macro)
(global-set-key [menu-bar options custom-separator] 'last-kbd-macro)
(global-set-key [menu-bar buffer command-separator] 'last-kbd-macro)
(global-set-key [menu-bar tools separator-prog] 'last-kbd-macro)
(global-set-key [menu-bar tools separator-spell] 'last-kbd-macro)
(global-set-key [menu-bar tools separator-compare] 'last-kbd-macro)
(global-set-key [menu-bar tools separator-vc] 'last-kbd-macro)
(global-set-key [menu-bar tools separator-net] 'last-kbd-macro)
(global-set-key [menu-bar tools separator-encryption-decryption] 'last-kbd-macro)
(global-set-key [menu-bar tools separator-games] 'last-kbd-macro)
(global-set-key [menu-bar help-menu search-documentation sep1] 'last-kbd-macro)
(global-set-key [menu-bar help-menu describe separator-desc-mule] 'last-kbd-macro)
(global-set-key [menu-bar help-menu more-manuals sep2] 'last-kbd-macro)
(global-set-key [menu-bar edit search separator-repeat-search] 'last-kbd-macro)
(global-set-key [menu-bar edit search separator-tag-search] 'last-kbd-macro)
(global-set-key [menu-bar edit search separator-tag-isearch] 'last-kbd-macro)
(global-set-key [menu-bar edit replace separator-replace-tags] 'last-kbd-macro)
(global-set-key [menu-bar edit goto separator-xref] 'last-kbd-macro)
(global-set-key [menu-bar edit goto separator-tag-file] 'last-kbd-macro)
(global-set-key [menu-bar edit props s2] 'last-kbd-macro)
(global-set-key [menu-bar edit props s1] 'last-kbd-macro)
(global-set-key [menu-bar options search-options custom-separator] 'last-kbd-macro)
(global-set-key [menu-bar options mule separator-mule] 'last-kbd-macro)
(global-set-key [menu-bar options mule separator-input-method] 'last-kbd-macro)
(global-set-key [menu-bar options mule separator-coding-system] 'last-kbd-macro)
(global-set-key [menu-bar options showhide datetime-separator] 'last-kbd-macro)
(global-set-key [menu-bar options showhide linecolumn-separator] 'last-kbd-macro)
(global-set-key [menu-bar options customize separator-3] 'last-kbd-macro)
(global-set-key [menu-bar options customize separator-2] 'last-kbd-macro)
(global-set-key [menu-bar options customize separator-1] 'last-kbd-macro)
(global-set-key [menu-bar tools compare separator-ediff-files] 'last-kbd-macro)
(global-set-key [menu-bar tools compare separator-ediff-directories] 'last-kbd-macro)
(global-set-key [menu-bar tools compare separator-ediff-regions] 'last-kbd-macro)
(global-set-key [menu-bar tools compare separator-ediff-windows] 'last-kbd-macro)
(global-set-key [menu-bar tools compare separator-ediff-misc] 'last-kbd-macro)
(global-set-key [menu-bar tools ediff-merge separator-ediff-merge-dirs] 'last-kbd-macro)
(global-set-key [menu-bar tools ediff-merge separator-ediff-merge] 'last-kbd-macro)
(global-set-key [menu-bar tools vc separator2] 'last-kbd-macro)
(global-set-key [menu-bar tools vc separator1] 'last-kbd-macro)
(global-set-key [menu-bar tools directory-search separator-eudc-query] 'last-kbd-macro)
(global-set-key [menu-bar tools directory-search separator-eudc-email] 'last-kbd-macro)
(global-set-key [menu-bar tools encryption-decryption separator-file] 'last-kbd-macro)
(global-set-key [menu-bar tools encryption-decryption separator-keys] 'last-kbd-macro)
(global-set-key [menu-bar options mule set-various-coding-system separator-1] 'last-kbd-macro)
(global-set-key [menu-bar options mule set-various-coding-system separator-2] 'last-kbd-macro)
(global-set-key [menu-bar options mule set-various-coding-system separator-3] 'last-kbd-macro)
(global-set-key [menu-bar options showhide showhide-scroll-bar scrollbar-separator] 'last-kbd-macro)




Report forwarded to bug-gnu-emacs@HIDDEN:
bug#30309; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.