[Top][All Lists]

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

Re: /srv/bzr/emacs/trunk r108099: Silence byte-compiler warnings.

From: Michael Albinus
Subject: Re: /srv/bzr/emacs/trunk r108099: Silence byte-compiler warnings.
Date: Wed, 02 May 2012 19:53:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Juanma Barranquero <address@hidden> writes:

> On Wed, May 2, 2012 at 3:05 PM, Michael Albinus <address@hidden> wrote:
>> Just for curiosity: why that? dbus-debug is declared in dbus.el
> It's declared, but not defined:
>   ;; Declare used subroutines and variables.
>   (declare-function dbus-message-internal "dbusbind.c")
>   [...]
>   (defvar dbus-debug)
>   (defvar dbus-registered-objects-table)

I see. Thanks for the explanation.

> An alternative fix would be to define it properly
>  (defvar  dbus-debug nil "...")
> which would clearly be the right thing if dbus-debug were part of
> dbus.el's API. This is a corner case, because it is not advertised as
> such, just used in a macroexpansion.

`dbus-debug' is declared & defined un dbusbind.c, where it belongs
to. Your proposal would work, but it would be another dirty declaration
just in order to make the byte compiler silent.

The real solution would be to exclude notification.el (and other
packages) from byte compilation, if Emacs hasn't been compiled with
D-Bus support. Unfortunately, I don't know how to say this.

;; Local Variables:
;; no-byte-compile: (null (featurep 'dbusbind))
;; End: 

does not work, because the value for `no-byte-compile' is not evaluated.

;; Local Variables:
;; eval: (setq no-byte-compile (null (featurep 'dbusbind)))
;; End: 

doesn't work either.

>     Juanma

Best regards, Michael.

reply via email to

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