X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/8121e4813da7e5898eb216a5de3c17f4875cac61..10e00bd5b43c277ab59f336966a4a3ed35678d40:/admin/cus-test.el diff --git a/admin/cus-test.el b/admin/cus-test.el index 6b8ec9abe0..b60eac28d2 100644 --- a/admin/cus-test.el +++ b/admin/cus-test.el @@ -1,6 +1,6 @@ ;;; cus-test.el --- tests for custom types and load problems -;; Copyright (C) 1998, 2000, 2002-2013 Free Software Foundation, Inc. +;; Copyright (C) 1998, 2000, 2002-2014 Free Software Foundation, Inc. ;; Author: Markus Rost ;; Maintainer: Markus Rost @@ -187,6 +187,9 @@ The detected problematic options are stored in `cus-test-errors'." (message "Cus Test running...%s %s" (length cus-test-tested-variables) symbol) (condition-case alpha + ;; FIXME This defaults to 'sexp if no type was specified. + ;; Always report such instances as a type mismatch. + ;; Currently abusing cusver-scan to do that. (let* ((type (custom-variable-type symbol)) (conv (widget-convert type)) (get (or (get symbol 'custom-get) 'default-value)) @@ -202,6 +205,8 @@ The detected problematic options are stored in `cus-test-errors'." ;; Check the values (mapc (lambda (value) + ;; TODO for booleans, check for values that can be + ;; evaluated and are not t or nil. Usually a bug. (unless (widget-apply conv :match value) (setq mismatch 'mismatch))) values)