From unknown Thu Jun 19 13:59:47 2025
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.509 (Entity 5.509)
Content-Type: text/plain; charset=utf-8
From: bug#77022 <77022@debbugs.gnu.org>
To: bug#77022 <77022@debbugs.gnu.org>
Subject: Status: [PATCH] Allow specify in which major modes
global-hl-line-mode must be enabled.
Reply-To: bug#77022 <77022@debbugs.gnu.org>
Date: Thu, 19 Jun 2025 20:59:47 +0000
retitle 77022 [PATCH] Allow specify in which major modes global-hl-line-mod=
e must be enabled.
reassign 77022 emacs
submitter 77022 Elijah Gabe P=C3=A9rez
severity 77022 wishlist
tag 77022 patch
thanks
From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 14 21:22:46 2025
Received: (at submit) by debbugs.gnu.org; 15 Mar 2025 01:22:46 +0000
Received: from localhost ([127.0.0.1]:36915 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1ttGEg-0002YU-6x
for submit@debbugs.gnu.org; Fri, 14 Mar 2025 21:22:46 -0400
Received: from lists.gnu.org ([2001:470:142::17]:58864)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from )
id 1ttGEe-0002YE-Fc
for submit@debbugs.gnu.org; Fri, 14 Mar 2025 21:22:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1ttGEY-0004w7-LT
for bug-gnu-emacs@gnu.org; Fri, 14 Mar 2025 21:22:38 -0400
Received: from mail-oi1-x243.google.com ([2607:f8b0:4864:20::243])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1ttGEX-0004KW-3u
for bug-gnu-emacs@gnu.org; Fri, 14 Mar 2025 21:22:38 -0400
Received: by mail-oi1-x243.google.com with SMTP id
5614622812f47-3f1c94936c5so1561781b6e.1
for ; Fri, 14 Mar 2025 18:22:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1742001755; x=1742606555; darn=gnu.org;
h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
:date:message-id:reply-to;
bh=LC854sUwGKZU205gUaEmijBpmH8VxSfFIBs5gzGoxng=;
b=fbfy7HdVk2mZlNHAPyE+pb3/cK3eJf1FUjtWA/CQ/yr161L0lWgeFWIWUm2i8kX1Bm
Pf3/tuowCoDTxD4jmIEq92L87o3LYJMX4XL3UZexFM+Qfhfw92qyhwwBaAhe6KwoDcWt
xdi6UHkgf5tBwGPDJqnMmPaYEpGozSf0BHsWJMnXYkm4Hhnw2VnSFZru6QinQ4WbUjj7
2ZjkwV77qqeTO3rQ/T7QHB0WaErz8AcgS3+baxv5z+G2Z82dNrIxtJS74ceHU4LW0KXg
b00eCJiG/2tYdssu9K89W/qGRrGK77BC999FI1Wqow93GdTQxKc4ngPClQMGrWjPfjZ7
25pg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1742001755; x=1742606555;
h=mime-version:message-id:date:subject:to:from:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=LC854sUwGKZU205gUaEmijBpmH8VxSfFIBs5gzGoxng=;
b=XwfV4NnWkx2C45jfPkrMu3Z6PyhOVWGIWtIcGU4UhywAYjWJIB+qC4rLlzrGjymiu0
trg6QU36VG+Yj2fWxOs5V/YaQ43zOThSDmoNWVesiFsM20WDm5qu8gWDNiDi9CGzh3ji
x9/07c/Jgf7EvFSSeAVJaNMwFjMx6v2t9KLPGDORh+UgNXZqaKF7woV7/4ZMq7f7MHmL
djJ6Ew8nZSpJt5nEtXspRtDG2XxG6GzFGOeKTEL7bEGWxu74AX3cGwe3C4qWQ0NuvOOT
xdPif1fGin8WyMVAMJL3HhXaT5Gm1IcsZ9mUAGtQoQwRek/kRbQ01wFHw73DtPZDr51O
z2qQ==
X-Gm-Message-State: AOJu0Yzse2AgicHZEwWzIWC5aIOGXpIuSohq6yGSvUYR+/jtLZPpvh8T
Pg5KH9cWWb79aYZGhtPnq9CM4bb48EY94i1lydjquM9JHqAumAVxO29JrJyB
X-Gm-Gg: ASbGnctWtW+XaBmFOKSlLNR+OEQw6U5W7QpGzy8RA9ZSc4PrkM7eJktcR4gjpQPVOCd
4ZWie4Psc4y++iAO2XlgzrnbLs0d+vuGB4JMKiA1D3Z71Kk7vOvFJpi3nVQcu4TU/HCBSeacEIY
Rr9EK8BbIgCtwjumwiSRBKfTjavCFMD4K6Clka8zNtV6h4Tdnf1N7JJFQ0IeFOAk7TbZqez1rgZ
EUFqdbCoQOy3p3PmcvAWcuQpsZpv8Xu/xY1YYvotr8av3OM0u2WjLyYszfPmXLOP2vuO+oZbbqw
294JQMI5GHqZ
X-Google-Smtp-Source: AGHT+IEg5ZeMa2yzfyWVQOzMJMc1QFRWdJk0E4d9bpnIDcS4+fVDGAfgFS9xjL0NwF1sXUOWwJB47w==
X-Received: by 2002:a05:6808:2017:b0:3fa:10b4:6986 with SMTP id
5614622812f47-3fcbb6bedc0mr3909252b6e.15.1742001755456;
Fri, 14 Mar 2025 18:22:35 -0700 (PDT)
Received: from fedora ([2806:10ae:e:8def::a]) by smtp.gmail.com with ESMTPSA id
5614622812f47-3fcd481f52esm912194b6e.23.2025.03.14.18.22.34
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 14 Mar 2025 18:22:35 -0700 (PDT)
From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?=
To: bug-gnu-emacs@gnu.org
Subject: [PATCH] Allow specify in which major modes global-hl-line-mode must
be enabled.
Date: Fri, 14 Mar 2025 19:22:33 -0600
Message-ID: <874izv3x5y.fsf@gmail.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2607:f8b0:4864:20::243;
envelope-from=eg642616@gmail.com; helo=mail-oi1-x243.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 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,
FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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
the administrator of that system for details.
Content preview: Hello,
this patch add a user option for specify in which major
modes should global-hl-line-mode be switched on. Originally i wanted to
replace
global-hl-line define-minor-mode definition with define-globalized-minor-mode,
however i found that this was already done and was reverted in
*a34afbf2aea2fdaf691f4bf250 [...]
Content analysis details: (1.2 points, 10.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/,
no trust [2001:470:142:0:0:0:0:17 listed in] [list.dnswl.org]
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (eg642616[at]gmail.com)
0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
in digit (eg642616[at]gmail.com)
0.0 HTML_MESSAGE BODY: HTML included in message
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: 0.2 (/)
--=-=-=
Content-Type: multipart/alternative; boundary="==-=-="
--==-=-=
Content-Type: text/plain
Hello, this patch add a user option for specify in which major modes
should global-hl-line-mode be switched on.
Originally i wanted to replace global-hl-line define-minor-mode
definition with define-globalized-minor-mode, however i found that this
was already done and was reverted in
*a34afbf2aea2fdaf691f4bf250a18991b21301d7* commit, so I decided to bring
this feature, since i find this better than using add-hook.
--==-=-=
Content-Type: text/html
Hello, this patch add a user option for specify in which major modes
should global-hl-line-mode be switched on.
Originally i wanted to replace global-hl-line define-minor-mode
definition with define-globalized-minor-mode, however i found that this
was already done and was reverted in
a34afbf2aea2fdaf691f4bf250a18991b21301d7 commit, so I decided to bring
this feature, since i find this better than using add-hook.
--==-=-=--
--=-=-=
Content-Type: text/plain
--
- E.G via GNU Emacs and Org.
--=-=-=--
From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 14 21:26:58 2025
Received: (at submit) by debbugs.gnu.org; 15 Mar 2025 01:26:59 +0000
Received: from localhost ([127.0.0.1]:36928 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1ttGIk-0002n7-Io
for submit@debbugs.gnu.org; Fri, 14 Mar 2025 21:26:58 -0400
Received: from lists.gnu.org ([2001:470:142::17]:39742)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from )
id 1ttGIi-0002mv-Pv
for submit@debbugs.gnu.org; Fri, 14 Mar 2025 21:26:57 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1ttGId-0005ZR-0W
for bug-gnu-emacs@gnu.org; Fri, 14 Mar 2025 21:26:51 -0400
Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1ttGIb-0004pU-LU
for bug-gnu-emacs@gnu.org; Fri, 14 Mar 2025 21:26:50 -0400
Received: by mail-qv1-xf44.google.com with SMTP id
6a1803df08f44-6e91d323346so28933196d6.1
for ; Fri, 14 Mar 2025 18:26:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1742002008; x=1742606808; darn=gnu.org;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:from:to:cc:subject:date:message-id:reply-to;
bh=fSvhlZZ3JtQi+t3U7aTegR75eyGyetlxa1+s2Vv0Crs=;
b=Bog9W4PsBMahtHHEllnXMDih+r77l+LburgN0JS0IztNpEcZGKGB+eeah3xRPnlX0g
1rkrqIuOUCRmHEDnrOCs/d1KyjfddElYzj7jzd9HiCVOBbB6BeV1eP/vHPWdDy1qwM5o
tBUa9LjlxCEPIsZGfLuUPbiCw3p3QxyLgZ7IbnhnBdECuqH3V7RhlKX+33thDbEvB4Ow
ma4TCb0/6Z/lUgdLnWi8GEl9Z8eeE9b0swf0N1MQH6aHobcLpRrkq1HlT6SWFj0GQq1D
IaPnUj7NWC5s+R69sEVu6EFYpSlBy4npVzbxfaO0qmpVIeihuufqSV6MtdVh1jt7Gmqs
rvyw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1742002008; x=1742606808;
h=to:subject:message-id:date:from:in-reply-to:references:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=fSvhlZZ3JtQi+t3U7aTegR75eyGyetlxa1+s2Vv0Crs=;
b=VqHG7D719iTJJuu36z/oZKPv5OewMEPyxz3goO79t8+zQsrMcCrDeXu3t80cBVWhZd
ZA1ewhVOgo9UMqpuNwZbu13DoqCmi0hLZWgf2C82t6sZZawK0PDQR+3QNkXqdut1djA9
MaMMUgQVnzP0V4BgraqwMcvy8fTuMF4o02ybikssqgjEIVkbAlCkywNRxFbaV3ZPaDU9
MOxpI2Gc6lgfJ5ZGCHUe1D5obU1WmPXhNzdqZX/QO2Z3QRbQ1MXjKSRpDW9ngm6xzj4c
opbxgSiB4OY2EmLaxazb7pATx8sooEY/0mxrL9arAfiA1FMWLvsUSomaKmmFYkM/aOEU
eRZQ==
X-Gm-Message-State: AOJu0YxMHr9BI2b7wdx0Ds+ZP2kO9HgVj1porJXks/ayuXV4Eoj8Rsxv
+tyxZC/KN/z1495QpmYk7DRFDW574yGFQ+hHCYtNtypchD6D5qwljBnDKCYaoozmg71SFou6Rfj
7OBmvtXOBZHB0OsycuRswJTamJz/IV36e
X-Gm-Gg: ASbGncvUH07c5UwW6mU8Ok1UKZgOqs82JXvkdHh83KSnS35LDShTjeFWBUWMGbTDJNl
6W+zW0oWMANbboyihBWFfXU4VJrPgVHoK9bD/frcK5Xwa8usiyui/vx1ng/LSaVkf7dq8JQP8ec
CuERjdq61gevpi+YlMlM8ig7+s3H4q
X-Google-Smtp-Source: AGHT+IFH0hUcxMXRreNkm6eEBfLKwzMLE2UvD1SDUUnJ614SLKgTeZpSnjvMmdxCrPOA+H0d/4ybp2+Fpo6GtByy9zQ=
X-Received: by 2002:a05:6214:f07:b0:6e4:2479:d59b with SMTP id
6a1803df08f44-6eaeacda8cbmr73797206d6.16.1742002008617; Fri, 14 Mar 2025
18:26:48 -0700 (PDT)
MIME-Version: 1.0
References: <874izv3x5y.fsf@gmail.com>
In-Reply-To: <874izv3x5y.fsf@gmail.com>
From: =?UTF-8?Q?Elijah_Gabe_P=C3=A9rez?=
Date: Fri, 14 Mar 2025 19:26:36 -0600
X-Gm-Features: AQ5f1JpmeGJdcxJNw3Lhd0Brx537YR6VzJhdk3Kq_uSaF89gKKJ1W4U0vb18Mf4
Message-ID:
Subject: Re: [PATCH] Allow specify in which major modes global-hl-line-mode
must be enabled.
To: "Po Lu via Bug reports for GNU Emacs,
the Swiss army knife of text editors"
Content-Type: multipart/mixed; boundary="000000000000ec0f3706305772d1"
Received-SPF: pass client-ip=2607:f8b0:4864:20::f44;
envelope-from=eg642616@gmail.com; helo=mail-qv1-xf44.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 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,
FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.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
the administrator of that system for details.
Content preview: El vie., 14 de marzo de 2025 7:22 p. m., Elijah Gabe Pérez
< escribió: > Hello, this patch add a user option for specify in which major
modes > should global-hl-line-mode be switched on. > > Originally i wanted
to replace global-hl-line define-minor-mode definition > wit [...]
Content analysis details: (1.2 points, 10.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/,
no trust
[2001:470:142:0:0:0:0:17 listed in]
[list.dnswl.org]
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail)
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (eg642616[at]gmail.com)
0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends
in digit (eg642616[at]gmail.com)
0.0 HTML_MESSAGE BODY: HTML included in message
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: 0.2 (/)
--000000000000ec0f3706305772d1
Content-Type: multipart/alternative; boundary="000000000000ec0f3206305772cf"
--000000000000ec0f3206305772cf
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
El vie., 14 de marzo de 2025 7:22 p. m., Elijah Gabe P=C3=A9rez <
eg642616@gmail.com> escribi=C3=B3:
> Hello, this patch add a user option for specify in which major modes
> should global-hl-line-mode be switched on.
>
> Originally i wanted to replace global-hl-line define-minor-mode definitio=
n
> with define-globalized-minor-mode, however i found that this was already
> done and was reverted in *a34afbf2aea2fdaf691f4bf250a18991b21301d7*
> commit, so I decided to bring this feature, since i find this better than
> using add-hook.
>
>
> --
> - E.G via GNU Emacs and Org.
>
--000000000000ec0f3206305772cf
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
El vie., 14 de marzo de 2025 7:22 p. m., Elijah Gabe P=C3=
=A9rez <
eg642616@gmail.com>=
escribi=C3=B3:
Hello, this patch add a user option for specify in which major modes
should global-hl-line-mode be switched on.
Originally i wanted to replace global-hl-line define-minor-mode
definition with define-globalized-minor-mode, however i found that this
was already done and was reverted in
a34afbf2aea2fdaf691f4bf250a18991b21301d7 commit, so I decided to bri=
ng
this feature, since i find this better than using add-hook.
--
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 -=
E.G via GNU Emacs and Org.
--000000000000ec0f3206305772cf--
--000000000000ec0f3706305772d1
Content-Type: application/octet-stream;
name="0001-Allow-specify-in-which-major-modes-global-hl-line-mo.patch"
Content-Disposition: attachment;
filename="0001-Allow-specify-in-which-major-modes-global-hl-line-mo.patch"
Content-Transfer-Encoding: base64
Content-ID: <1959768f31f478eede91>
X-Attachment-Id: 1959768f31f478eede91
RnJvbSAyM2FhMGUyMjAwOTI4YzNhZDlkYTIzYTJkMGVlMGVkMTFjZTAyMTAxIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/RWw9QzM9QURhcz0yMEdhYnJpZWw9MjBQPUMz
PUE5cmV6Pz0gPGVnNjQyNjE2QGdtYWlsLmNvbT4KRGF0ZTogRnJpLCAxNCBNYXIgMjAyNSAxOTow
Mjo1MSAtMDYwMApTdWJqZWN0OiBbUEFUQ0hdIEFsbG93IHNwZWNpZnkgaW4gd2hpY2ggbWFqb3Ig
bW9kZXMgZ2xvYmFsLWhsLWxpbmUtbW9kZSBtdXN0CiBiZSBlbmFibGVkLgoKKiBsaXNwL2hsLWxp
bmUuZWwgKGdsb2JhbC1obC1saW5lLW1vZGVzKTogTmV3IHVzZXIgb3B0aW9uLgooZ2xvYmFsLWhs
LWxpbmUtbW9kZSk6IENoYW5nZXMuCgoqIGV0Yy9ORVdTOiBEb2N1bWVudCBjaGFuZ2VzLgotLS0K
IGV0Yy9ORVdTICAgICAgICB8ICA0ICsrKysKIGxpc3AvaGwtbGluZS5lbCB8IDMzICsrKysrKysr
KysrKysrKysrKysrKysrKysrKysrKysrLQogMiBmaWxlcyBjaGFuZ2VkLCAzNiBpbnNlcnRpb25z
KCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEvZXRjL05FV1MgYi9ldGMvTkVXUwppbmRl
eCBiMzNmN2NlYzczZi4uNjIzMDZlNTEwYTIgMTAwNjQ0Ci0tLSBhL2V0Yy9ORVdTCisrKyBiL2V0
Yy9ORVdTCkBAIC0xNTMyLDYgKzE1MzIsMTAgQEAgY29tbWFuZHMuICBXaGVuIG5pbCwgY2xpY2tp
bmcgb24gYW4gaW5hY3RpdmUgRW1hY3MgZnJhbW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Bga2lsbC1hbGwtbG9jYWwtdmFyaWFibGVzJyBpcyBjYWxsZWQuCiAgICAgICAg
IChhZGQtaG9vayAnY2hhbmdlLW1ham9yLW1vZGUtaG9vayAjJ2dsb2JhbC1obC1saW5lLXVuaGln
aGxpZ2h0KQotLSAKMi40Ny4wCgo=
--000000000000ec0f3706305772d1--
From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 15 05:20:09 2025
Received: (at 77022) by debbugs.gnu.org; 15 Mar 2025 09:20:09 +0000
Received: from localhost ([127.0.0.1]:38815 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1ttNgf-0008Dr-2h
for submit@debbugs.gnu.org; Sat, 15 Mar 2025 05:20:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40586)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from ) id 1ttNgc-00088u-1v
for 77022@debbugs.gnu.org; Sat, 15 Mar 2025 05:20:06 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1ttNgU-0008JY-Ea; Sat, 15 Mar 2025 05:19:59 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
Date; bh=KIcFa4KSGE3zXCkeVwqRLZGRwhW+JVH5VX73Q92ubvo=; b=O9isMt/Xewzb7/QPKtHL
8S4Ka7lO+oJ9Z147Figp0sht9DgcKuRHSrHY8ut1em3fwDiLZ5mwtT+3IjNyslqTKAtsILnctlIJ0
c53T/KFzdtUe1Z/3xGgKDVvWSmKS9yxk/SKAgokGr/pxOMGzuxS+1/rHGHqLkI/y/hn6hvg4ur6eQ
Yh3/nn1jkT8D4lsF1XXKVChxRzJl/3nJEhBN+hTygkaJBokeT3+H2E72QPR9LFcqZ5asD/sTmpWtZ
mZ50jPEGX4hHMHMn1I180rq3ldNPgXmatBa0aA7BpVV5Qnpqy8vlqmcTHrJth78sRWpujHC8spLoF
LWIErb5UWzJwzg==;
Date: Sat, 15 Mar 2025 11:19:54 +0200
Message-Id: <86pliiy7k5.fsf@gnu.org>
From: Eli Zaretskii
To: Elijah Gabe =?utf-8?Q?P=C3=A9rez?=
In-Reply-To:
(message from Elijah Gabe =?utf-8?Q?P=C3=A9rez?= on Fri, 14 Mar 2025
19:26:36 -0600)
Subject: Re: bug#77022: [PATCH] Allow specify in which major modes
global-hl-line-mode must be enabled.
References: <874izv3x5y.fsf@gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77022
Cc: 77022@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 (---)
> From: Elijah Gabe Pérez
> Date: Fri, 14 Mar 2025 19:26:36 -0600
>
> El vie., 14 de marzo de 2025 7:22 p. m., Elijah Gabe Pérez escribió:
>
> Hello, this patch add a user option for specify in which major modes should global-hl-line-mode be
> switched on.
>
> Originally i wanted to replace global-hl-line define-minor-mode definition with
> define-globalized-minor-mode, however i found that this was already done and was reverted in
> a34afbf2aea2fdaf691f4bf250a18991b21301d7 commit, so I decided to bring this feature, since i find
> this better than using add-hook.
Thanks.
> +*** New variable 'global-hl-line-modes'.
> +This specifies in which major modes should the global-hl-line-mode be
^^^^^^^^^^^^^^^^^^^
The mode should be quoted 'like this'.
> +(defcustom global-hl-line-modes t
> + "Which major modes `hl-line-mode' is switched on in.
> +This variable can be either t (all major modes), nil (no major modes),
> +or a list of modes and (not modes) to switch use this minor mode or
> +not. For instance
> +
> + (c-mode (not message-mode mail-mode) text-mode)
> +
> +means \"use this mode in all modes derived from `c-mode', don't use in
> +modes derived from `message-mode' or `mail-mode', but do use in other
> +modes derived from `text-mode'\". An element with value t means \"use\"
> +and nil means \"don't use\". There's an implicit nil at the end of the
> +list."
> + :type
> + '(choice (const :tag "Enable in all major modes" t)
> + (const :tag "Don't enable in any major mode" nil)
Why is it useful to have a value of nil here? Why would anyone
activate this mode when the variable has the value nil?
> @@ -224,7 +254,8 @@ global-hl-line-mode
> on `post-command-hook'."
> :global t
> :group 'hl-line
> - (if global-hl-line-mode
> + (if (and global-hl-line-mode
> + (easy-mmode--globalized-predicate-p global-hl-line-modes))
> (progn
> ;; In case `kill-all-local-variables' is called.
> (add-hook 'change-major-mode-hook #'global-hl-line-unhighlight)
Maybe I'm missing something, but don't you need to consult this new
variable in global-hl-line-highlight-all?
From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 15 08:00:51 2025
Received: (at control) by debbugs.gnu.org; 15 Mar 2025 12:00:51 +0000
Received: from localhost ([127.0.0.1]:39427 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1ttQCA-000894-O4
for submit@debbugs.gnu.org; Sat, 15 Mar 2025 08:00:51 -0400
Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:42094)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.84_2) (envelope-from )
id 1ttQC7-00088e-PO
for control@debbugs.gnu.org; Sat, 15 Mar 2025 08:00:48 -0400
Received: by mail-ed1-x531.google.com with SMTP id
4fb4d7f45d1cf-5dccaaca646so5156430a12.0
for ; Sat, 15 Mar 2025 05:00:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1742040042; x=1742644842; darn=debbugs.gnu.org;
h=to:subject:message-id:date:mime-version:from:from:to:cc:subject
:date:message-id:reply-to;
bh=TKOU9FTmwClzSVHV/+37a6IjI7B4wCbktWlbAtsUQO0=;
b=mkfchnHK8J/O5xmHCyeTRGEh1MGTxowiHBBCedgh7Irnq0yiI4CV9/uXmTFF+mTaqo
KJqQdc81r7Q+zLo5Q4x/rMhl+ovKy3JHFhno/gu3y1fgeg7tIX4xfZx12JRzjaUt6K9a
mR+92owqos/rfks1mwujniTtEicd5HZTjNrI8hQ9DBJoEfMibrVMxwgTw0PkL51yuktH
s8YkXg0b+7sZSQDu+R9t37iDP2SGX4+9SUYlIlxNR0pIlsWSfHKpZhOozODA3t6YtEsU
tFF7Fs2UunAijojHgtUijEERZqH/u48b6rJN4a6ONOoj94RJJe2YExeWXkZq/SM6uRuw
Ab1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1742040042; x=1742644842;
h=to:subject:message-id:date:mime-version:from:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=TKOU9FTmwClzSVHV/+37a6IjI7B4wCbktWlbAtsUQO0=;
b=tM6vXn+SiGTLMwcZh1+lv6AVhxB04UggwqZpPZ1c8eWlSJUHckU1Y2TDJan3k4i1CD
b5GG56B7cw08PmKIIK5rXvaQmyorQDRSIfqD3GxCVdx5h6CFMeyjh2441MGY9iWCiUxM
JxbSJkGdVrp8s/HBbzcvcI1qnEUssCUhxu9czU6A+FfQrMeW58uXZBDbmJHaagDPsFPP
cvcnYvadiXRANqUT8TZNVAZD5YhqpBBEcrt3OTXUj/CGa2MuTxttrA/iHmdZx6AL4CID
VnY7PRcYcc1O2qGC60ybgCvHPfsjjDNZnKZrRKgj3+KsRk7jy3SZchQRC5dhozYIst5i
DFAA==
X-Gm-Message-State: AOJu0YyiByyiY8z3E+E9k0hK5W1ILZNu1EZ5ACnjnY6f7Udm8mdaRPj8
zXdZT/21Vt3gCoJ1RzGeVQmMl7oUQV0WVwvsQJHsbE5T7U7jSWuBQXJfFewNWu6V6/dceJGAJK+
wypjPYT2a/+6GbDAcn42/uDzGOhPIEX8T+1E=
X-Gm-Gg: ASbGncvECNtEaAYtQaYufvi0qqtZxev0sKFYXFtFdiZDSIVvNI1mntm8GYadl+kFKEq
LiERoduuYd2rppC8gsnmf1wVGpJ+WuyniPM3HmvBDaKa9d38YFx4ZbEr0Zb1Jdb7Z1giYMt3gyx
ud2OvMICb0wpFKBbV+jHVO5TrzK/a2
X-Google-Smtp-Source: AGHT+IHi98w4OWb5kBrxsUZTI4ypMZBipaqijWCagyPnTJdwPUwtCflFZZs2w4SgsnyImUKFy6OA3VpG5mvfJhfH5fg=
X-Received: by 2002:a05:6402:2550:b0:5e5:9c04:777 with SMTP id
4fb4d7f45d1cf-5e814d805b7mr9796912a12.6.1742040041605; Sat, 15 Mar 2025
05:00:41 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
HTTPREST; Sat, 15 Mar 2025 05:00:41 -0700
From: Stefan Kangas
MIME-Version: 1.0
Date: Sat, 15 Mar 2025 05:00:41 -0700
X-Gm-Features: AQ5f1Jo1WVXGPu0ID8E3mqPRJZ2Zgk79GKNgWYrE7-YEF-UKCYrKE0VCZt7yHnI
Message-ID:
Subject: control message for bug #77022
To: control@debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: control
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: -1.0 (-)
severity 77022 wishlist
quit
From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 15 14:35:56 2025
Received: (at 77022) by debbugs.gnu.org; 15 Mar 2025 18:35:57 +0000
Received: from localhost ([127.0.0.1]:43529 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1ttWMR-0008F4-NV
for submit@debbugs.gnu.org; Sat, 15 Mar 2025 14:35:56 -0400
Received: from mail-oa1-x43.google.com ([2001:4860:4864:20::43]:44524)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.84_2) (envelope-from )
id 1ttWMN-0008E5-Fz
for 77022@debbugs.gnu.org; Sat, 15 Mar 2025 14:35:48 -0400
Received: by mail-oa1-x43.google.com with SMTP id
586e51a60fabf-2addd5053c0so2520664fac.1
for <77022@debbugs.gnu.org>; Sat, 15 Mar 2025 11:35:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1742063740; x=1742668540; darn=debbugs.gnu.org;
h=mime-version:user-agent:message-id:date:references:in-reply-to
:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=XUJ2xes9xeS8Ch8t/Pps0MFQZobKxp+2DB6FNTJxiGI=;
b=aK9YmTyY+WCgwOqRVahtkpaWugnetyubodX4LuZeTAwHSQUcmj23t4rHiMxFrifSGn
y/wFFPKsc1hW6FKxMOfamksXqINajviLZhKxmd442v5kSuPufBi9w0+JtBbnBL7httRN
E0nIrezKiRv+5/2YxtCcSx1N9EZVfxKIB8k4+j7d4riA9UYg446H9e1Cye4MCgPEJ4oF
bKCz3STYL319LJfDqAbgA4YNMNZzV57qGs2Db2kQxyxxKKDA59uXO3K1GKw66FcympE5
ArH/mCSbIOhcujBxZldtuP0pNgT1XaMWjtU8g1pRn/dgwHYc4dSZB4C02SP5dLyagXwb
W+kw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1742063740; x=1742668540;
h=mime-version:user-agent:message-id:date:references:in-reply-to
:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=XUJ2xes9xeS8Ch8t/Pps0MFQZobKxp+2DB6FNTJxiGI=;
b=r3lsYt9ixVMdUgqon+ZwEMD3QAs0zBEQpavLN3ega0IU9/8sLOnAb/BaRsy7Qb7Mko
wjh8/KPIBqLVNzGNOdfEabtTMIFRb6uFZKKxs6+kT+Ny/ekkokpn0WYUIF/ah5UoI9qo
bA3qNoqk19c+ra14KOaIOeyivMkUJPuiWLPfJ95pVr0ciNbwA0ZA4vVpuF7pEZw5XY5R
GRRRlgWyujxm21BbUyWw3w9r52FXH3HgzVaIdjTz3nki6VdpBt7t0YgBnlvJG/XxYHWZ
mI7Ptkak7lkK5bQQQMrEuegSlmJakLTVpp6i9dzQ6Xr0i+R3wyjCw7Y/E1iD9wRz75p8
6B3A==
X-Gm-Message-State: AOJu0YwB0vVteSvoCNRI+WEGQaosWzrs3SAH1FXPzvh84W5sSuNqfEli
Ao8ixWlV2fBsVHHYGGvupSm4/bDRDgr0L7B6Rjef+/61Yk0JClsVHj2LUFl9
X-Gm-Gg: ASbGncsXUmoJDALwqurQKKLYthIUDgq1/808n5DrA6YwfZVTCKSrgMZhGvjJ84igmZo
fF3Y8WbnOIEiz72F+jPoec4DpmxFyxfHtKZuuXhsHo+3k8ZR6C8dV6XjrX/pGVa6fQme0V7HRYY
gu/rW3qlYIOvNxDQZGOP9cCEtEGkg3Z7R7keQqTNHYBeujHmY9sGihgDZmTFCfpxDCKzL6bGJFu
C4OYnuB8z16JiGQ2wBoojWyPr7LX8hvfcvW41ZfjhQLdEsAMBZ6UOzGcJHqpwSNhUK9zl+EIdZf
ZAoTRiazRYYy
X-Google-Smtp-Source: AGHT+IHRbVuHQDoek1pQA1tJIPElHug39RmQgyZUbLFTqcMJiVDeFsSDVN0nre1hvCvo1GMqBrvYMw==
X-Received: by 2002:a05:6870:648f:b0:2c2:3da4:6389 with SMTP id
586e51a60fabf-2c690fd7a86mr3968597fac.23.1742063740140;
Sat, 15 Mar 2025 11:35:40 -0700 (PDT)
Received: from fedora ([2806:10ae:e:622a::1]) by smtp.gmail.com with ESMTPSA id
586e51a60fabf-2c6712e1a8bsm1452672fac.39.2025.03.15.11.35.38
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sat, 15 Mar 2025 11:35:39 -0700 (PDT)
From: =?utf-8?Q?Elijah_Gabe_P=C3=A9rez?=
To: Eli Zaretskii
Subject: Re: bug#77022: [PATCH] Allow specify in which major modes
global-hl-line-mode must be enabled.
In-Reply-To: <86pliiy7k5.fsf@gnu.org>
References: <874izv3x5y.fsf@gmail.com>
<86pliiy7k5.fsf@gnu.org>
Date: Sat, 15 Mar 2025 12:35:37 -0600
Message-ID: <87jz8qxhty.fsf@gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 77022
Cc: 77022@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: -0.7 (/)
--=-=-=
Content-Type: multipart/alternative; boundary="==-=-="
--==-=-=
Content-Type: text/plain
Eli Zaretskii writes:
>> +(defcustom global-hl-line-modes t
>> + "Which major modes `hl-line-mode' is switched on in.
>> +This variable can be either t (all major modes), nil (no major modes),
>> +or a list of modes and (not modes) to switch use this minor mode or
>> +not. For instance
>> +
>> + (c-mode (not message-mode mail-mode) text-mode)
>> +
>> +means \"use this mode in all modes derived from `c-mode', don't use in
>> +modes derived from `message-mode' or `mail-mode', but do use in other
>> +modes derived from `text-mode'\". An element with value t means \"use\"
>> +and nil means \"don't use\". There's an implicit nil at the end of the
>> +list."
>> + :type
>> + '(choice (const :tag "Enable in all major modes" t)
>> + (const :tag "Don't enable in any major mode" nil)
> Why is it useful to have a value of nil here? Why would anyone
> activate this mode when the variable has the value nil?
Well, this is extracted by expanding define-globalized-minor-mode macro,
I've deleted them /(i'm wondering why that macro adds them since i find them unnecessaries)/
>> @@ -224,7 +254,8 @@ global-hl-line-mode
>> on `post-command-hook'."
>> :global t
>> :group 'hl-line
>> - (if global-hl-line-mode
>> + (if (and global-hl-line-mode
>> + (easy-mmode--globalized-predicate-p global-hl-line-modes))
>> (progn
>> ;; In case `kill-all-local-variables' is called.
>> (add-hook 'change-major-mode-hook #'global-hl-line-unhighlight)
> Maybe I'm missing something, but don't you need to consult this new
> variable in global-hl-line-highlight-all?
I've moved it to =global-hl-line-highlight=, which should work better.
--==-=-=
Content-Type: text/html
Eli Zaretskii <eliz@gnu.org> writes:
+(defcustom global-hl-line-modes t
+ "Which major modes `hl-line-mode' is switched on in.
+This variable can be either t (all major modes), nil (no major modes),
+or a list of modes and (not modes) to switch use this minor mode or
+not. For instance
+
+ (c-mode (not message-mode mail-mode) text-mode)
+
+means \"use this mode in all modes derived from `c-mode', don't use in
+modes derived from `message-mode' or `mail-mode', but do use in other
+modes derived from `text-mode'\". An element with value t means \"use\"
+and nil means \"don't use\". There's an implicit nil at the end of the
+list."
+ :type
+ '(choice (const :tag "Enable in all major modes" t)
+ (const :tag "Don't enable in any major mode" nil)
Why is it useful to have a value of nil here? Why would anyone
activate this mode when the variable has the value nil?
Well, this is extracted by expanding define-globalized-minor-mode macro,
I've deleted them (i'm wondering why that macro adds them since i find them unnecessaries)
@@ -224,7 +254,8 @@ global-hl-line-mode
on `post-command-hook'."
:global t
:group 'hl-line
- (if global-hl-line-mode
+ (if (and global-hl-line-mode
+ (easy-mmode–globalized-predicate-p global-hl-line-modes))
(progn
;; In case `kill-all-local-variables' is called.
(add-hook 'change-major-mode-hook #'global-hl-line-unhighlight)
Maybe I'm missing something, but don't you need to consult this new
variable in global-hl-line-highlight-all?
I've moved it to global-hl-line-highlight
, which should work better.
--==-=-=--
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
filename=0001-Allow-specify-in-which-major-modes-global-hl-line-mo.patch
>From 293468956984a8fbb92076803b75519b1f1667d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?El=C3=ADas=20Gabriel=20P=C3=A9rez?=
Date: Fri, 14 Mar 2025 19:02:51 -0600
Subject: [PATCH] Allow specify in which major modes global-hl-line-mode must
be enabled.
* lisp/hl-line.el (global-hl-line-modes): New user option.
(global-hl-line-mode, global-hl-line-highlight-all)
(global-hl-line-highlight): Changes.
* etc/NEWS: Document changes.
---
etc/NEWS | 4 ++++
lisp/hl-line.el | 30 +++++++++++++++++++++++++++++-
2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index b33f7cec73f..93716cef1de 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1532,6 +1532,10 @@ commands. When nil, clicking on an inactive Emacs frame will only
activate it. When t (the default), the click will both activate the
frame and be interpreted as a command.
+*** New variable 'global-hl-line-modes'.
+This specifies in which major modes should the 'global-hl-line-mode' be
+switched on.
+
---
*** New user option 'display-fill-column-indicator-warning'.
Customize it to a non-nil value to have the fill-column indicators
diff --git a/lisp/hl-line.el b/lisp/hl-line.el
index 61bdf40222c..0f36b2458ab 100644
--- a/lisp/hl-line.el
+++ b/lisp/hl-line.el
@@ -122,6 +122,33 @@ global-hl-line-sticky-flag
:version "24.1"
:group 'hl-line)
+(defcustom global-hl-line-modes t
+ "Which major modes `hl-line-mode' is switched on in.
+This variable can be either t (all major modes), nil (no major modes),
+or a list of modes and (not modes) to switch use this minor mode or
+not. For instance
+
+ (c-mode (not message-mode mail-mode) text-mode)
+
+means \"use this mode in all modes derived from `c-mode', don't use in
+modes derived from `message-mode' or `mail-mode', but do use in other
+modes derived from `text-mode'\". An element with value t means \"use\"
+and nil means \"don't use\". There's an implicit nil at the end of the
+list."
+ :type
+ '(choice (const :tag "Enable in all major modes" t)
+ (repeat :tag "Rules (earlier takes precedence)..."
+ (choice
+ (const :tag "Enable in all (other) modes" t)
+ (symbol :value fundamental-mode :tag
+ "Enable in major mode")
+ (cons :tag "Don't enable in major modes"
+ (const :tag "Don't enable in..." not)
+ (repeat
+ (symbol :value fundamental-mode :tag
+ "Major mode"))))))
+ :version "31.1")
+
(defvar hl-line-range-function nil
"If non-nil, function to call to return highlight range.
The function of no args should return a cons cell; its car value
@@ -236,7 +263,8 @@ global-hl-line-mode
(defun global-hl-line-highlight ()
"Highlight the current line in the current window."
- (when global-hl-line-mode ; Might be changed outside the mode function.
+ (when (and global-hl-line-mode ; Might be changed outside the mode function.
+ (easy-mmode--globalized-predicate-p global-hl-line-modes))
(unless (window-minibuffer-p)
(unless (overlayp global-hl-line-overlay)
(setq global-hl-line-overlay (hl-line-make-overlay))) ; To be moved.
--
2.47.0
--=-=-=
Content-Type: text/plain
--
- E.G via GNU Emacs and Org.
--=-=-=--
From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 20 09:06:01 2025
Received: (at 77022-done) by debbugs.gnu.org; 20 Mar 2025 13:06:01 +0000
Received: from localhost ([127.0.0.1]:56089 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1tvFaz-0005Cl-Ao
for submit@debbugs.gnu.org; Thu, 20 Mar 2025 09:06:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:56660)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from ) id 1tvFau-0005CN-Tc
for 77022-done@debbugs.gnu.org; Thu, 20 Mar 2025 09:05:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1tvFap-0004Ga-Hp; Thu, 20 Mar 2025 09:05:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
Date; bh=nntm2DMThWEDoExqB0TWufj/XIBPrE4PGDf5FaPDliw=; b=R7OnL6UgAWF0QfXb4L2T
bSdUmDfNL8cCJPScUn0zgD4fVASgJEiLCZeu7r13cntGZwpQZUJU5HPcFNjJmIcpKYQADdcd0474O
gA0510tR9Z/cMn0a9ChuKzVJnjLrZ91pK2pfMuzolS5a2jjSS5Dy6ADLZL0Fs17ai8lM9PnvrwW1B
i84fuN1PMid+6QAB9GCsjrpbbwii9/yTG0BHhmIuHJX6W1pDK0Bn1NgBn/07YLmPwEtSBHtp+xrZ6
nNhHsmLMFEIu6ejgoo+Ah+pEmB6BI0ehveBGdujAXcl6bFqVUDch6OpuSwbAQoJ7bSy5brdikT0Ks
Cqe8oiAdgCbvjg==;
Date: Thu, 20 Mar 2025 15:05:47 +0200
Message-Id: <86plibn978.fsf@gnu.org>
From: Eli Zaretskii
To: Elijah Gabe =?utf-8?Q?P=C3=A9rez?=
In-Reply-To: <87jz8qxhty.fsf@gmail.com> (message from Elijah Gabe
=?utf-8?Q?P=C3=A9rez?= on Sat, 15 Mar 2025 12:35:37 -0600)
Subject: Re: bug#77022: [PATCH] Allow specify in which major modes
global-hl-line-mode must be enabled.
References: <874izv3x5y.fsf@gmail.com>
<86pliiy7k5.fsf@gnu.org> <87jz8qxhty.fsf@gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77022-done
Cc: 77022-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 (---)
> From: Elijah Gabe Pérez
> Cc: 77022@debbugs.gnu.org
> Date: Sat, 15 Mar 2025 12:35:37 -0600
>
> Eli Zaretskii writes:
>
> +(defcustom global-hl-line-modes t + "Which major modes `hl-line-mode' is switched on in. +This
> variable can be either t (all major modes), nil (no major modes), +or a list of modes and (not modes) to
> switch use this minor mode or +not. For instance + + (c-mode (not message-mode mail-mode)
> text-mode) + +means \"use this mode in all modes derived from `c-mode', don't use in +modes derived
> from `message-mode' or `mail-mode', but do use in other +modes derived from `text-mode'\". An
> element with value t means \"use\" +and nil means \"don't use\". There's an implicit nil at the end of the
> +list." + :type + '(choice (const :tag "Enable in all major modes" t) + (const :tag "Don't enable in any
> major mode" nil)
>
> Why is it useful to have a value of nil here? Why would anyone activate this mode when the variable
> has the value nil?
>
> Well, this is extracted by expanding define-globalized-minor-mode macro, I've deleted them (i'm wondering
> why that macro adds them since i find them unnecessaries)
>
> @@ -224,7 +254,8 @@ global-hl-line-mode on `post-command-hook'." :global t :group 'hl-line - (if
> global-hl-line-mode + (if (and global-hl-line-mode + (easy-mmode–globalized-predicate-p
> global-hl-line-modes)) (progn ;; In case `kill-all-local-variables' is called. (add-hook
> 'change-major-mode-hook #'global-hl-line-unhighlight)
>
> Maybe I'm missing something, but don't you need to consult this new variable in
> global-hl-line-highlight-all?
>
> I've moved it to global-hl-line-highlight, which should work better.
Thanks, installed on master, and closing the bug.
From unknown Thu Jun 19 13:59:47 2025
Received: (at fakecontrol) by fakecontrolmessage;
To: internal_control@debbugs.gnu.org
From: Debbugs Internal Request
Subject: Internal Control
Message-Id: bug archived.
Date: Fri, 18 Apr 2025 11:24:21 +0000
User-Agent: Fakemail v42.6.9
# This is a fake control message.
#
# The action:
# bug archived.
thanks
# This fakemail brought to you by your local debbugs
# administrator