From unknown Tue Sep 23 07:29:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56821: [PATCH] * subr.el (buffer-match-p): Add t as trivial a condition Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Jul 2022 12:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56821 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 56821@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165909611113750 (code B ref -1); Fri, 29 Jul 2022 12:02:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Jul 2022 12:01:51 +0000 Received: from localhost ([127.0.0.1]:60089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHOgg-0003Zh-Od for submit@debbugs.gnu.org; Fri, 29 Jul 2022 08:01:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:58176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHOge-0003ZZ-7l for submit@debbugs.gnu.org; Fri, 29 Jul 2022 08:01:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHOgc-0001Ex-Eg for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 08:01:47 -0400 Received: from mout01.posteo.de ([185.67.36.65]:40685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHOgZ-0000Gd-Fn for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 08:01:46 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id BF40D240028 for ; Fri, 29 Jul 2022 14:01:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1659096099; bh=wzaeIHa1OiA6gdCSmaqH1uMcAVGnGs/rVVuA7qMj3A4=; h=From:To:Subject:Autocrypt:Date:From; b=HCampmLBswf0VriYQr+TpH1Gae0h/EVnQHhQiB4WCx5E/Me4kzP2XlskNZK3WnHQv IL79MrOe2zaOeIU4gTs0xVgdPktPgbEqrdixbJRQU49Y3MTZ4GNzkMSpqPtV+v+Pyb HLgSO+gt5pVnpRxzgtl9l9JLTweVT5rWa0GKQLB+EdIQzH28Rvy4CsKVNXk+qUKQvj xddHoK+v2Bc5o+NrIwbO1glY8C8OnVEIOqN9yVNbpKZGxjUXmUjAk+wQwqkeu+nwKL HxZxZ1tqVtQbn3DzgEQ02Tca0HcVBFL1WNhjU4PeebwvJMElJbxP/aSHsBGO0irc1Q dCeri5qQ4Hn8Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LvR2C23Y3z9rxP for ; Fri, 29 Jul 2022 14:01:37 +0200 (CEST) From: Philip Kaludercic Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Date: Fri, 29 Jul 2022 12:01:32 +0000 Message-ID: <87edy4w2jn.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch The proposed patch adds a simple condition to buffer-match-p, that had previously either be expressed using an empty string (or any regular expression that matches all words), an empty (and) or a symbol like `always'. I think it would be intuitive to add t, especially when considering new user options like `outline-minor-mode-use-buttons' being added that indicate they should be used as boolean value. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-07-29 built on rhea Repository revision: dedd05d2831d650b07cd9f0c639bdc8eb3bef1e4 Repository branch: master System Description: Fedora Linux 36 (Workstation Edition) Configured using: 'configure --with-pgtk --with-imagemagick 'CFLAGS=-march=native -O2 -pipe' LDFLAGS=-flto' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-subr.el-buffer-match-p-Add-t-as-trivial-a-condition.patch >From 816ad61536b5c2697d8a160e425296f9c26ca46f Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Fri, 29 Jul 2022 13:54:47 +0200 Subject: [PATCH] * subr.el (buffer-match-p): Add t as trivial a condition --- lisp/subr.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/subr.el b/lisp/subr.el index 6b121a314a..9f7cb3ab6a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -6899,6 +6899,7 @@ string-lines (defun buffer-match-p (condition buffer-or-name &optional arg) "Return non-nil if BUFFER-OR-NAME matches CONDITION. CONDITION is either: +- the symbol t, to always match - a regular expression, to match a buffer name, - a predicate function that takes a buffer object and ARG as arguments, and returns non-nil if the buffer matches, @@ -6921,6 +6922,7 @@ buffer-match-p (catch 'match (dolist (condition conditions) (when (cond + ((eq condition t)) ((stringp condition) (string-match-p condition (buffer-name buffer))) ((functionp condition) -- 2.37.1 --=-=-=-- From unknown Tue Sep 23 07:29:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56821: [PATCH] * subr.el (buffer-match-p): Add t as trivial a condition Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Jul 2022 12:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56821 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: 56821@debbugs.gnu.org Received: via spool by 56821-submit@debbugs.gnu.org id=B56821.165909628514069 (code B ref 56821); Fri, 29 Jul 2022 12:05:02 +0000 Received: (at 56821) by debbugs.gnu.org; 29 Jul 2022 12:04:45 +0000 Received: from localhost ([127.0.0.1]:60094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHOjV-0003eq-Br for submit@debbugs.gnu.org; Fri, 29 Jul 2022 08:04:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHOjR-0003eZ-Hf for 56821@debbugs.gnu.org; Fri, 29 Jul 2022 08:04:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=UvVDF+pHeVzGmuuuQnT4Bq8J962Nulgm9py2FEfYMr4=; b=nXdmg+CPyM6R58UdXHkmvTy4uV f6j5fBUe4A9xl1OIZmzwIkNwz1Kp7RIgKRn+v3ma0N/dkrdrjc3MnVdBKZmbzM2W9JaFIum1Vub+y RMqZavD6/mBrKGzu2GSNtQKKZoBbtHMkXNkt3OO0dD7WvOh25Ywkk7iky1XGtjFijqIY=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oHOjI-0006I7-DM; Fri, 29 Jul 2022 14:04:35 +0200 From: Lars Ingebrigtsen In-Reply-To: <87edy4w2jn.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 29 Jul 2022 12:01:32 +0000") References: <87edy4w2jn.fsf@posteo.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEX8/PzT1c7Cxbub n5tbXl09P0B9goAjIyP///9OMG5TAAAAAWJLR0QIht6VegAAAAd0SU1FB+YHHQsUGC0NoY8AAAG2 SURBVDjLzZJNbtswEIWd+gKW1WQdU84BzGHVtcOhsy5KgvvE6AUigdfPeyM7bdptUXQgAtJ8mr83 XK3+a+tcd9PB/gAi0uPI7///Yh//Dz7KMCAi+H86wWazWa1shs0H/2dFP5IKLO+6rWNr4xHgk3TB 3LDvFyAHgLXbBoVTaY8gVwAhFCCr4tFDtx0u4G7U58AIC4os49w9i5+1Z6rMIJCOxMCP+JQTvFbl FDzJjkBeqnkT/C/MD8KIO5EliZmw3V23gNBm+tJCaP5gqb62Rlf+CeQdTOIlxHD1CyW5zQ+tzSwT 3yudjibiFwJYmAtFw3Y9273ZAkwnVBye3R7vGbpwAf2w54fqqHEMqbUCwHYfUm1zJoGYKeFFvIE1 5pgoVaHIbY4izlIZSPk6R/QDJrca4xkAYuVlaOf8Ikl/1jZpLnU+JaZxDqnubcDSpqChtNyOAwDP EoGuWCPF+uqUwNs+ekHvjcNrbVGZzjsTMWqt7WIWiv6o1fqJ3/QWnBzPqdTyjVrtkX5OiFJtLdr4 +mg30aWCFSYGAIhdPJt8LFxhnUheZbwC3HNcPghh52D3zVb71+wNr3qtX4v6ItAAAAAldEVYdGRh dGU6Y3JlYXRlADIwMjItMDctMjlUMTE6MjA6MjQrMDA6MDDPKhh8AAAAJXRFWHRkYXRlOm1vZGlm eQAyMDIyLTA3LTI5VDExOjIwOjI0KzAwOjAwvnegwAAAAABJRU5ErkJggg== X-Now-Playing: Normil Hawaiians's _More Wealth Than Money_: "Left Alone With Her Pipe" Date: Fri, 29 Jul 2022 14:04:31 +0200 Message-ID: <87ilngktv4.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip Kaludercic writes: > The proposed patch adds a simple condition to buffer-match-p, that had > previously either be expressed using an empty string (or any regular > expression that matches all words), an empty (and) or [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip Kaludercic writes: > The proposed patch adds a simple condition to buffer-match-p, that had > previously either be expressed using an empty string (or any regular > expression that matches all words), an empty (and) or a symbol like > `always'. I think it would be intuitive to add t, especially when > considering new user options like `outline-minor-mode-use-buttons' being > added that indicate they should be used as boolean value. Makes sense to me. From unknown Tue Sep 23 07:29:01 2025 X-Loop: help-debbugs@gnu.org Subject: bug#56821: [PATCH] * subr.el (buffer-match-p): Add t as trivial a condition Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Jul 2022 15:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56821 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: 56821@debbugs.gnu.org Received: via spool by 56821-submit@debbugs.gnu.org id=B56821.16591100658072 (code B ref 56821); Fri, 29 Jul 2022 15:55:01 +0000 Received: (at 56821) by debbugs.gnu.org; 29 Jul 2022 15:54:25 +0000 Received: from localhost ([127.0.0.1]:33300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHSJl-000267-9U for submit@debbugs.gnu.org; Fri, 29 Jul 2022 11:54:25 -0400 Received: from mx-rz-3.rrze.uni-erlangen.de ([131.188.11.22]:36789) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHSJj-00025z-68 for 56821@debbugs.gnu.org; Fri, 29 Jul 2022 11:54:24 -0400 Received: from mx-rz-smart.rrze.uni-erlangen.de (mx-rz-smart.rrze.uni-erlangen.de [IPv6:2001:638:a000:1025::1e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mx-rz-3.rrze.uni-erlangen.de (Postfix) with ESMTPS id 4LvXBk0Ttlz20Wr; Fri, 29 Jul 2022 17:54:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fau.de; s=fau-2021; t=1659110062; bh=2Pghpc8BvtvhHdXQ3msB15/WV0jNEWe0CX7yfgGTLKA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:To:CC: Subject; b=Ocs+PvIquQRIhtPNRzZOkr1Ysc23iEj3gZsw4uLXBTYhcKSRSibFCF1UrewGVbV8x mDlcLIjBWKO5GuPqTSFEfvP1y2ctzYZAhGcdSCeAHuu5U83j1hWWG8CKj2Brbosnt+ 5GzFYwWc1MMhu1A6uwrXDG1xyAXEtYVYSQ4/3fYg4uFhCtnwxLyl3JYwLI0WjVQH4u pm4r2pOZlK9JyKYy3E4ZtL9PcyyJ+TJH2+pVacywKogiJd63ewKq5LTyUoYVXNxtdV mlgM5kJ5wS/MGUuPek7D8nfCJewFcoLnHZ3IO+aMfAau0zTHCSV/+qzTd/aXkjRI/6 HPfESG0JICi1A== X-Virus-Scanned: amavisd-new at boeck5.rrze.uni-erlangen.de (RRZE) X-RRZE-Flag: Not-Spam X-RRZE-Submit-IP: 2003:f8:716:80cd:e9ca:87d8:727d:6ca3 Received: from rhea (p200300f8071680cde9ca87d8727d6ca3.dip0.t-ipconnect.de [IPv6:2003:f8:716:80cd:e9ca:87d8:727d:6ca3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: U2FsdGVkX1/bJ8n/vIdt6z7teOsfNudVkYnCgnqEqmI=) by smtp-auth.uni-erlangen.de (Postfix) with ESMTPSA id 4LvXBg3wylz1yK2; Fri, 29 Jul 2022 17:54:19 +0200 (CEST) From: Philip Kaludercic In-Reply-To: <87ilngktv4.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 29 Jul 2022 14:04:31 +0200") References: <87edy4w2jn.fsf@posteo.net> <87ilngktv4.fsf@gnus.org> Date: Fri, 29 Jul 2022 17:54:19 +0200 Message-ID: <87wnbvrk2c.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > Philip Kaludercic writes: > >> The proposed patch adds a simple condition to buffer-match-p, that had >> previously either be expressed using an empty string (or any regular >> expression that matches all words), an empty (and) or a symbol like >> `always'. I think it would be intuitive to add t, especially when >> considering new user options like `outline-minor-mode-use-buttons' being >> added that indicate they should be used as boolean value. > > Makes sense to me. Ok, I would push the commit in that case. From unknown Tue Sep 23 07:29:01 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Philip Kaludercic Subject: bug#56821: closed (Re: bug#56821: [PATCH] * subr.el (buffer-match-p): Add t as trivial a condition) Message-ID: References: <87ilnenanp.fsf@posteo.net> <87edy4w2jn.fsf@posteo.net> X-Gnu-PR-Message: they-closed 56821 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 56821@debbugs.gnu.org Date: Sat, 30 Jul 2022 10:44:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1659177842-12504-1" This is a multi-part message in MIME format... ------------=_1659177842-12504-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #56821: [PATCH] * subr.el (buffer-match-p): Add t as trivial a condition which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 56821@debbugs.gnu.org. --=20 56821: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D56821 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1659177842-12504-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 56821-done) by debbugs.gnu.org; 30 Jul 2022 10:43:36 +0000 Received: from localhost ([127.0.0.1]:34089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHjwV-0003Ew-TK for submit@debbugs.gnu.org; Sat, 30 Jul 2022 06:43:36 -0400 Received: from mout02.posteo.de ([185.67.36.66]:37007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHjwQ-0003Ef-FD for 56821-done@debbugs.gnu.org; Sat, 30 Jul 2022 06:43:33 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7CB25240104 for <56821-done@debbugs.gnu.org>; Sat, 30 Jul 2022 12:43:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1659177804; bh=sWxc7H9SyYb1r0rL5BNvP6oAO2hZgBWvphte738+n1M=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=GwErBG05qHg2wRCeCDP4PUoWWoEMzXk2EaD58i6YOF/wxVGNEs1OWKx23uG3qTQMs z3BFjcrnhbnSWMHG5lTePG6vuvO+YikUBmOoPpwVydLNxrZrb5L6VLnCA7wpjz6zBc 6VUltYbzhpwgv/1o78lJbcYFJSg/1hY5R0SOe11EL7Gz+bsDM7Q3nPx/nSY89oWgB7 dLijVjWa9GcNn5Es1lcQUIPyZZYgXol17yBBPc8B0BFltCkdrWDrrpYG/ORJhcUBpj F0BtJxe0oMLd5Hke5RMI0czwE4DJoFx+SYRSUYUvLVbhAdJS/LgwkOjVBG422CWOao IrWt4DuGiynQg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Lw1FR5PHsz6tm6; Sat, 30 Jul 2022 12:43:23 +0200 (CEST) From: Philip Kaludercic To: Lars Ingebrigtsen Subject: Re: bug#56821: [PATCH] * subr.el (buffer-match-p): Add t as trivial a condition In-Reply-To: <87wnbvrk2c.fsf@posteo.net> (Philip Kaludercic's message of "Fri, 29 Jul 2022 17:54:19 +0200") References: <87edy4w2jn.fsf@posteo.net> <87ilngktv4.fsf@gnus.org> <87wnbvrk2c.fsf@posteo.net> Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Date: Sat, 30 Jul 2022 10:43:22 +0000 Message-ID: <87ilnenanp.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 56821-done Cc: 56821-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philip Kaludercic writes: > Lars Ingebrigtsen writes: > >> Philip Kaludercic writes: >> >>> The proposed patch adds a simple condition to buffer-match-p, that had >>> previously either be expressed using an empty string (or any regular >>> expression that matches all words), an empty (and) or a symbol like >>> `always'. I think it would be intuitive to add t, especially when >>> considering new user options like `outline-minor-mode-use-buttons' being >>> added that indicate they should be used as boolean value. >> >> Makes sense to me. > > Ok, I would push the commit in that case. Done. ------------=_1659177842-12504-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Jul 2022 12:01:51 +0000 Received: from localhost ([127.0.0.1]:60089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHOgg-0003Zh-Od for submit@debbugs.gnu.org; Fri, 29 Jul 2022 08:01:51 -0400 Received: from lists.gnu.org ([209.51.188.17]:58176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oHOge-0003ZZ-7l for submit@debbugs.gnu.org; Fri, 29 Jul 2022 08:01:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHOgc-0001Ex-Eg for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 08:01:47 -0400 Received: from mout01.posteo.de ([185.67.36.65]:40685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oHOgZ-0000Gd-Fn for bug-gnu-emacs@gnu.org; Fri, 29 Jul 2022 08:01:46 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id BF40D240028 for ; Fri, 29 Jul 2022 14:01:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1659096099; bh=wzaeIHa1OiA6gdCSmaqH1uMcAVGnGs/rVVuA7qMj3A4=; h=From:To:Subject:Autocrypt:Date:From; b=HCampmLBswf0VriYQr+TpH1Gae0h/EVnQHhQiB4WCx5E/Me4kzP2XlskNZK3WnHQv IL79MrOe2zaOeIU4gTs0xVgdPktPgbEqrdixbJRQU49Y3MTZ4GNzkMSpqPtV+v+Pyb HLgSO+gt5pVnpRxzgtl9l9JLTweVT5rWa0GKQLB+EdIQzH28Rvy4CsKVNXk+qUKQvj xddHoK+v2Bc5o+NrIwbO1glY8C8OnVEIOqN9yVNbpKZGxjUXmUjAk+wQwqkeu+nwKL HxZxZ1tqVtQbn3DzgEQ02Tca0HcVBFL1WNhjU4PeebwvJMElJbxP/aSHsBGO0irc1Q dCeri5qQ4Hn8Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LvR2C23Y3z9rxP for ; Fri, 29 Jul 2022 14:01:37 +0200 (CEST) From: Philip Kaludercic To: bug-gnu-emacs@gnu.org Subject: [PATCH] * subr.el (buffer-match-p): Add t as trivial a condition Autocrypt: addr=philipk@posteo.net; prefer-encrypt=nopreference; keydata= mDMEYHHqUhYJKwYBBAHaRw8BAQdAp3GdmYJ6tm5McweY6dEvIYIiry+Oz9rU4MH6NHWK0Ee0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiQBBMWCAA4FiEEDM2H44ZoPt9Ms0eHtVrAHPRh1FwFAmBx6lICGwMFCwkIBwIGFQoJ CAsCBBYCAwECHgECF4AACgkQtVrAHPRh1FyTkgEAjlbGPxFchvMbxzAES3r8QLuZgCxeAXunM9gh io0ePtUBALVhh9G6wIoZhl0gUCbQpoN/UJHI08Gm1qDob5zDxnIHuDgEYHHqUhIKKwYBBAGXVQEF AQEHQNcRB+MUimTMqoxxMMUERpOR+Q4b1KgncDZkhrO2ql1tAwEIB4h4BBgWCAAgFiEEDM2H44Zo Pt9Ms0eHtVrAHPRh1FwFAmBx6lICGwwACgkQtVrAHPRh1Fw1JwD/Qo7kvtib8jy7puyWrSv0MeTS g8qIxgoRWJE/KKdkCLEA/jb9b9/g8nnX+UcwHf/4VfKsjExlnND3FrBviXUW6NcB Date: Fri, 29 Jul 2022 12:01:32 +0000 Message-ID: <87edy4w2jn.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch The proposed patch adds a simple condition to buffer-match-p, that had previously either be expressed using an empty string (or any regular expression that matches all words), an empty (and) or a symbol like `always'. I think it would be intuitive to add t, especially when considering new user options like `outline-minor-mode-use-buttons' being added that indicate they should be used as boolean value. In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-07-29 built on rhea Repository revision: dedd05d2831d650b07cd9f0c639bdc8eb3bef1e4 Repository branch: master System Description: Fedora Linux 36 (Workstation Edition) Configured using: 'configure --with-pgtk --with-imagemagick 'CFLAGS=-march=native -O2 -pipe' LDFLAGS=-flto' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-subr.el-buffer-match-p-Add-t-as-trivial-a-condition.patch >From 816ad61536b5c2697d8a160e425296f9c26ca46f Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Fri, 29 Jul 2022 13:54:47 +0200 Subject: [PATCH] * subr.el (buffer-match-p): Add t as trivial a condition --- lisp/subr.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/subr.el b/lisp/subr.el index 6b121a314a..9f7cb3ab6a 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -6899,6 +6899,7 @@ string-lines (defun buffer-match-p (condition buffer-or-name &optional arg) "Return non-nil if BUFFER-OR-NAME matches CONDITION. CONDITION is either: +- the symbol t, to always match - a regular expression, to match a buffer name, - a predicate function that takes a buffer object and ARG as arguments, and returns non-nil if the buffer matches, @@ -6921,6 +6922,7 @@ buffer-match-p (catch 'match (dolist (condition conditions) (when (cond + ((eq condition t)) ((stringp condition) (string-match-p condition (buffer-name buffer))) ((functionp condition) -- 2.37.1 --=-=-=-- ------------=_1659177842-12504-1--