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

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

RE: using use-package


From: Drew Adams
Subject: RE: using use-package
Date: Fri, 14 Aug 2015 10:41:33 -0700 (PDT)

> >> You can try customize-set-variable.
> > Yes.  (Or `customize-set-value', depending on what you want.)
> 
> So this works....
> (customize-set-variable 'tab-width 10)
> but so does this....
> (customize-set-variable 'tab-width "bob")
> when surely it should error? 

If you don't use it interactively (`M-x customize-variable')
then you are on your own wrt such type checks.  IOW, if you
are using Lisp instead of setting it interactively, then check
first, before setting.  Use (get 'tab-width 'custom-type).

> Like this errorers?
> (customize-set-variable org-tags-column "bob")

That raises an error only because you didn't quote `org-tags-column'.
If org.el is loaded then the error is a wrong-type-arg error.
If it is not loaded then the error is an undefined-variable error.



reply via email to

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