Revision: 6810
Author: ek.kato
Date: Wed Nov 10 21:12:41 2010
Log: * emacs/uim.el (uim-init-buffer) : Fix for emacs24 by Kan-Ru Chen
  (#31539).
  - Use make-local-hook only for XEmacs.
  - Explicitly put 'local for add-hook.

http://code.google.com/p/uim/source/detail?r=6810

Modified:
 /trunk/emacs/uim.el

=======================================
--- /trunk/emacs/uim.el Sun Apr  4 20:35:54 2010
+++ /trunk/emacs/uim.el Wed Nov 10 21:12:41 2010
@@ -335,11 +335,13 @@
   (setq uim-context-id (uim-context-create))

   ;; redraw Uim related objects when window has been resized
-  (make-local-hook 'window-configuration-change-hook)
-  (add-hook 'window-configuration-change-hook 'uim-window-changed nil t)
-
-  (make-local-hook 'kill-buffer-hook)
-  (add-hook 'kill-buffer-hook 'uim-kill-buffer nil t)
+  (when uim-xemacs
+    (make-local-hook 'window-configuration-change-hook))
+ (add-hook 'window-configuration-change-hook 'uim-window-changed nil 'local)
+
+  (when uim-xemacs
+    (make-local-hook 'kill-buffer-hook))
+  (add-hook 'kill-buffer-hook 'uim-kill-buffer nil 'local)

   ;; hide candidate/preedit when buffer-save has been called
   (add-hook 'local-write-file-hooks

Reply via email to