bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#73098: setopt float warning unexpected


From: Ship Mints
Subject: bug#73098: setopt float warning unexpected
Date: Sat, 7 Sep 2024 09:14:54 -0400

This one bit me yesterday on Emacs 29.3 as I was revising my init file (for the thousandth time this week).

As setopt becomes more widely recommended, people will likely encounter situations like the below where they expect constant numeric types to be coerced.

(defcustom temp-float "Float"
  "Float type."
  :type 'float)

(setopt temp-float 2.0) ; works
(setopt temp-float 2) ; Warning (emacs): Value '2' does not match type float

-Stephane

P.S. I reported a bug to Prot as some much more complex modus defcustom type definitions seem either themselves broken or setopt needs some work to accommodate them.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]