emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp case-table.el


From: Kenichi Handa
Subject: [Emacs-diffs] emacs/lisp case-table.el
Date: Fri, 17 Jul 2009 12:27:15 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kenichi Handa <handa>   09/07/17 12:27:15

Modified files:
        lisp           : case-table.el 

Log message:
        (describe-buffer-case-table): Fix for the case that KEY is a cons.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/case-table.el?cvsroot=emacs&r1=1.41&r2=1.42

Patches:
Index: case-table.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/case-table.el,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- case-table.el       5 Jan 2009 03:18:47 -0000       1.41
+++ case-table.el       17 Jul 2009 12:27:15 -0000      1.42
@@ -39,19 +39,25 @@
   (let ((description (make-char-table 'case-table)))
     (map-char-table
      (function (lambda (key value)
+                (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 key
-                   (cond ((not (natnump value))
-                          "case-invariant")
-                         ((/= key (downcase key))
+                       description from
+                       (cond ((/= from (downcase from))
                           (concat "uppercase, matches "
-                                  (char-to-string (downcase key))))
-                         ((/= key (upcase key))
+                                      (char-to-string (downcase from))))
+                             ((/= from (upcase from))
                           (concat "lowercase, matches "
-                                  (char-to-string (upcase key))))
-                         (t "case-invariant"))))))
+                                      (char-to-string (upcase from))))
+                             (t "case-invariant")))
+                      (setq from (1+ from)))))))
      (current-case-table))
     (save-excursion
      (with-output-to-temp-buffer "*Help*"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]