subword

Homepage: https://www.gnu.org/software/emacs

Author: Masatake YAMATO

Summary

Handling capitalized subwords in a nomenclature

Commentary

This package provides the `subword' minor mode, which merges the
old remap-based subword.el (derived from cc-mode code) and
cap-words.el, which takes advantage of core Emacs
word-motion-customization functionality.

In spite of GNU Coding Standards, it is popular to name a symbol by
mixing uppercase and lowercase letters, e.g. "GtkWidget",
"EmacsFrameClass", "NSGraphicsContext", etc.  Here we call these
mixed case symbols `nomenclatures'.  Also, each capitalized (or
completely uppercase) part of a nomenclature is called a `subword'.
Here are some examples:

 Nomenclature           Subwords
 ===========================================================
 GtkWindow          =>  "Gtk" and "Window"
 EmacsFrameClass    =>  "Emacs", "Frame" and "Class"
 NSGraphicsContext  =>  "NS", "Graphics" and "Context"

The subword oriented commands defined in this package recognize
subwords in a nomenclature to move between them and to edit them as
words.  You also get a mode to treat symbols as words instead,
called `superword-mode' (the opposite of `subword-mode').

To make the mode turn on automatically, put the following code in
your .emacs:

(add-hook 'c-mode-common-hook 'subword-mode)


To make the mode turn `superword-mode' on automatically for
only some modes, put the following code in your .emacs:

(add-hook 'c-mode-common-hook 'superword-mode)


Acknowledgment:
The regular expressions to detect subwords are mostly based on
the old `c-forward-into-nomenclature' originally contributed by
Terry_Glanfield dot Southern at rxuk dot xerox dot com.

TODO: ispell-word.

Reverse dependencies