X-Git-Url: http://git.osdn.net/view?p=howm%2Fhowm.git;a=blobdiff_plain;f=illusion.el;fp=illusion.el;h=f8eb6db432da58753add1026982e582afc22464a;hp=dbe2501b2e7426277fe86dbab836d02880e040b8;hb=9fa0ebdc66cff933118e69fdb52424c7aa8c4993;hpb=f9e60187eab9aad697721025242841ae4349e76f diff --git a/illusion.el b/illusion.el index dbe2501..f8eb6db 100644 --- a/illusion.el +++ b/illusion.el @@ -52,7 +52,7 @@ It must return non-nil value for successful case.") (goto-char (point-min)) (set-buffer-modified-p nil)) -(easy-mmode-define-minor-mode illusion-mode +(define-minor-mode illusion-mode "With no argument, this command toggles the mode. Non-null prefix argument turns on the mode. Null prefix argument turns off the mode. @@ -64,17 +64,14 @@ key binding --- ------- \\[illusion-submit] Submit changes " - nil ;; default = off - illusion-lighter ;; mode-line - `( - (,illusion-submit-key . illusion-submit) - ) + :init-value nil ;; default = off + :lighter illusion-lighter ;; mode-line + :keymap `( + (,illusion-submit-key . illusion-submit) + ) + (use-local-map illusion-mode-map) ) -;; emacs20's easy-mmode-define-minor-mode can't have body. sigh... -(add-hook 'illusion-mode-on-hook - (lambda () (use-local-map illusion-mode-map))) - ;;; Example ;; M-x yarot13-find-file to open rot13ed file.