diff options
author | Kenichi Handa <handa@m17n.org> | 2009-07-17 12:27:15 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2009-07-17 12:27:15 +0000 |
commit | db170c743ed325cbd0ed5c3ab93a1c07a0ec504f (patch) | |
tree | e92bfef5d32d0f9bd5e5b134f668f4783d0f84d8 /lisp/case-table.el | |
parent | 1fc87f9bebfe9ed4c10bd399f13e6901a6d73954 (diff) | |
download | emacs-db170c743ed325cbd0ed5c3ab93a1c07a0ec504f.tar.gz |
(describe-buffer-case-table): Fix for the case that KEY is a cons.
Diffstat (limited to 'lisp/case-table.el')
-rw-r--r-- | lisp/case-table.el | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/lisp/case-table.el b/lisp/case-table.el index 34e4fc7824c..32df0c2ab32 100644 --- a/lisp/case-table.el +++ b/lisp/case-table.el @@ -39,19 +39,25 @@ (let ((description (make-char-table 'case-table))) (map-char-table (function (lambda (key value) - (if (consp key) - (set-char-table-range description key "case-invariant") - (aset - description key - (cond ((not (natnump value)) - "case-invariant") - ((/= key (downcase key)) - (concat "uppercase, matches " - (char-to-string (downcase key)))) - ((/= key (upcase key)) - (concat "lowercase, matches " - (char-to-string (upcase key)))) - (t "case-invariant")))))) + (if (not (natnump value)) + (if (consp key) + (set-char-table-range description key "case-invariant") + (aset description key "case-invariant")) + (let (from to) + (if (consp key) + (setq from (car key) to (cdr key)) + (setq from (setq to key))) + (while (<= from to) + (aset + description from + (cond ((/= from (downcase from)) + (concat "uppercase, matches " + (char-to-string (downcase from)))) + ((/= from (upcase from)) + (concat "lowercase, matches " + (char-to-string (upcase from)))) + (t "case-invariant"))) + (setq from (1+ from))))))) (current-case-table)) (save-excursion (with-output-to-temp-buffer "*Help*" |