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-p | If non-nil, remove separators when writing glasses buffer to a file. |
glasses-face | Face to use for capital letters of identifiers where separators were added. |
glasses-mode | Non-nil if Glasses mode is enabled. |
glasses-mode-hook | Hook run after entering or leaving ‘glasses-mode’. |
glasses-original-separator | String to be displayed as ‘glasses-separator’ in separator positions. |
glasses-separate-capital-groups | If non-nil, try to separate groups of capital letters. |
glasses-separate-parentheses-exceptions | List of regexp that are exceptions for ‘glasses-separate-parentheses-p’. |
glasses-separate-parentheses-p | If non-nil, ensure space between an identifier and an opening parenthesis. |
glasses-separator | String to be displayed as a visual separator in identifiers. |
glasses-uncapitalize-p | If non-nil, downcase embedded capital letters in identifiers. |
glasses-uncapitalize-regexp | Regexp 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 | () |