From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66614: 29.1.50; Support not capitalizing words inside symbols Date: Thu, 19 Oct 2023 07:35:33 +0300 Message-ID: <83zg0fmdpm.fsf@gnu.org> References: <831qdrok34.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32491"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66614@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 19 06:37:07 2023 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 1qtKmO-0008BZ-E6 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Oct 2023 06:37:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtKlz-0005FK-8w; Thu, 19 Oct 2023 00:36:39 -0400 Original-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 1qtKlx-0005Ep-0x for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 00:36:37 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtKlw-0005lA-NB for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 00:36:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qtKmM-0006A6-KM for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 00:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Oct 2023 04:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66614 X-GNU-PR-Package: emacs Original-Received: via spool by 66614-submit@debbugs.gnu.org id=B66614.169769017823420 (code B ref 66614); Thu, 19 Oct 2023 04:37:02 +0000 Original-Received: (at 66614) by debbugs.gnu.org; 19 Oct 2023 04:36:18 +0000 Original-Received: from localhost ([127.0.0.1]:35397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtKle-00065I-8v for submit@debbugs.gnu.org; Thu, 19 Oct 2023 00:36:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtKlb-00064e-ME for 66614@debbugs.gnu.org; Thu, 19 Oct 2023 00:36:16 -0400 Original-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 1qtKl3-0005U9-Vw; Thu, 19 Oct 2023 00:35:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BVhg5RbL/BufK6XNfL3LFLA8StdkXPwE4/Xq4htB6rc=; b=f+cxYR+9EgNz VtWZk74xFam8UYP9jt8P5EnIoWvm84a9e6TcEagynQsLNN/0NQ7s+wIG5bURo8kU2hXKHdazxYo6C bG3RZgJ+/03TophIHPAg5J4zvneo5i8zThw14u1AHyAKKfwYklZRPxkURauyic9+dKAYgyreqtvKB VwVsv11oatSpc/o1pdPg8zbqVPFTgtAwySw20ZclP7GzCy1gDQtxa0wNhZTy3x4HVtryfJzIXWGi9 OxUHl0FRuwkHUtY7fbmI5+ytKtZt39/a++AkE1vPemnv/ZZYX4zW7A/VXJ1ZKqMxwtp2ip3aTCVB1 /KJn9pNbhOnYQl7ey8Jbug==; In-Reply-To: (message from Spencer Baugh on Wed, 18 Oct 2023 15:38:34 -0400) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272694 Archived-At: > From: Spencer Baugh > Cc: 66614@debbugs.gnu.org > Date: Wed, 18 Oct 2023 15:38:34 -0400 > > >> + DEFVAR_BOOL ("case-symbols-as-words", case_symbols_as_words, > >> + doc: /* If non-nil, case functions treat symbol syntax as part of words. > >> + > >> +Functions such as `upcase-initials' and `replace-match' check or modify > >> +the case pattern of sequences of characters. Normally, these operate on > >> +sequences of characters whose syntax is word constituent. If this > >> +variable is non-nil, then they operate on sequences of characters who > >> +syntax is either word constituent or symbol constituent. > >> + > >> +This is useful for programming styles which wish to capitalize the > >> +beginning of symbols, but not capitalize individual words in a symbol.*/); > > > > Similar comments about this doc string. > > Fixed. > > > Also, shouldn't this variable be buffer-local? You want certain major > > modes to set it, right? > > Yes, I want certain major modes to set it, although it's also possible > that some users will want to set it globally. > > Are you suggesting it should be a DEFVAR_PER_BUFFER? I can do that, but > I didn't think it was worth putting another slot into struct buffer. You don't have to add it to the buffer structure, you could call Fmake_variable_buffer_local instead. We already do that for some variables. > Plus DEFVAR_PER_BUFFER has bad performance (O(#buffers)) when you > let-bind it, which I expect users might want to do sometimes. That is a separate problem, and adding one more buffer-local variable will hardly change the fact that let-binding and/or temporarily switching buffers is expensive. We should think about correctness before we think about performance. And correctness requires that this variable be buffer-local, as making it global makes no sense IMO.