Mercurial > hg > xemacs-beta
comparison lisp/descr-text.el @ 4481:f9c70d94f427
Correct syntax of #'error calls, descr-text.el
2008-07-20 Aidan Kehoe <kehoea@parhasard.net>
* descr-text.el (describe-char-unicode-data):
Correct three calls to #'error; it doesn't take #'message style
format strings and arguments.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 20 Jul 2008 15:04:20 +0200 |
parents | 74caf140505b |
children | 16c9098dd3d2 |
comparison
equal
deleted
inserted
replaced
4480:74caf140505b | 4481:f9c70d94f427 |
---|---|
675 Each element is a list of a property description and the property value. | 675 Each element is a list of a property description and the property value. |
676 The list is null if CHAR isn't found in `describe-char-unicodedata-file'." | 676 The list is null if CHAR isn't found in `describe-char-unicodedata-file'." |
677 (when describe-char-unicodedata-file | 677 (when describe-char-unicodedata-file |
678 (unless (file-exists-p describe-char-unicodedata-file) | 678 (unless (file-exists-p describe-char-unicodedata-file) |
679 (error 'file-error | 679 (error 'file-error |
680 "`unicodedata-file' %s not found" describe-char-unicodedata-file)) | 680 (format "`unicodedata-file' %s not found" |
681 describe-char-unicodedata-file))) | |
681 ;; XEmacs change; accept a character argument, use the cache if | 682 ;; XEmacs change; accept a character argument, use the cache if |
682 ;; appropriate. | 683 ;; appropriate. |
683 (when (characterp char) | 684 (when (characterp char) |
684 (setq char (encode-char char 'ucs))) | 685 (setq char (encode-char char 'ucs))) |
685 (with-temp-buffer | 686 (with-temp-buffer |
695 nil "r" | 696 nil "r" |
696 #o644 'no-conversion-unix)) | 697 #o644 'no-conversion-unix)) |
697 (coding-system-for-read 'no-conversion-unix) | 698 (coding-system-for-read 'no-conversion-unix) |
698 key lookup) | 699 key lookup) |
699 (unless database-handle | 700 (unless database-handle |
700 (error 'io-error "Could not open %s as a %s database" | 701 (error 'io-error |
701 (unidata-generate-database-file-name | 702 (format "Could not open %s as a %s database" |
702 describe-char-unicodedata-file | 703 (unidata-generate-database-file-name |
703 (eighth (file-attributes | 704 describe-char-unicodedata-file |
704 describe-char-unicodedata-file)) | 705 (eighth (file-attributes |
705 unidata-database-format) | 706 describe-char-unicodedata-file)) |
706 unidata-database-format)) | 707 unidata-database-format) |
708 unidata-database-format))) | |
707 (setq key (format "%04X" char) | 709 (setq key (format "%04X" char) |
708 lookup (get-database key database-handle)) | 710 lookup (get-database key database-handle)) |
709 (if lookup | 711 (if lookup |
710 ;; Okay, we have information on that character in particular. | 712 ;; Okay, we have information on that character in particular. |
711 (progn (setq lookup (read lookup)) | 713 (progn (setq lookup (read lookup)) |
759 ";"))))) | 761 ";"))))) |
760 ;; The length depends on whether the last field was empty. | 762 ;; The length depends on whether the last field was empty. |
761 (unless (or (= 13 (length fields)) | 763 (unless (or (= 13 (length fields)) |
762 (= 14 (length fields))) | 764 (= 14 (length fields))) |
763 (error 'invalid-argument | 765 (error 'invalid-argument |
764 "Invalid contents in %s" describe-char-unicodedata-file)) | 766 (format "Invalid contents in %s" |
767 describe-char-unicodedata-file))) | |
765 ;; The field names and values lists are slightly | 768 ;; The field names and values lists are slightly |
766 ;; modified from Mule-UCS unidata.el. | 769 ;; modified from Mule-UCS unidata.el. |
767 (apply #'list | 770 (apply #'list |
768 (list "Name" (let ((name (nth 0 fields))) | 771 (list "Name" (let ((name (nth 0 fields))) |
769 ;; Check for <..., First>, <..., Last> | 772 ;; Check for <..., First>, <..., Last> |