From 6bd7e3b41578032b6310868a3eeb154111c25cfa Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Sun, 8 Jul 2007 23:41:26 +0000 Subject: [PATCH] (file-coding-system-alist): Fix custom type. --- lisp/ChangeLog | 4 ++++ lisp/cus-start.el | 29 ++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bde593b59d9..5d02868adf8 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 Stefan Monnier * vc-cvs.el (vc-cvs-revert): Use vc-default-revert. diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 776d2db868f..9eb1b5292a9 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 -- 2.39.2