all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: Juanma Barranquero <lekktu@gmail.com>, 6262@debbugs.gnu.org
Subject: bug#6262: Please learn the compiler that defface needs a doc string
Date: Wed, 26 May 2010 20:49:40 +0200	[thread overview]
Message-ID: <AANLkTimDG8V26Yyz-APGAcqIRLJLRd2pSOzYArQcwWAB@mail.gmail.com> (raw)
In-Reply-To: <19453.26670.986944.928676@fencepost.gnu.org>

On Wed, May 26, 2010 at 8:27 PM, Glenn Morris <rgm@gnu.org> wrote:
>
> Lennart Borgman wrote (on Wed, 26 May 2010 at 20:09 +0200):
>
>> Try to compile this
>>
>> (defface my-face
>>   '((t (:foreground "black" :background "OrangeRed")))
>>   :group 'web-vcs)
>
> Please, try to start at this point next time.
>
>> You get a warning (I misremembered), but no error. However you get an
>> error when you try to load it.
>>
>> If you just eval the definition you get no warning.
>
> You are asking for argument type checking.


If you do eval-buffer with the above declaration in the buffer you get
a call to custom-declare-face. A check there would be good.

defcustom has such a check. define-minor-mode lacks it just as defface.


> It is akin to asking for the compiler to warn about this:
>
> (load 'not-a-string)


I guess you mean that the macros are just expanded during compilation
and no call to the result is done until loading of the file.

If that is what you mean then my suggestion above should work fine.
Otherwise could you please explain what you mean?


> Pay attention to the compilation warning you do get, which indicates
> there is a problem.


There is an error. Is there any reason the compile can't say that in this case?





  reply	other threads:[~2010-05-26 18:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24 19:47 bug#6262: Please learn the compiler that defface needs a doc string Lennart Borgman
2010-05-26  6:54 ` Glenn Morris
2010-05-26 16:51   ` Lennart Borgman
2010-05-26 17:54     ` Juanma Barranquero
2010-05-26 18:09       ` Lennart Borgman
2010-05-26 18:27         ` Glenn Morris
2010-05-26 18:49           ` Lennart Borgman [this message]
2011-09-21 20:20         ` Lars Magne Ingebrigtsen

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=AANLkTimDG8V26Yyz-APGAcqIRLJLRd2pSOzYArQcwWAB@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=6262@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    --cc=rgm@gnu.org \
    /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.