From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#14095: 24.3.50; REGRESSION: `repeat' broken by use of `set-temporary-overlay-map' Date: Sat, 30 Mar 2013 10:13:21 -0700 Message-ID: <0485CA7465A447CEAB3F0CCAFFEF4DDE@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1364663670 9560 80.91.229.3 (30 Mar 2013 17:14:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Mar 2013 17:14:30 +0000 (UTC) To: 14095@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 30 18:14:57 2013 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 1ULzMl-0003eo-IU for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Mar 2013 18:14:55 +0100 Original-Received: from localhost ([::1]:45449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULzMN-0002lR-29 for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Mar 2013 13:14:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULzMD-0002lB-EE for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2013 13:14:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULzMC-0004kJ-3n for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2013 13:14:21 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULzMC-0004kE-0F for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2013 13:14:20 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1ULzOo-0006Xp-8e for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2013 13:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Mar 2013 17:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14095 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.136466378525100 (code B ref -1); Sat, 30 Mar 2013 17:17:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Mar 2013 17:16:25 +0000 Original-Received: from localhost ([127.0.0.1]:52992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ULzOC-0006Wn-V0 for submit@debbugs.gnu.org; Sat, 30 Mar 2013 13:16:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52675) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ULzO9-0006Wc-GX for submit@debbugs.gnu.org; Sat, 30 Mar 2013 13:16:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULzLT-0004d3-83 for submit@debbugs.gnu.org; Sat, 30 Mar 2013 13:13:38 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:55018) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULzLT-0004cz-4p for submit@debbugs.gnu.org; Sat, 30 Mar 2013 13:13:35 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULzLR-0002WE-Hk for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2013 13:13:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULzLQ-0004cP-51 for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2013 13:13:33 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:51916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULzLP-0004cL-UF for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2013 13:13:32 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r2UHDUe1020372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 30 Mar 2013 17:13:31 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r2UHDTQQ017590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 30 Mar 2013 17:13:30 GMT Original-Received: from abhmt105.oracle.com (abhmt105.oracle.com [141.146.116.57]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r2UHDT94006940 for ; Sat, 30 Mar 2013 12:13:29 -0500 Original-Received: from dradamslap1 (/10.159.227.58) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 30 Mar 2013 10:13:29 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac4taeExDDrfsBTRTf2vjYjgW5SmPw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:73018 Archived-At: I believe this regression was introduced at the same time as the regression of bug #12232 (which has been fixed). The change that introduced this problem was to use `set-temporary-overlay-map'. The code for `repeat' before that change, e.g. the code from Emacs 23.4, had this: (when repeat-repeat-char (let (repeat-on-final-keystroke (undo-inhibit-record-point t)) (setq real-last-command 'repeat) (setq repeat-undo-count 1) (unwind-protect (while (let ((evt (read-key))) (eq (or (car-safe evt) evt) (or (car-safe repeat-repeat-char) repeat-repeat-char))) (repeat repeat-arg)) ;; Make sure `repeat-undo-count' is reset. (setq repeat-undo-count nil)) (setq unread-command-events (list last-input-event)))) That was changed to this (the current code): (when repeat-repeat-char (set-temporary-overlay-map ; <=================== (let ((map (make-sparse-keymap))) (define-key map (vector repeat-repeat-char) (if (null repeat-message-function) 'repeat (let ((fun repeat-message-function)) (lambda () (interactive) (let ((repeat-message-function fun)) (setq this-command 'repeat) (setq real-this-command 'repeat) (call-interactively 'repeat)))))) map))) This change breaks the use of `repeat' in the following context, because Isearch uses `overriding-terminal-local-map'. Recipe: emacs -Q (defun isearchp-yank-line () "Yank text from buffer up to end of line onto search string. You can repeat this by hitting the last key again..." (interactive) (require 'repeat nil t) (isearchp-repeat-command 'isearch-yank-line)) (defun isearchp-repeat-command (command) "Repeat COMMAND." (let ((repeat-message-function 'ignore)) (setq last-repeatable-command command) (repeat nil))) (define-key isearch-mode-map (kbd "C-y C-e") 'isearchp-yank-line) C-s C-y C-e C-e C-e That works if the old definition of `repeat' is used. It does not work with the new definition, which uses `set-temporary-overlay-map', because the temporary map is overruled by `overriding(-terminal)-local-map'. Users should be able to use `repeat' in contexts such as this. For Isearch, for example, this lets you put multiple yank commands on the same prefix key (e.g., `C-y'). For instance, I bind 8 yank commands to prefix C-y, 5 of which are repeatable (i.e., they are repeatable in Emacs 22-23 and should also be repeatable in later releases): C-y C-_ isearchp-yank-symbol-or-char C-y C-( isearchp-yank-sexp-symbol-or-char C-y C-2 isearch-yank-secondary C-y C-c isearchp-yank-char C-y C-e isearchp-yank-line C-y C-w isearchp-yank-word-or-char C-y C-y isearch-yank-kill C-y M-y isearch-yank-pop (FWIW/FYI: It took me quite a while to figure out why this was not working.) In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600) of 2013-03-23 on VBOX Bzr revision: 112115 eliz@gnu.org-20130323093300-rjs0dgskxm9u0ya4 Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.7) --no-opt --enable-checking --cflags -IC:/emacs/libs/libXpm-3.5.10/include -IC:/emacs/libs/libXpm-3.5.10/src -IC:/emacs/libs/libpng-dev_1.4.3-1_win32/include -IC:/emacs/libs/zlib-dev_1.2.5-2_win32/include -IC:/emacs/libs/giflib-4.1.4-1-lib/include -IC:/emacs/libs/jpeg-6b-4-lib/include -IC:/emacs/libs/tiff-3.8.2-1-lib/include -IC:/emacs/libs/libxml2-2.7.8-w32-bin/include/libxml2 -IC:/emacs/libs/gnutls-3.1.10-w32/include -IC:/emacs/libs/libiconv-1.14-2-mingw32-dev/include'