From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Zachary Napier Newsgroups: gmane.emacs.bugs Subject: bug#37137: Setting font-lock-case-fold-search to t causes hangs on certain types in c-mode Date: Sun, 1 Sep 2019 14:28:31 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000001816e90591848aaf" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="65815"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37137@debbugs.gnu.org To: Stefan Monnier , acm@muc.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 01 23:29:16 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i4XPQ-000H0f-GJ for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Sep 2019 23:29:16 +0200 Original-Received: from localhost ([::1]:60362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4XPO-0006CZ-Kx for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Sep 2019 17:29:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36223) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4XPH-0006CC-2c for bug-gnu-emacs@gnu.org; Sun, 01 Sep 2019 17:29:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4XPF-0003Az-VC for bug-gnu-emacs@gnu.org; Sun, 01 Sep 2019 17:29:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48508) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4XPC-0003AS-LX; Sun, 01 Sep 2019 17:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4XPC-00089F-HC; Sun, 01 Sep 2019 17:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Zachary Napier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Sun, 01 Sep 2019 21:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37137 X-GNU-PR-Package: emacs,cc-mode Original-Received: via spool by 37137-submit@debbugs.gnu.org id=B37137.156737333031297 (code B ref 37137); Sun, 01 Sep 2019 21:29:02 +0000 Original-Received: (at 37137) by debbugs.gnu.org; 1 Sep 2019 21:28:50 +0000 Original-Received: from localhost ([127.0.0.1]:57329 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4XP0-00088h-31 for submit@debbugs.gnu.org; Sun, 01 Sep 2019 17:28:50 -0400 Original-Received: from mail-io1-f42.google.com ([209.85.166.42]:35138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4XOx-000880-PC for 37137@debbugs.gnu.org; Sun, 01 Sep 2019 17:28:48 -0400 Original-Received: by mail-io1-f42.google.com with SMTP id b10so25480893ioj.2 for <37137@debbugs.gnu.org>; Sun, 01 Sep 2019 14:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bpPGKPX0zdxGa9HTb8Fk2tSmNWWy4+yH42XTD5OQw+M=; b=RsWqMUmIcf8kS7VBGIBVhamzp/oOu8r8RcFZ4/FQO/PqK2OnfN9jc81QeEZ2fC2FiF CsD77vKmYLbBPIsOaUOrpwnjmYS210lDwPDTOQVGSiBJtLlFreKEWG9VXvjKWtbqBDGw C9Wepj/af9SQ/6DXfXo8Cx9PS8hMoQudk2OY4gXzw6koj625KPkiRN4RWVWQ9of69gMz cqyMlLpIGcke9I3ny/DfKARngE4INJLo4XznhZnR8KAzwUovmsiOJN62ZKlMag3Iex1V g6zv/A8ddw40B24ypgtavSThDWwJMD5XWddQbamennN2zGqT+xJ7/L7a/ODPA6miiSFa DGJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bpPGKPX0zdxGa9HTb8Fk2tSmNWWy4+yH42XTD5OQw+M=; b=Ww/0dTcuRzFV+FAfzMe/yzFSJio527xp4MqEZz3ze9e/mT+0MzaJ+cEEcSS9zjChzN QGk/94gEymTOQ0sPIY5Q0ZjfTajB6VFNLpefPJ1I2nSZNKcY3g6tRXDMCjxg97CX+ynJ FN4OjDIuUT4tMxI8mxhhEVcnYGX6Z6aWP3Pb7OnzPk+PimVJc8M/Pw8RPeFt1AojT5q7 1oDEsmbFp8snXRsV1YN/9gRvJIhM3Vz+B8wvXrdFKXz53n9Acspwl9FEJT1p3pfUoai9 2xvLqa4+vMBtSAaORi9CMwtVGWi444kHr/H9P7SBwPyxHC4R/i4pE4Z1PijFW/E9iZHM IrRw== X-Gm-Message-State: APjAAAXF/VzDcH+O5lQB6xx21BWBNZCW9ikGUscFsk9VNiqwiF/I9YnP 8AIC7GmBlg3nc7ip56vUTltGqJlcKsVBngLaTle8RJZR X-Google-Smtp-Source: APXvYqx+0q3JGv0ujiWeaLlLF1BuF39WjDhtg7wYCmXguXPpp2d0EA6yu9PTqCZf95ppY9jsVPWd7bet6BgL+41+5Wc= X-Received: by 2002:a02:2ac7:: with SMTP id w190mr17717803jaw.19.1567373322097; Sun, 01 Sep 2019 14:28:42 -0700 (PDT) In-Reply-To: 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:166153 Archived-At: --0000000000001816e90591848aaf Content-Type: text/plain; charset="UTF-8" Hello Alen and Stefan, > May I ask why you're making this setting? > How did you end up with that? > font-lock-keywords-case-fold-search is not a customize variable, so you > should not set it with custom-set-variables. I inherited this .emacs file from someone else who had this set. I'm guessing it used to be customizable? If it really isn't proper to customize it this way thats fine. I can disable it with no real issues. I can just change the regexps I am using in font-lock-add-keywords. I assumed that it could be customized because if I did a search the customize option for it showed up, but maybe improperly setting it with custom-set-variables just adds it to Customize. On Sun, Aug 25, 2019 at 11:12 AM Stefan Monnier wrote: > > I have in my .emacs file only these two lines: > > > > (custom-set-variables > > '(font-lock-keywords-case-fold-search t)) > > How did you end up with that? > font-lock-keywords-case-fold-search is not a customize variable, so you > should not set it with custom-set-variables. > > > Then if I visit an empty or nonexistent C file and just type "LONG" > > (in all caps or with at least one letter being capital), Emacs will > > hang after typing the final G but before the G appears on screen > > Clearly not a desirable behavior, indeed, but the above var setting is > clearly a pilot error. Of course > > (setq-default font-lock-keywords-case-fold-search t) > > would give the same result, but I'd also argue that it'd be > a pilot error. > > > Stefan > > --0000000000001816e90591848aaf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Alen and Stefan,

> May =
I ask why you're making this setting?
> How did you end up with that?
> font-lock-keywords-case-fold-search is not a customize variable, so yo=
u
> should not set it with custom-set-variables.
I inherited this .emacs file from someone else who had this
set. I= 'm guessing it used to be customizable? If it really isn't
prope= r to customize it this way thats fine. I can disable it with
no real iss= ues. I can just change the regexps I am using in
font-lock-add-keywords.= I assumed that it could be customized
because if I did a search the cus= tomize option for it showed up,
but maybe improperly setting it with cus= tom-set-variables just
adds it to Customize.

On Sun, Aug 25, 20= 19 at 11:12 AM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> I have in my .emacs file only these two lin= es:
>
>=C2=A0 =C2=A0 =C2=A0(custom-set-variables
>=C2=A0 =C2=A0 =C2=A0 '(font-lock-keywords-case-fold-search t))

How did you end up with that?
font-lock-keywords-case-fold-search is not a customize variable, so you
should not set it with custom-set-variables.

> Then if I visit an empty or nonexistent C file and just type "LON= G"
> (in all caps or with at least one letter being capital), Emacs will > hang after typing the final G but before the G appears on screen

Clearly not a desirable behavior, indeed, but the above var setting is
clearly a pilot error.=C2=A0 Of course

=C2=A0 =C2=A0 (setq-default font-lock-keywords-case-fold-search t)

would give the same result, but I'd also argue that it'd be
a pilot error.


=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan

--0000000000001816e90591848aaf--