Variable: subword-mode

subword-mode is a buffer-local variable defined in subword.el.gz.

Documentation

Non-nil if Subword mode is enabled.

Use the command subword-mode(var)/subword-mode(fun) to change this variable.

View in manual

Probably introduced at or before Emacs version 24.4.

Key Bindings

Aliases

c-subword-mode(var)/c-subword-mode(fun) (obsolete since 24.3)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/subword.el.gz
;;;###autoload
(define-minor-mode subword-mode
  "Toggle subword movement and editing (Subword mode).

Subword mode is a buffer-local minor mode.  Enabling it changes
the definition of a word so that word-based commands stop inside
symbols with mixed uppercase and lowercase letters,
e.g. \"GtkWidget\", \"EmacsFrameClass\", \"NSGraphicsContext\".

Here we call these mixed case symbols `nomenclatures'.  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\"

This mode changes the definition of a word so that word commands
treat nomenclature boundaries as word boundaries."
    :lighter " ,"
    (when subword-mode (superword-mode -1))
    (subword-setup-buffer))