]> 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:36 +0000 (23:41 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 8 Jul 2007 23:41:36 +0000 (23:41 +0000)
lisp/ChangeLog
lisp/cus-start.el

index f6121660708925cfa897d2ec4d0b8d2e3c2ab38e..1505d43ee76bf5d8a95bc75aa3e26def9f9c3ab4 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  Chong Yidong  <cyd@stupidchicken.com>
 
        * longlines.el (longlines-wrap-region): Avoid marking buffer as
index 61f073119e7c10e6c38ccf8fe763964e9c8df458..38231f29a6c6ad56a4e0878a5c16e29e67a1ab8d 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