From: Dave Love Date: Tue, 15 Aug 2000 14:04:13 +0000 (+0000) Subject: (glasses) : Add :version. X-Git-Tag: emacs-pretest-21.0.90~2299 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c17c99adbd30f7a40b264cb2e82c70fd29339687;p=emacs.git (glasses) : Add :version. (glasses-custom-set): Use set-default, not set. (minor-mode-alist): Propertize the lighter. (glasses-mode): Provide optional arg. --- diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el index f59ce2b09e1..bc28ca68b96 100644 --- a/lisp/progmodes/glasses.el +++ b/lisp/progmodes/glasses.el @@ -62,6 +62,7 @@ (defgroup glasses nil "Make unreadable code likeThis(one) readable." + :version "21.1" :group 'tools) @@ -128,7 +129,7 @@ separators too." (defun glasses-custom-set (symbol value) "Set value of the variable SYMBOL to VALUE and update overlay categories. Used in :set parameter of some customized glasses variables." - (set symbol value) + (set-default symbol value) (glasses-set-overlay-properties)) @@ -249,11 +250,16 @@ recognized according to the current value of the variable `glasses-separator'." "Mode variable for `glasses-mode'.") (make-variable-buffer-local 'glasses-mode) -(add-to-list 'minor-mode-alist '(glasses-mode " o^o")) +(add-to-list 'minor-mode-alist + (list 'glasses-mode + (propertize " o^o" + 'local-map (make-mode-line-mouse2-map + 'glasses-mode) + 'help-echo "mouse-2: turn off Glasses mode"))) ;;;###autoload -(defun glasses-mode (arg) +(defun glasses-mode (&optional arg) "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."