From: Katsumi Yamaoka Date: Sun, 8 Jul 2007 23:41:36 +0000 (+0000) Subject: (file-coding-system-alist): Fix custom type. X-Git-Tag: emacs-pretest-22.1.90~1291 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f2a6c14abdd185dfb071dd9c263fb0d931933069;p=emacs.git (file-coding-system-alist): Fix custom type. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f6121660708..1505d43ee76 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-07-08 Katsumi Yamaoka + + * cus-start.el (file-coding-system-alist): Fix custom type. + 2007-07-08 Chong Yidong * longlines.el (longlines-wrap-region): Avoid marking buffer as diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 61f073119e7..38231f29a6c 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -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