# HG changeset patch # User Kenichi Handa # Date 1105963676 0 # Node ID 7feda13f67b61034cbc4c4cf0c634420201eb311 # Parent c43084d0b52b021d216d3e1c176f7fef4af5073d These changes are to fix the code merged from trunk for the change on 2005-01-13. (ispell-unified-chars-table): Delete it. (ispell-get-decoded-string): Don't check ispell-unified-chars-table. diff -r c43084d0b52b -r 7feda13f67b6 lisp/textmodes/ispell.el --- a/lisp/textmodes/ispell.el Mon Jan 17 07:35:44 2005 +0000 +++ b/lisp/textmodes/ispell.el Mon Jan 17 12:07:56 2005 +0000 @@ -1074,45 +1074,15 @@ (decode-coding-string str (ispell-get-coding-system)) str)) -(put 'ispell-unified-chars-table 'char-table-extra-slots 0) - -;; Char-table that maps an Unicode character (charset: -;; latin-iso8859-1, mule-unicode-0100-24ff, mule-unicode-2500-34ff) to -;; a string in which all equivalent characters are listed. - -(defconst ispell-unified-chars-table - (let ((table (make-char-table 'ispell-unified-chars-table))) - (map-char-table - #'(lambda (c v) - (if (and v (/= c v)) - (let ((unified (or (aref table v) (string v)))) - (aset table v (concat unified (string c)))))) - ucs-mule-8859-to-mule-unicode) - table)) - -;; Return a string decoded from Nth element of the current dictionary -;; while splice equivalent characters into the string. This splicing -;; is done only if the string is a regular expression of the form -;; "[...]" because, otherwise, splicing will result in incorrect -;; regular expression matching. - +;; Return a string decoded from Nth element of the current dictionary. (defun ispell-get-decoded-string (n) (let* ((slot (assoc ispell-dictionary ispell-dictionary-alist)) (str (nth n slot))) (when (and (> (length str) 0) (not (multibyte-string-p str))) (setq str (ispell-decode-string str)) - (if (and (= (aref str 0) ?\[) - (eq (string-match "\\]" str) (1- (length str)))) - (setq str - (string-as-multibyte - (mapconcat - #'(lambda (c) - (let ((unichar (aref ucs-mule-8859-to-mule-unicode c))) - (if unichar - (aref ispell-unified-chars-table unichar) - (string c)))) - str "")))) + (or (multibyte-string-p str) + (setq str (string-to-multibyte str))) (setcar (nthcdr n slot) str)) str))