3 Fix build with emacs24. From FreeBSD ports.
5 --- psgml-edit.el.orig 2005-03-05 16:23:40.000000000 +0000
7 @@ -1870,24 +1870,28 @@ characters in the current coding system.
9 (or (looking-at "&#\\([0-9]+\\)[;\n]?")
10 (error "No character reference after point"))
11 - (let ((c (string-to-int (buffer-substring (match-beginning 1)
12 + (let ((c (string-to-number (buffer-substring (match-beginning 1)
14 (delete-region (match-beginning 0)
16 (if (fboundp 'decode-char) ; Emacs 21, Mule-UCS
17 (setq c (decode-char 'ucs c))
18 + (if (fboundp 'ucs-to-char)
19 + (setq c (ucs-to-char c))
20 ;; Else have to assume 8-bit character.
21 - (if (fboundp 'unibyte-char-to-multibyte) ; Emacs 20
22 - (setq c (unibyte-char-to-multibyte c))))
23 + (if (fboundp 'unibyte-char-to-multibyte) ; Emacs 20
24 + (setq c (unibyte-char-to-multibyte c)))))
26 ;; Convert character to &#nn;
28 (let ((c (following-char)))
30 - (if (fboundp 'encode-char)
31 - (setq c (encode-char c 'ucs))
32 - (if (fboundp 'multibyte-char-to-unibyte)
33 - (setq c (multibyte-char-to-unibyte c))))
34 + (if (fboundp 'char-to-ucs)
35 + (setq c (char-to-ucs c))
36 + (if (fboundp 'encode-char)
37 + (setq c (encode-char c 'ucs))
38 + (if (fboundp 'multibyte-char-to-unibyte)
39 + (setq c (multibyte-char-to-unibyte c)))))
40 (insert (format "&#%d;" c))))))
42 (defun sgml-expand-entity-reference ()