diff options
author | Katsumi Yamaoka <yamaoka@jpl.org> | 2007-07-08 23:41:36 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2007-07-08 23:41:36 +0000 |
commit | f2a6c14abdd185dfb071dd9c263fb0d931933069 (patch) | |
tree | 4319c969b600ad803e6f62172c1a0b2c700e85b0 /lisp/cus-start.el | |
parent | 85a0b368596336622765c279694529ed3558b488 (diff) | |
download | emacs-f2a6c14abdd185dfb071dd9c263fb0d931933069.tar.gz |
(file-coding-system-alist): Fix custom type.
Diffstat (limited to 'lisp/cus-start.el')
-rw-r--r-- | lisp/cus-start.el | 29 |
1 files changed, 20 insertions, 9 deletions
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 |