Author: sasugaanija
Date: Mon Aug 27 07:55:21 2007
New Revision: 4899
Modified:
trunk/emacs/uim-util.el
trunk/emacs/uim.el
Log:
* emacs/uim-util.el
- (uim-delete-atom): New utility function to remove
atoms from a list.
* emacs/uim.el
- (uim-process-agent-output)
- Delete delatom and call uim-delete-atom instead of it.
Modified: trunk/emacs/uim-util.el
==============================================================================
--- trunk/emacs/uim-util.el (original)
+++ trunk/emacs/uim-util.el Mon Aug 27 07:55:21 2007
@@ -305,4 +305,13 @@
(defun uim-point ()
(window-point (get-buffer-window (current-buffer))))
+(defun uim-delete-atom (list)
+ (if (and list
+ (not (atom list)))
+ (if (and (car list)
+ (atom (car list)))
+ (uim-delete-atom (cdr list))
+ (cons (car list) (uim-delete-atom (cdr list))))
+ list))
+
(provide 'uim-util)
Modified: trunk/emacs/uim.el
==============================================================================
--- trunk/emacs/uim.el (original)
+++ trunk/emacs/uim.el Mon Aug 27 07:55:21 2007
@@ -1172,15 +1172,7 @@
;; disable buffer-undo temporarily
(when uim-buffer-undo-list-saved
- (let (delatom)
- (defun delatom (x)
- (if (and x (not (atom x)))
- (if (and (car x) (atom (car x)))
- (delatom (cdr x))
- (cons (car x) (delatom (cdr x))))
- x))
- (setq buffer-undo-list (delatom buffer-undo-list))
- )
+ (setq buffer-undo-list (uim-delete-atom buffer-undo-list))
(setq uim-buffer-undo-list
(append buffer-undo-list uim-buffer-undo-list))