From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#5264: 23.1; `repeat' should not hard-code the set of affected commands Date: Wed, 27 Apr 2016 23:17:43 +0200 Message-ID: <87a8keu4y0.fsf@gnus.org> References: <829F48EB8E68453A956D490A63FD97CB@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1461791907 17113 80.91.229.3 (27 Apr 2016 21:18:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 21:18:27 +0000 (UTC) Cc: 5264@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 27 23:18:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1avWqc-0000Y3-Bj for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 23:18:14 +0200 Original-Received: from localhost ([::1]:45494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avWqY-0003mK-Cr for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 17:18:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avWqU-0003j8-IU for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 17:18:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avWqQ-0007qw-DB for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 17:18:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avWqQ-0007qs-9l for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 17:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1avWqQ-0003KS-3b for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 17:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Apr 2016 21:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5264 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 5264-submit@debbugs.gnu.org id=B5264.146179186812775 (code B ref 5264); Wed, 27 Apr 2016 21:18:02 +0000 Original-Received: (at 5264) by debbugs.gnu.org; 27 Apr 2016 21:17:48 +0000 Original-Received: from localhost ([127.0.0.1]:50814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avWqB-0003Jy-P9 for submit@debbugs.gnu.org; Wed, 27 Apr 2016 17:17:47 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:50639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avWqA-0003Jr-Dq for 5264@debbugs.gnu.org; Wed, 27 Apr 2016 17:17:46 -0400 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1avWq7-0003jV-T4; Wed, 27 Apr 2016 23:17:45 +0200 In-Reply-To: <829F48EB8E68453A956D490A63FD97CB@us.oracle.com> (Drew Adams's message of "Thu, 24 Dec 2009 07:30:20 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) 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:116986 Archived-At: "Drew Adams" writes: > In the definition of command `repeat': > > (if (memq last-repeatable-command > '(exit-minibuffer > minibuffer-complete-and-exit > self-insert-and-exit)) > > This list of affected commands should not be hard-coded. If user code > uses different functions from `exit-minibuffer' and > `minibuffer-complete-and-exit', then users must redefine `repeat' to > accommodate this command difference. The `repeat' definition should > be more flexible than that. > > This list of commands should be treated the same way we treat the list > of dangerous commands (`repeat-too-dangerous'): define a variable > whose value is the list of commands - do not hard-code the list. But what it is this does? If `last-repeatable-command' is any of these commands, then we... repeat the first command in `command-history' instead? What does that do, exactly? (if (memq last-repeatable-command '(exit-minibuffer minibuffer-complete-and-exit self-insert-and-exit)) (let ((repeat-command (car command-history))) (repeat-message "Repeating %S" repeat-command) (eval repeat-command)) (if (null repeat-arg) (repeat-message "Repeating command %S" last-repeatable-command) (setq current-prefix-arg repeat-arg) (repeat-message "Repeating command %S %S" repeat-arg last-repeatable-command)) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no