Function: glasses-mode

glasses-mode is an autoloaded, interactive and byte-compiled function defined in glasses.el.gz.

Signature

(glasses-mode &optional ARG)

Documentation

Minor mode for making identifiers likeThis readable.

When this mode is active, it tries to add virtual separators (like underscores) at places they belong to.

This is a minor mode. If called interactively, toggle the Glasses mode mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode.

If called from Lisp, toggle the mode if ARG is toggle. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.

To check whether the minor mode is enabled in the current buffer, evaluate the variable glasses-mode(var)/glasses-mode(fun).

The mode's hook is called both when the mode is enabled and when it is disabled.

Probably introduced at or before Emacs version 21.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/glasses.el.gz
;;; Minor mode definition


;;;###autoload
(define-minor-mode glasses-mode
  "Minor mode for making identifiers likeThis readable.

When this mode is active, it tries to add virtual
separators (like underscores) at places they belong to."
  :group 'glasses :lighter " o^o"
  (save-excursion
    (save-restriction
      (widen)
      ;; We erase all the overlays anyway, to avoid dual sight in some
      ;; circumstances
      (glasses-make-unreadable (point-min) (point-max))
      (if glasses-mode
	  (progn
	    (jit-lock-register 'glasses-change)
	    (add-hook 'write-file-functions
		      'glasses-convert-to-unreadable nil t))
	(jit-lock-unregister 'glasses-change)
	(remove-hook 'write-file-functions
		     'glasses-convert-to-unreadable t)))))