--- diclookup-mule-2.3.4/diclookup-mule.el~ 2002-09-21 08:11:01 +0000 +++ diclookup-mule-2.3.4/diclookup-mule.el 2006-03-03 09:33:05 +0000 @@ -480,7 +480,7 @@ (set-buffer-multibyte nil) (insert (ccl-execute-on-string ccl-prog status str contin t)) (goto-char (point-min)) - (let (comp-bytepos-list comp-start case-fold-search) + (let (comp-bytepos-list comp-start comp-end str case-fold-search) (while (search-forward "\200" nil t) (delete-char -1) (setq comp-start (point)) @@ -500,11 +500,25 @@ (forward-char bytes))))) (setq comp-bytepos-list (cons (cons comp-start (point)) comp-bytepos-list))) + (setq comp-bytepos-list (nreverse comp-bytepos-list)) + (setq str (buffer-string)) + (erase-buffer) (set-buffer-multibyte t) + (setq comp-end 0) (while comp-bytepos-list - (compose-region (byte-to-position (car (car comp-bytepos-list))) - (byte-to-position (cdr (car comp-bytepos-list)))) + (setq comp-start (1- (car (car comp-bytepos-list)))) + (insert (decode-coding-string + (substring str comp-end comp-start) 'emacs-mule)) + (setq comp-end (1- (cdr (car comp-bytepos-list)))) + (compose-region (point) + (progn + (insert (decode-coding-string + (substring str comp-start comp-end) + 'emacs-mule)) + (point))) (setq comp-bytepos-list (cdr comp-bytepos-list))) + (insert (decode-coding-string + (substring str comp-end) 'emacs-mule)) (buffer-string)))))))) (defalias 'od-make-char @@ -542,6 +556,9 @@ 'string-bytes 'length)) +(defalias 'od-sref + (if (fboundp 'sref) 'sref 'aref)) + ;;;(defmacro od-char-ascii-p (char) ;;; (if (fboundp 'char-leading-char) ;;; (` (= (char-leading-char (, char)) 0)) @@ -1377,7 +1394,7 @@ (let ((bytes (od-string-bytes pat)) (i 0) kana alpha kanji first char-list) (while (< i bytes) - (let ((c (sref pat i))) + (let ((c (od-sref pat i))) (setq char-list (cons (cond ((or (= ?* c) (= ?* c)) @@ -2231,7 +2248,10 @@ (and od-dict-compute-fill-prefix-func (funcall od-dict-compute-fill-prefix-func)))) (fill-region-as-paragraph (point) end justify-flag)) - (goto-char end)))))) + (goto-char end)))) + (goto-char (point-min)) + (while (search-forward "\n" nil t) + (set-text-properties (1- (point)) (point) nil)))) (defun od-insert-frames (fno &optional ofs double-stop) (let* ((ticket (od-request-frame fno))