summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/ispell.el36
-rw-r--r--lisp/textmodes/sgml-mode.el4
-rw-r--r--lisp/textmodes/tex-mode.el2
3 files changed, 5 insertions, 37 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 2e8b1ab93c6..13eda06c892 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1074,45 +1074,15 @@ Protects against bogus binding of `enable-multibyte-characters' in XEmacs."
(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 splicing 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))
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 9e18dbc0651..b1a1b70397a 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -112,8 +112,6 @@ This takes effect when first loading the `sgml-mode' library.")
(define-key map "\"" 'sgml-name-self))
(when (memq ?' sgml-specials)
(define-key map "'" 'sgml-name-self)))
- (define-key map (vector (make-char 'latin-iso8859-1))
- 'sgml-maybe-name-self)
(let ((c 127)
(map (nth 1 map)))
(while (< (setq c (1+ c)) 256)
@@ -209,7 +207,7 @@ This takes effect when first loading the `sgml-mode' library.")
(let ((table (make-char-table 'sgml-table))
(i 32)
elt)
- (while (< i 256)
+ (while (< i 128)
(setq elt (aref sgml-char-names i))
(if elt (aset table (make-char 'latin-iso8859-1 i) elt))
(setq i (1+ i)))
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index ce34138d5fb..ee975c100b7 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -665,7 +665,7 @@ An alternative value is \" . \", if you use a font with a narrow period."
((not char) font-lock-comment-face)
((eq char ?$) tex-math-face)
(t
- (when (char-valid-p char)
+ (when (characterp char)
;; This is a \verb?...? construct. Let's find the end and mark it.
(save-excursion
(skip-chars-forward (string ?^ char)) ;; Use `end' ?