From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#47566: 28.0.50; diff-hl should use `repeat-mode' ... and not `smartrep' Date: Sun, 4 Apr 2021 01:08:55 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28753"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 To: Ramesh Nedunchezian , 47566@debbugs.gnu.org, Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 04 00:10:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lSoT4-0007Ow-CU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Apr 2021 00:10:10 +0200 Original-Received: from localhost ([::1]:38468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSoT3-0001Hu-DZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Apr 2021 18:10:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSoSw-0001Gd-TA for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2021 18:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51220) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lSoSw-0002B3-MI for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2021 18:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lSoSw-0000LG-FI for bug-gnu-emacs@gnu.org; Sat, 03 Apr 2021 18:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Apr 2021 22:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47566 X-GNU-PR-Package: emacs Original-Received: via spool by 47566-submit@debbugs.gnu.org id=B47566.16174877451246 (code B ref 47566); Sat, 03 Apr 2021 22:10:02 +0000 Original-Received: (at 47566) by debbugs.gnu.org; 3 Apr 2021 22:09:05 +0000 Original-Received: from localhost ([127.0.0.1]:34533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSoS1-0000K2-F0 for submit@debbugs.gnu.org; Sat, 03 Apr 2021 18:09:05 -0400 Original-Received: from mail-wm1-f54.google.com ([209.85.128.54]:39861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lSoRz-0000JY-PT for 47566@debbugs.gnu.org; Sat, 03 Apr 2021 18:09:04 -0400 Original-Received: by mail-wm1-f54.google.com with SMTP id g18-20020a7bc4d20000b0290116042cfdd8so736300wmk.4 for <47566@debbugs.gnu.org>; Sat, 03 Apr 2021 15:09:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kjs9Ge3ojuaoT7oFK7mldpwbA7dIaNlw16MILXQRr6g=; b=TUlOuhRUhMKpydNBvOR8o0+7Gar1Ykav0CE84PqBK7B9Nty5irLt3Vw5RQk+EJnn/+ pGr2A9hnA36jDP/PKFOyaMwcZsEYy8ahYNFLw/pwPI5vOygtPiSBLzy+DdKZDDKFw3oH aCec/nhaTYYxDV49cQpn3WLrlGC46qh3FEDOKDfazb+yfllQzo613zRzABxjNJAhjCWK 2z7VpYFe+PNkPpXCQnQlseITuporwdq0Gtptx1GHGz6PwXL4b0UFhsgisBQlDXJD8nS+ dgaFkRl6o5j0HChz/Ob+Q6fKI3yJbDozarZRhTZgmT0b9tKBGHEfivSpa5mGsV5Zs0Fp 0NzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kjs9Ge3ojuaoT7oFK7mldpwbA7dIaNlw16MILXQRr6g=; b=M0fRC9RmajgSiICiw5BDlRZjbQiMgSf3mFh4z62cYUpzOcIQ7d1WSXszW7MpBBRQ4Z TFly9PvmbWp7/c1xy6t7eEaN241uqs9muryy+5x5/2rFzRxKVggvk1IW2pqdMZGdkGNq AURuLsn5s3p/VVTTY18OpOlsScbi+nU25LbvdSMYHdaBYuKl/raaoiTdJMHdAAlbucR3 3hQQpG4pBx2h8FBQEPkd2+LzGSYKm4IjvhMqY4X4qujd03Wb/DMwMsxDCYBEVT7newKN wTsxlFXM9CekHd0xG/5eVFM3sqpbKruH/09DWBCkk+TZG+c2hl35aZDPVo1j2D1jipj6 q+zA== X-Gm-Message-State: AOAM531TwJ17dr4lMlP9dlu0qfAekyZsyohYI8QO18K/IG9vrWTjPQWg hm7oU3TrVZXab6AoQlCQeOE= X-Google-Smtp-Source: ABdhPJwALiJUVgBFjPEtnw07zWFl1bnqlNf/pWPWX1rQZ4UmxfL+SSIzVtF0V3cNajAKzPdtrFWu9A== X-Received: by 2002:a1c:1b8b:: with SMTP id b133mr4515355wmb.147.1617487738040; Sat, 03 Apr 2021 15:08:58 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id u3sm20836229wrt.82.2021.04.03.15.08.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 03 Apr 2021 15:08:57 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203498 Archived-At: Hi! On 02.04.2021 08:40, Ramesh Nedunchezian wrote: > FWIW, `smartrep' is not part of GNU Emacs or GNU ELPA but available > elsewhere. (I install it via MELPA) > > Now, that `repeat-mode' is part of GNU Emacs, I think this dependency > on `smartrep' can be removed. I'd be happy to migrate away from smartrep, as soon as the functionality is equal, and all supported Emacs versions have repeat-mode. > FWIW, this is what I have in my `.emacs'. > > (progn > (defvar diff-hl--repeat-map > (let > ((map > (make-sparse-keymap))) > map)) > (message "Installed %s" 'diff-hl--repeat-map) > (cl-loop for > (cmd . key) > in > '((diff-hl-diff-goto-hunk . "=") > (diff-hl-revert-hunk . "n") > (diff-hl-previous-hunk . "[") > (diff-hl-next-hunk . "]")) > do > (define-key diff-hl--repeat-map key cmd) > (put cmd 'repeat-map 'diff-hl--repeat-map))) Try this alternative too, seems shorter: (map-keymap (lambda (_key cmd) (put cmd 'repeat-map 'diff-hl-command-map)) diff-hl-command-map) But either version (together with enabling repeat-mode) seems to break diff-hl-revert-hunk: as soon as it reaches the the y-or-n prompt, and I try to answer 'n', it enters the repeat loop again, instead of sending the result to the command.