-(defun-maybe-cond char-category (character)
- "Return string of category mnemonics for CHAR in TABLE.
-CHAR can be any multilingual character
-TABLE defaults to the current buffer's category table."
- ((and (subr-fboundp 'char-category-set)
- (subr-fboundp 'category-set-mnemonics))
- (category-set-mnemonics (char-category-set character))
- )
- ((fboundp 'char-category-list)
- (mapconcat (lambda (chr)
- (char-to-string (int-char chr)))
- (char-category-list character)
- "")
- )
- ((boundp 'NEMACS)
- (if (< (char-int character) 128)
- "al"
- "j")
- )
- (t
- (if (< (char-int character) 128)
- "al"
- "l")
- ))
+(eval-and-compile
+ ;; Don't use the function `char-category' which may have been
+ ;; defined by emu.el. Anyway, the best way is not to use emu.el.
+ (if (and (fboundp 'char-category)
+ (subrp (symbol-function 'char-category)))
+ (defalias 'mu-cite-char-category 'char-category)
+ (defun-maybe-cond mu-cite-char-category (character &optional table)
+ "Return a string of category mnemonics for CHARACTER in TABLE.
+CHARACTER can be any multilingual characters,
+TABLE defaults to the current buffer's category table (it is currently
+ignored)."
+ ((and (subr-fboundp 'char-category-set)
+ (subr-fboundp 'category-set-mnemonics))
+ (category-set-mnemonics (char-category-set character)))
+ ((and (fboundp 'char-category-list)
+ ;; `char-category-list' returns a list of characters
+ ;; in XEmacs 21.2.25 and later, otherwise integers.
+ (characterp (car-safe (char-category-list ?a))))
+ (concat (char-category-list character)))
+ ((fboundp 'char-category-list)
+ (mapconcat (lambda (chr)
+ (char-to-string (int-char chr)))
+ (char-category-list character)
+ ""))
+ ((boundp 'NEMACS)
+ (if (< (char-int character) 128)
+ "al"
+ "j"))
+ (t
+ (if (< (char-int character) 128)
+ "al"
+ "l")))))