]> git.eshelyaron.com Git - emacs.git/commitdiff
(file-coding-system-alist): Fix previous commit.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 9 Jul 2007 01:27:20 +0000 (01:27 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 9 Jul 2007 01:27:20 +0000 (01:27 +0000)
lisp/cus-start.el

index 38231f29a6c6ad56a4e0878a5c16e29e67a1ab8d..76a4710b84645a957a9a928f427e3268ae5b009b 100644 (file)
@@ -116,26 +116,18 @@ 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
-                :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))))
+              :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
+                            :match (lambda (widget value)
+                                     (and value (not (functionp value)))))
+                           (function :value ignore))))
             (selection-coding-system mule coding-system)
             ;; dired.c
             (completion-ignored-extensions dired