mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
Remove no-op calls to decode-char with 'ucs' arg
* lisp/gnus/mm-util.el (mm-ucs-to-char): * lisp/language/hanja-util.el (hangul-to-hanja-char): * lisp/leim/quail/hangul.el (hangul3-input-method-internal) (hangul390-input-method-internal): * lisp/nxml/rng-cmpct.el (rng-c-process-escapes): * lisp/nxml/xsd-regexp.el (xsdre-compile-single-char) (xsdre-range-list-to-char-alternative): * lisp/xml.el (xml-parse-string, xml--entity-replacement-text) (xml-substitute-special): Remove calls to decode-char where first argument is 'ucs'; that is now a no-op. Discussed in Bug#52263. * lisp/nxml/xmltok.el (xmltok-unicode-to-char): Make into obsolete function alias for 'identity'. Update single caller.
This commit is contained in:
parent
19307704bd
commit
fad4049a09
7 changed files with 16 additions and 22 deletions
|
|
@ -369,7 +369,7 @@ OVERRIDE is either nil, require or t."
|
|||
(while (re-search-forward "\\\\x+{\\([[:xdigit:]]+\\)}"
|
||||
(point-max)
|
||||
t)
|
||||
(let* ((ch (decode-char 'ucs (string-to-number (match-string 1) 16))))
|
||||
(let* ((ch (string-to-number (match-string 1) 16)))
|
||||
(if (and ch (> ch 0))
|
||||
(let ((begin (match-beginning 0))
|
||||
(end (match-end 0)))
|
||||
|
|
|
|||
|
|
@ -943,7 +943,6 @@ and VALUE-END, otherwise a STRING giving the value."
|
|||
(let ((n (string-to-number (buffer-substring-no-properties start end)
|
||||
base)))
|
||||
(cond ((and (integerp n) (xmltok-valid-char-p n))
|
||||
(setq n (xmltok-unicode-to-char n))
|
||||
(and n (string n)))
|
||||
(t
|
||||
(xmltok-add-error "Invalid character code" start end)
|
||||
|
|
@ -971,11 +970,6 @@ and VALUE-END, otherwise a STRING giving the value."
|
|||
(t (and (> n #xFFFF)
|
||||
(< n #x110000)))))
|
||||
|
||||
(defun xmltok-unicode-to-char (n)
|
||||
"Return the character corresponding to Unicode scalar value N.
|
||||
Return nil if unsupported in Emacs."
|
||||
(decode-char 'ucs n))
|
||||
|
||||
;;; Prolog parsing
|
||||
|
||||
(defvar xmltok-contains-doctype nil)
|
||||
|
|
@ -1766,6 +1760,10 @@ and `xmltok-namespace-attributes'."
|
|||
xmltok-type))
|
||||
(message "Scanned end of file")))
|
||||
|
||||
;;; Obsolete
|
||||
|
||||
(define-obsolete-function-alias 'xmltok-unicode-to-char #'identity "29.1")
|
||||
|
||||
(provide 'xmltok)
|
||||
|
||||
;;; xmltok.el ends here
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ and whose tail is ACCUM."
|
|||
(defun xsdre-compile-single-char (ch)
|
||||
(if (memq ch '(?. ?* ?+ ?? ?\[ ?\] ?^ ?$ ?\\))
|
||||
(string ?\\ ch)
|
||||
(string (decode-char 'ucs ch))))
|
||||
(string ch)))
|
||||
|
||||
(defun xsdre-char-class-to-range-list (cc)
|
||||
"Return a range-list for a symbolic char-class CC."
|
||||
|
|
@ -404,10 +404,6 @@ consisting of a single char alternative delimited with []."
|
|||
(cons last chars)
|
||||
(cons last (cons ?- chars))))))
|
||||
(setq range-list (cdr range-list)))
|
||||
(setq chars
|
||||
(mapcar (lambda (c)
|
||||
(decode-char 'ucs c))
|
||||
chars))
|
||||
(when caret
|
||||
(setq chars (cons ?^ chars)))
|
||||
(when hyphen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue