OSDN Git Service

set version as 1.4.9-snapshot1
[howm/howm.git] / illusion.el
index e3087ae..91085b4 100644 (file)
@@ -1,5 +1,5 @@
 ;;; illusion.el --- load, edit, and submit something which is not pure file
-;;; Copyright (C) 2005-2018
+;;; Copyright (C) 2005-2021
 ;;;   HIRAOKA Kazuyuki <khi@users.osdn.me>
 ;;;
 ;;; This program is free software; you can redistribute it and/or modify
@@ -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.