GNU bug report logs -
#30990
Should the byte compiler warn about :type mismatches?
Previous Next
Full log
Message #26 received at 30990 <at> debbugs.gnu.org (full text, mbox):
Robert Pluim <rpluim <at> gmail.com> writes:
> Hmm. Current attempt attached.
Looks good to me.
> Iʼm having trouble with
> 'sql-postgres-login-params', and 'sql-password-wallet', probably
> because I donʼt know enough about custom, suggestions welcome.
The first one should probably not be a defcustom at all, but perhaps
just...
:type 'sexp
The second looks like a bug:
(defcustom sql-password-wallet
(let (wallet w)
(dolist (ext '(".json.gpg" ".gpg" ".json" "") wallet)
(unless wallet
(setq w (locate-user-emacs-file (concat "sql-wallet" ext)
(concat ".sql-wallet" ext)))
(when (file-exists-p w)
(setq wallet w)))))
It will always be nil, won't it? My guess would be that the intention
was that this should be
(defcustom sql-password-wallet
(let (wallet w)
(dolist (ext '(".json.gpg" ".gpg" ".json" "") wallet)
(unless wallet
(setq w (locate-user-emacs-file (concat "sql-wallet" ext)
(concat ".sql-wallet" ext)))
(when (file-exists-p w)
(setq wallet w))))
wallet)
but I'm not familiar with this at all. But if that's the case the type
should be a choice between nil and `file'.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 238 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.