From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#55451: 28.1.50; Executing (jit-lock-mode -1) does not disable jit-lock-mode Date: Wed, 18 May 2022 19:46:35 +0800 Message-ID: <871qwr2hd0.fsf@localhost> References: <871qwtshk5.fsf@localhost> <83sfp9iie5.fsf@gnu.org> <87bkvwjatb.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27786"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 55451@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 18 13:48:11 2022 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 1nrI9y-00071y-UW for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 13:48:10 +0200 Original-Received: from localhost ([::1]:51508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrI9x-0000QF-GQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 May 2022 07:48:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrI8s-0000Nw-SW for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 07:47:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37066) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrI8s-0006IW-Em for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 07:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nrI8s-00078D-8y for bug-gnu-emacs@gnu.org; Wed, 18 May 2022 07:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 May 2022 11:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55451 X-GNU-PR-Package: emacs Original-Received: via spool by 55451-submit@debbugs.gnu.org id=B55451.165287436324321 (code B ref 55451); Wed, 18 May 2022 11:47:02 +0000 Original-Received: (at 55451) by debbugs.gnu.org; 18 May 2022 11:46:03 +0000 Original-Received: from localhost ([127.0.0.1]:59196 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrI7u-0006Jt-OY for submit@debbugs.gnu.org; Wed, 18 May 2022 07:46:03 -0400 Original-Received: from mail-pj1-f43.google.com ([209.85.216.43]:52985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nrI7s-0006Bz-Rx for 55451@debbugs.gnu.org; Wed, 18 May 2022 07:46:01 -0400 Original-Received: by mail-pj1-f43.google.com with SMTP id l14so1766595pjk.2 for <55451@debbugs.gnu.org>; Wed, 18 May 2022 04:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=quKAUlnoDpO/lEtZ4G5/lzGMEtCJk1dlBttiavZxXxU=; b=XpJgKyQHDG+/8XHEBW2TuggFZWfVWqcpJ3koEanAwYMDuCqpeUANbefDWMShf5NDPR K0A4RdvAkT7MDIc1RDfIJaQMT/pLbsuUZcM853+kHjSh/dW7o/vDfTMvotzgksBMilj8 b+xRFqSUWyLB2GNKGq0LbvqrKYaeIDT6C2V0gTRfjLcXos8f0cjgd6Kvu1QqSerGtxlp xXhsUaa9vtf3zohFS+LP9rU+UMPLO8USmiibL2KgX2BwC5UgxzACcifGk0TqESuQ7MPh 385sYaFDBJlBTINTBdRvWNDuvOJBwdbwXzE/kZJ9r3IK89MgXzEmX3pT+xQpTiT9DqPz JOMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=quKAUlnoDpO/lEtZ4G5/lzGMEtCJk1dlBttiavZxXxU=; b=w2KZoqPX234Wkk3bAWyfOi9FPRloKE+y/ULH7Ed+WfOqZQ2dz6ihnnXpHdoZcrTnzY IMeMt5aYY5Zw9zTS3MPvZAmJLlArB8MNVBUbzG89CXq2aoSTwOk6URaDIz+uEuIvOVRJ r0vPZjZRgDVeKZq586QD+gpKFFyCSf0JSGCo551Oq9XF16fST+oPLjqc8Y5mIIX3wdHi d0RbkEem4VRvY/IXeW8jQGBhcTDhyHmzu3e9Ej7QlnT3R7rFqQ1kz5LA/1YPEAl0rsLu NL+f7+/bQU3Hj+ojo54kOmVGcN3yV6fYVYsr84aeY8UznrfF+jVvStxQB1my81hMsEt+ SCDA== X-Gm-Message-State: AOAM533ogE4OFbOWNVg1MTv16hJI/UVNSfsCRgLyrvI+PhK0HiLe0E8w X/mzyuIt21MB2nM9JhlywHVLeGpmdyg= X-Google-Smtp-Source: ABdhPJy/6ILYGCozHwmi/Dsy+dt0ma1u6izatuiGvJg0Qe4lQkXiuANXi6Sfl7J1j/f2f0yIFjcULg== X-Received: by 2002:a17:903:120a:b0:15f:99f:95bc with SMTP id l10-20020a170903120a00b0015f099f95bcmr26817878plh.48.1652874354860; Wed, 18 May 2022 04:45:54 -0700 (PDT) Original-Received: from localhost ([134.73.242.163]) by smtp.gmail.com with ESMTPSA id e14-20020a17090301ce00b0016194c1df58sm1524063plh.105.2022.05.18.04.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 04:45:54 -0700 (PDT) In-Reply-To: <87bkvwjatb.fsf@gnus.org> 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:232547 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Eli Zaretskii writes: > >> jit-lock-mode is not a minor mode, so the usual syntax doesn't work >> with it, and isn't documented to work. Set it to nil to disable. > > The doc string could do with some explicit text about this, so I've > added that to Emacs 29. But since this is working as intended, I'm > closing this bug report. Thanks! It certainly improves the situation. However, I am confused why it is impossible to follow +1/-1 convention. Looking through jit-lock.el I do not see any place where any value other than non-nil/nil is considered. A possible patch is attached. Best, Ihor --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-jit-lock-mode-Treat-1-and-1-ARG-as-other-normal-mino.patch >From a9da60ba42f6745f4bbdb305e057639c40f8d34e Mon Sep 17 00:00:00 2001 Message-Id: From: Ihor Radchenko Date: Wed, 18 May 2022 19:44:25 +0800 Subject: [PATCH] jit-lock-mode: Treat +1 and -1 ARG as other normal minor modes * lisp/jit-lock.el (jit-lock-mode): Recognise +1/-1 arguments using minor mode conventions. --- lisp/jit-lock.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 20c1202474..224223fc7e 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -218,7 +218,12 @@ jit-lock-mode the variable `jit-lock-stealth-nice'. If you need to debug code run from jit-lock, see `jit-lock-debug-mode'." - (setq jit-lock-mode arg) + (setq jit-lock-mode + (pcase arg + (`+1 t) + (`-1 nil) + (`nil nil) + (val val))) (cond ((and (buffer-base-buffer) jit-lock-mode) -- 2.35.1 --=-=-=--