summaryrefslogtreecommitdiff
path: root/etc/NEWS
diff options
context:
space:
mode:
authorSpencer Baugh <sbaugh@catern.com>2023-10-21 11:09:39 -0400
committerEli Zaretskii <eliz@gnu.org>2023-10-29 13:32:43 +0200
commit5c8fc0b0594b1e3af43d86c0bc96e10d03bc75a2 (patch)
tree37e56deacbaaa4492eff5c0211ec362dbfc1a409 /etc/NEWS
parent3dca52dd422c50ebf24a304e7c3d36cf5f1c55cf (diff)
downloademacs-5c8fc0b0594b1e3af43d86c0bc96e10d03bc75a2.tar.gz
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): New function. (case_character_impl, case_character): Use 'case_ch_is_word'. (syms_of_casefiddle): Define 'case-symbols-as-words'. * 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'. (Bug#66614)
Diffstat (limited to 'etc/NEWS')
-rw-r--r--etc/NEWS8
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index ed9f1a2..269346b 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1194,6 +1194,14 @@ instead of "ctags", "ebrowse", "etags", "hexl", "emacsclient", and
subprocess.
+++
+** New variable 'case-symbols-as-words' affects case operations for symbols.
+If non-nil, then case operations such as 'upcase-initials' or
+'replace-match' (with nil FIXEDCASE) will treat the entire symbol name
+as a single word. This is useful for programming languages and styles
+where only the first letter of a symbol's name is ever capitalized.
+It defaults to nil.
+
++++
** 'x-popup-menu' now understands touch screen events.
When a 'touchscreen-begin' or 'touchscreen-end' event is passed as the
POSITION argument, it will behave as if that event was a mouse event.