]> git.eshelyaron.com Git - emacs.git/commitdiff
Wrap (require 'help-mode) by
authorKenichi Handa <handa@m17n.org>
Mon, 6 Aug 2007 01:03:00 +0000 (01:03 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 6 Aug 2007 01:03:00 +0000 (01:03 +0000)
eval-when-compile.
(quail-help-init): New function.
(quail-help): Call quail-help-init.
(quail-store-decode-map-key): Change it to a function.

lisp/ChangeLog
lisp/international/quail.el

index 54cd7c66608c135d0bdc6884c324d15ffdae7af4..70fbba60737c3698749587b9bbb1be00a19505e0 100644 (file)
@@ -1,3 +1,11 @@
+2007-08-06  Kenichi Handa  <handa@m17n.org>
+
+       * international/quail.el: Wrap (require 'help-mode) by
+       eval-when-compile.
+       (quail-help-init): New function.
+       (quail-help): Call quail-help-init.
+       (quail-store-decode-map-key): Change it to a function.
+
 2007-08-05  Jason Rumney  <jasonr@gnu.org>
 
        * vc.el (vc-rollback): Add norevert argument back.
index 774e3c142697ada31929a07d534edc60ba38016f..98d4cc80ec57619baff7c828ba06883eb574d3df 100644 (file)
@@ -55,7 +55,7 @@
 
 ;;; Code:
 
-(require 'help-mode)
+(eval-when-compile (require 'help-mode))
 
 (defgroup quail nil
   "Quail: multilingual input method."
@@ -2431,22 +2431,27 @@ should be made by `quail-build-decode-map' (which see)."
        (insert ?\n))
       (insert ?\n))))
 
-(define-button-type 'quail-keyboard-layout-button
-  :supertype 'help-xref
-  'help-function '(lambda (layout)
-                   (help-setup-xref `(quail-keyboard-layout-button ,layout) nil)
-                   (quail-show-keyboard-layout layout))
-  'help-echo (purecopy "mouse-2, RET: show keyboard layout"))
-
-(define-button-type 'quail-keyboard-customize-button
-  :supertype 'help-customize-variable
-  'help-echo (purecopy "mouse-2, RET: customize keyboard layout"))
+(defun quail-help-init ()
+  (unless (featurep 'help-mode)
+    (require 'help-mode)
+    (define-button-type 'quail-keyboard-layout-button
+      :supertype 'help-xref
+      'help-function '(lambda (layout)
+                       (help-setup-xref `(quail-keyboard-layout-button ,layout)
+                                        nil)
+                       (quail-show-keyboard-layout layout))
+      'help-echo (purecopy "mouse-2, RET: show keyboard layout"))
+
+    (define-button-type 'quail-keyboard-customize-button
+      :supertype 'help-customize-variable
+      'help-echo (purecopy "mouse-2, RET: customize keyboard layout"))))
 
 (defun quail-help (&optional package)
   "Show brief description of the current Quail package.
 Optional arg PACKAGE specifies the name of alternative Quail
 package to describe."
   (interactive)
+  (quail-help-init)
   (let ((help-xref-mule-regexp help-xref-mule-regexp-template)
        (default-enable-multibyte-characters enable-multibyte-characters)
        (package-def
@@ -2629,7 +2634,7 @@ KEY BINDINGS FOR CONVERSION
 ;; it is not yet stored.  As a result, the element is a string or a
 ;; list of strings.
 
-(defsubst quail-store-decode-map-key (table char key)
+(defun quail-store-decode-map-key (table char key)
   (let ((elt (aref table char)))
     (if elt
        (if (consp elt)