From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#35316: 26.2; Emacs lags in c++-mode buffer when editing with iedit-mode on Date: Sun, 19 May 2019 09:20:16 -0400 Message-ID: <877eamd1in.fsf@gmail.com> References: <20190516150457.GA639@ACM> <20190516161704.GA527@ACM> <871s0xop2o.fsf@gmail.com> <20190517100118.GB5011@ACM> <87lfz5c7b5.fsf@gmail.com> <20190519114019.GA5262@ACM> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="186687"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: Amos Bird , 35316@debbugs.gnu.org, Zhang Haijun To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 19 15:21:17 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSLka-000mQD-VX for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 May 2019 15:21:17 +0200 Original-Received: from localhost ([127.0.0.1]:48776 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSLkZ-0002z1-Ut for geb-bug-gnu-emacs@m.gmane.org; Sun, 19 May 2019 09:21:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSLkS-0002yw-Tg for bug-gnu-emacs@gnu.org; Sun, 19 May 2019 09:21:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSLkQ-0005e1-F2 for bug-gnu-emacs@gnu.org; Sun, 19 May 2019 09:21:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48907) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hSLkL-0005cL-W6; Sun, 19 May 2019 09:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hSLkL-00042K-QI; Sun, 19 May 2019 09:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 19 May 2019 13:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35316 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 35316-submit@debbugs.gnu.org id=B35316.155827202615444 (code B ref 35316); Sun, 19 May 2019 13:21:01 +0000 Original-Received: (at 35316) by debbugs.gnu.org; 19 May 2019 13:20:26 +0000 Original-Received: from localhost ([127.0.0.1]:34218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hSLjl-000411-Nu for submit@debbugs.gnu.org; Sun, 19 May 2019 09:20:26 -0400 Original-Received: from mail-it1-f169.google.com ([209.85.166.169]:38143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hSLjj-00040n-5Z for 35316@debbugs.gnu.org; Sun, 19 May 2019 09:20:24 -0400 Original-Received: by mail-it1-f169.google.com with SMTP id i63so19035769ita.3 for <35316@debbugs.gnu.org>; Sun, 19 May 2019 06:20:23 -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=ZvN7eouQHXKG9QgGGFJX1eUm/+WceDK3S2e+0qvAnkk=; b=VYFyoF+gWKisUMODzX7JBzlGVitzXpMgpI0mKJBT9U0P1SjbMj/356mxWS3tzHZ1l+ qNS0YYXO1nI2icrdXsbtFXhrYqIEgApqd0KMHG2K61PBliaZ3ZFBO6z/VXO3u4hdhXA8 ElVq+4WVGoCBILP2iswPXRAuoou5q8hpkiyj1tuERAqBn5+94ZuwftT4V6QkXt7LqdbY JDt4EklLqW1QyYPnxiCe4kKeXOty8A69OSOPfiO/KCZSRZYDI2eIaBk1iVNXw+laoaPl a5sXjn2FrsFL7XEjzWp687Y15UyXNdLRA4t2FFIymT86l+dYyxYXC15Yc1mJ660ICxWL q0Sw== 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=ZvN7eouQHXKG9QgGGFJX1eUm/+WceDK3S2e+0qvAnkk=; b=KfaAgeqNjIfF8Qhld+s6tkhYCL7yODXMu4CmxWQSGrHEg/kWaa8ljkHy94ZTjWttbw ju+xh1ezGgGyeKnQSqXzrYWMjANXngDwnOi4kmsLqXgRlofFTcbZB5scYDDPtOjSQ3+g 618c9oBqtw3GuiTjpdWJ720sQiDLpvix9izW2xxy0ixH7M/nH40e2oYVnc4WUVACbVn0 98Nr4uV2mH4SEETisDphum5c4SmwCSO4eBg51v74WFvm9SAv6/BR+SrA8PXJhfPQN4Dh sqy3kHUIlvebp2SNRd/nkJ/o7uRRXEFNqSWY+/FhJjFfVd3Zd4N7KDj0gpT1lVA4X2uu +27w== X-Gm-Message-State: APjAAAWzgmI8Gt95a7BKrRzqvj9Xe37KFKETZqgZKNIrpcMWRUYtmszk rulXXpnKVwpTdCzUWTHkJVBQf6UD X-Google-Smtp-Source: APXvYqwbkaNkoe2JHVsmYCKJeLAAN60rF4vaCsJl16IrWr+d5qHdHnu5HIrjGDAcMOsFXMY+M5MOpA== X-Received: by 2002:a05:660c:4:: with SMTP id q4mr8964068itj.30.1558272017393; Sun, 19 May 2019 06:20:17 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id l19sm4482187iob.19.2019.05.19.06.20.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 19 May 2019 06:20:16 -0700 (PDT) In-Reply-To: <20190519114019.GA5262@ACM> (Alan Mackenzie's message of "Sun, 19 May 2019 11:40:19 +0000") 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: 209.51.188.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:159538 Archived-At: Alan Mackenzie writes: > (defun iedit-update-occurrences-2 (occurrence after beg end &optional change) > "" > - (let ((inhibit-modification-hooks t) > + (let (;; (inhibit-modification-hooks t) > + ;; Note: `inhibit-modification-hook' will already be non-nil when this > + ;; function is called. Setting it to nil here doesn't work. By "doesn't work", do you mean that it would trigger an infloop? Would something like this work: (defvar iedit-inhibit-update nil) (defun iedit-update-occurrences-2 (occurrence after beg end &optional change) ... ;; Let other modification hooks run, but don't recurse infinitely. (unless iedit-inhibit-update (let ((inhibit-modification-hooks nil) (iedit-inhibit-update t)) ... See also Bug#25111 "How modification-hooks let-bind inhibit-modification-hooks?" https://debbugs.gnu.org/25111