all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: alex.branham@gmail.com, Stefan Kangas <stefan@marxist.se>,
	30990@debbugs.gnu.org
Subject: bug#30990: Should the byte compiler warn about :type mismatches?
Date: Wed, 09 Oct 2019 19:57:22 +0200	[thread overview]
Message-ID: <87o8yp7qf1.fsf@gnus.org> (raw)
In-Reply-To: <m236g282lf.fsf@gmail.com> (Robert Pluim's message of "Wed, 09 Oct 2019 15:34:20 +0200")

Robert Pluim <rpluim@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





  reply	other threads:[~2019-10-09 17:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29 16:55 bug#30990: Should the byte compiler warn about :type mismatches? Alex Branham
2018-03-29 17:11 ` Glenn Morris
2020-09-25 12:44   ` Lars Ingebrigtsen
2019-09-28 19:00 ` Stefan Kangas
2019-09-28 19:21   ` Eli Zaretskii
2019-09-30 11:49     ` Robert Pluim
2019-09-30 15:45       ` Lars Ingebrigtsen
2019-10-09 13:34         ` Robert Pluim
2019-10-09 17:57           ` Lars Ingebrigtsen [this message]
2019-10-09 20:05           ` Lars Ingebrigtsen
2019-10-10 13:11             ` Robert Pluim
2019-10-11  5:54               ` Lars Ingebrigtsen
2020-09-25 13:18               ` Lars Ingebrigtsen
2020-09-25 13:36                 ` Lars Ingebrigtsen
2020-09-25 13:43                   ` Lars Ingebrigtsen
2019-10-09 18:44 ` Mattias Engdegård
2019-10-11  9:31 ` Robert Pluim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8yp7qf1.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=30990@debbugs.gnu.org \
    --cc=alex.branham@gmail.com \
    --cc=eliz@gnu.org \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.