unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Spencer Baugh <sbaugh@janestreet.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 66614@debbugs.gnu.org
Subject: bug#66614: 29.1.50; Support not capitalizing words inside symbols
Date: Wed, 18 Oct 2023 21:24:49 +0300	[thread overview]
Message-ID: <8334y7okjy.fsf@gnu.org> (raw)
In-Reply-To: <ierlebz50g8.fsf@janestreet.com> (message from Spencer Baugh on Wed, 18 Oct 2023 13:01:43 -0400)

> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Wed, 18 Oct 2023 13:01:43 -0400
> 
> >From e11c5096b2e0a3eddec8fac692142ff31c889109 Mon Sep 17 00:00:00 2001
> From: Spencer Baugh <sbaugh@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?





  reply	other threads:[~2023-10-18 18:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 16:32 bug#66614: 29.1.50; Support not capitalizing words inside symbols Spencer Baugh
2023-10-18 17:01 ` Spencer Baugh
2023-10-18 18:24   ` Eli Zaretskii [this message]
2023-10-18 18:55     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-18 18:34   ` Eli Zaretskii
2023-10-18 19:38     ` Spencer Baugh
2023-10-19  4:35       ` Eli Zaretskii
2023-10-21 15:11         ` sbaugh
2023-10-29 11:42           ` Eli Zaretskii
2023-10-19 10:54       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-21 15:13         ` sbaugh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8334y7okjy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=66614@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=sbaugh@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).