validate.el icon indicating copy to clipboard operation
validate.el copied to clipboard

Setting company-show-numbers fails

Open xenodium opened this issue 4 years ago • 0 comments

Thanks for validate.el. I use it throughout in my config.

Unsure if I'm misuing validate-setq or if a definition needs to be updated.

Definition:

(defcustom company-show-numbers nil
  "If enabled, show quick-access numbers for the first ten candidates."
  :type '(choice (const :tag "off" nil)
                 (const :tag "left" 'left)
                 (const :tag "on" 't)))

Tried:

(validate-setq company-show-numbers 't)

Error:

validate-value: Looking for `(choice (const :tag "off" nil) (const :tag "left" ...) (const :tag "on" ...))' in `t' failed because:
  all of the options failed
    Looking for `(const :tag "off" nil)' in `t' failed because:
      not the expected value
    Looking for `(const :tag "left" 'left)' in `t' failed because:
      not the expected value
    Looking for `(const :tag "on" 't)' in `t' failed because:
      not the expected value

Also tried:

(validate-setq company-show-numbers t)

Error:

validate-value: Looking for `(choice (const :tag "off" nil) (const :tag "left" ...) (const :tag "on" ...))' in `t' failed because:
  all of the options failed
    Looking for `(const :tag "off" nil)' in `t' failed because:
      not the expected value
    Looking for `(const :tag "left" 'left)' in `t' failed because:
      not the expected value
    Looking for `(const :tag "on" 't)' in `t' failed because:
      not the expected value

xenodium avatar Jun 07 '21 18:06 xenodium