GNU bug report logs - #66614
29.1.50; Support not capitalizing words inside symbols

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Wed, 18 Oct 2023 16:33:02 UTC

Severity: normal

Found in version 29.1.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 66614 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Spencer Baugh <sbaugh <at> janestreet.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 66614 <at> debbugs.gnu.org
Subject: Re: bug#66614: 29.1.50; Support not capitalizing words inside symbols
Date: Wed, 18 Oct 2023 21:24:49 +0300
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Date: Wed, 18 Oct 2023 13:01:43 -0400
> 
> >From e11c5096b2e0a3eddec8fac692142ff31c889109 Mon Sep 17 00:00:00 2001
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Date: Wed, 18 Oct 2023 12:51:37 -0400
> Subject: [PATCH] Add case-symbols-as-words to configure symbol case behavior
> 
> In some programming languages and styles, a symbol (or every symbol in
> a sequence of symbols) might be capitalized, but the individual words
> making up the symbol should never be capitalized.
> 
> For example, in OCaml, type names Look_like_this and variable names
> look_like_this, but it is basically never correct for something to
> Look_Like_This.  And one might have "aa_bb cc_dd ee_ff" or "Aa_bb
> Cc_dd Ee_ff", but never "Aa_Bb Cc_Dd Ee_Ff".
> 
> To support this, the new variable case-symbols-as-words causes symbol
> constituents to be treated as part of words only for case operations.
> 
> * src/casefiddle.c (case_ch_is_word): Add.
> (case_character_impl): Use case_ch_is_word.
> (case_character): Use case_ch_is_word.
> (syms_of_casefiddle): Define case-symbols-as-words. (bug#66614)
> * src/search.c (Freplace_match): Use case-symbols-as-words when
> calculating case pattern.
> * test/src/casefiddle-tests.el (casefiddle-tests--check-syms)
> (casefiddle-case-symbols-as-words): Test case-symbols-as-words.
> * etc/NEWS: Announce case-symbols-as-words.
> * doc/lispref/strings.texi (Case Conversion): Document
> case-symbols-as-words.

Stefan, any comments?




This bug report was last modified 1 year and 205 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.