File: glasses.el.html

This file defines a minor mode for making unreadableIdentifiersLikeThis readable. In some environments, for instance Java, it is common to use such unreadable identifiers. It is not good to use underscores in identifiers of your own project in such an environment to make your sources more readable, since it introduces undesirable confusion, which is worse than the unreadability. Fortunately, you use Emacs for the subproject, so the problem can be solved some way.

This file defines the glasses-mode(var)/glasses-mode(fun) minor mode, which displays underscores between all the pairs of lower and upper English letters. (This only
displays underscores, the text is not changed actually.) Alternatively, you
can say you want the capitals in some given face (e.g. bold).

The mode does something usable, though not perfect. Improvement suggestions from Emacs experts are welcome.

If you like in-identifier separators different from underscores, change the value of the variable glasses-separator appropriately. See also the variables glasses-face and glasses-convert-on-write-p. You can also use the command M-x customize-group RET glasses RET.

If you set any of the variables glasses-separator or glasses-face after glasses.el is loaded in a different way than through customize, you should call the function glasses-set-overlay-properties afterwards.

Defined variables (11)

glasses-convert-on-write-pIf non-nil, remove separators when writing glasses buffer to a file.
glasses-faceFace to use for capital letters of identifiers where separators were added.
glasses-modeNon-nil if Glasses mode is enabled.
glasses-mode-hookHook run after entering or leaving ‘glasses-mode’.
glasses-original-separatorString to be displayed as ‘glasses-separator’ in separator positions.
glasses-separate-capital-groupsIf non-nil, try to separate groups of capital letters.
glasses-separate-parentheses-exceptionsList of regexp that are exceptions for ‘glasses-separate-parentheses-p’.
glasses-separate-parentheses-pIf non-nil, ensure space between an identifier and an opening parenthesis.
glasses-separatorString to be displayed as a visual separator in identifiers.
glasses-uncapitalize-pIf non-nil, downcase embedded capital letters in identifiers.
glasses-uncapitalize-regexpRegexp matching beginnings of words to be uncapitalized.

Defined functions (10)

glasses-change(BEG END &optional OLD-LEN)
glasses-convert-to-unreadable()
glasses-custom-set(SYMBOL VALUE)
glasses-make-overlay(BEG END &optional CATEGORY)
glasses-make-readable(BEG END)
glasses-make-unreadable(BEG END)
glasses-mode(&optional ARG)
glasses-overlay-p(OVERLAY)
glasses-parenthesis-exception-p(BEG END)
glasses-set-overlay-properties()

Defined faces (0)