From f2a6c14abdd185dfb071dd9c263fb0d931933069 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Sun, 8 Jul 2007 23:41:36 +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 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 -- 2.39.2