]> code.delx.au - gnu-emacs/blobdiff - lisp/cus-start.el
Merge from emacs--devo--0
[gnu-emacs] / lisp / cus-start.el
index 9eb1b5292a92dd109ceaf15e46954523348a4c42..e2cb65c82c4ebdb2420b29cb64181f1b6327b9c3 100644 (file)
@@ -10,7 +10,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -116,26 +116,18 @@ 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
-                :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))))
+              :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
+                            :match (lambda (widget value)
+                                     (and value (not (functionp value)))))
+                           (function :value ignore))))
             (selection-coding-system mule coding-system)
             ;; dired.c
             (completion-ignored-extensions dired
@@ -430,14 +422,10 @@ since it could result in memory overflow and make Emacs crash."
                       (eq system-type 'ms-dos))
                      ((string-match "\\`w32-" (symbol-name symbol))
                       (eq system-type 'windows-nt))
-                     ((string-match "\\`mac-" (symbol-name symbol))
-                      (eq window-system 'mac))
+                     ((string-match "\\`mac-" (symbol-name symbol))
+                      (or (eq system-type 'mac) (eq system-type 'darwin)))
                      ((string-match "\\`x-.*gtk" (symbol-name symbol))
-                      (or (boundp 'gtk)
-                          (and window-system
-                               (not (eq window-system 'pc))
-                               (not (eq window-system 'mac))
-                               (not (eq system-type 'windows-nt)))))
+                      (featurep 'gtk))
                      ((string-match "\\`x-" (symbol-name symbol))
                       (fboundp 'x-create-frame))
                      ((string-match "selection" (symbol-name symbol))