]> git.eshelyaron.com Git - emacs.git/commitdiff
(file-coding-system-alist): Fix custom type.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 8 Jul 2007 23:41:26 +0000 (23:41 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 8 Jul 2007 23:41:26 +0000 (23:41 +0000)
lisp/ChangeLog
lisp/cus-start.el

index bde593b59d9392b4a96254c4025be37484f347b4..5d02868adf8b499819e8e46871bba0705cc150c9 100644 (file)
@@ -1,3 +1,7 @@
+2007-07-08  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * cus-start.el (file-coding-system-alist): Fix custom type.
+
 2007-07-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * vc-cvs.el (vc-cvs-revert): Use vc-default-revert.
index 776d2db868f43aa766e8f685638cf07e616f9dc9..9eb1b5292a92dd109ceaf15e46954523348a4c42 100644 (file)
@@ -116,15 +116,26 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
              mule
              (alist
               :key-type (regexp :tag "File regexp")
-              :value-type (choice
-                           :value (undecided . undecided)
-                           (cons :tag "Encoding/decoding pair"
-                                 :value (undecided . undecided)
-                                 (coding-system :tag "Decoding")
-                                 (coding-system :tag "Encoding"))
-                           (coding-system :tag "Single coding system"
-                                          :value undecided)
-                           (function :value ignore))))
+              :value-type
+              (choice
+               :value (undecided . undecided)
+               (cons :tag "Encoding/decoding pair"
+                     :value (undecided . undecided)
+                     (coding-system :tag "Decoding")
+                     (coding-system :tag "Encoding"))
+               (coding-system
+                :tag "Single coding system"
+                :value undecided
+                :validate
+                (lambda (widget)
+                  (unless (or (coding-system-p (widget-value widget))
+                              (functionp (widget-value widget)))
+                    (widget-put
+                     widget
+                     :error (format "Invalid coding system: %S"
+                                    (widget-value widget)))
+                    widget)))
+               (function :value ignore))))
             (selection-coding-system mule coding-system)
             ;; dired.c
             (completion-ignored-extensions dired