GNU bug report logs - #19424
23.4; incorrect byte-compiler warning for `mode-line-format'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 21 Dec 2014 17:25:02 UTC

Severity: wishlist

Tags: fixed

Found in version 23.4

Fixed in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19424 in the body.
You can then email your comments to 19424 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19424; Package emacs. (Sun, 21 Dec 2014 17:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 21 Dec 2014 17:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.4; incorrect byte-compiler warning for `mode-line-format'
Date: Sun, 21 Dec 2014 09:23:30 -0800 (PST)
This is the warning:

    Warning: `default-mode-line-format' is an obsolete variable
    (as of Emacs 23.2); use `mode-line-format' instead.

That is incorrect and useless.  Clearly, you cannot use
`mode-line-format' in place of `default-mode-line-format'.

The warning should instead say something like this, based on the doc
string:

    Warning: `default-mode-line-format' is an obsolete variable
    (as of Emacs 23.2); use `(default-value 'mode-line-format)' instead.


In GNU Emacs 23.4.1 (i386-mingw-nt6.1.7601)
 of 2012-02-04 on MARVIN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.4) --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19424; Package emacs. (Sun, 21 Dec 2014 19:03:01 GMT) Full text and rfc822 format available.

Message #8 received at 19424 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 19424 <at> debbugs.gnu.org
Subject: Re: bug#19424: 23.4;
 incorrect byte-compiler warning for `mode-line-format'
Date: Sun, 21 Dec 2014 21:02:43 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

>     Warning: `default-mode-line-format' is an obsolete variable
>     (as of Emacs 23.2); use `(default-value 'mode-line-format)' instead.

Why `default-value', but not `setq-default'?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19424; Package emacs. (Sun, 21 Dec 2014 20:39:02 GMT) Full text and rfc822 format available.

Message #11 received at 19424 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 19424 <at> debbugs.gnu.org
Subject: RE: bug#19424: 23.4; incorrect byte-compiler warning for
 `mode-line-format'
Date: Sun, 21 Dec 2014 12:38:46 -0800 (PST)
> >     Warning: `default-mode-line-format' is an obsolete variable
> >     (as of Emacs 23.2); use `(default-value 'mode-line-format)'
> >     instead.
> 
> Why `default-value', but not `setq-default'?

Should be obvious: Because the intention of a given occurrence
of `default-mode-line-format' might not be to set the default
value of `mode-line-format'.

Consider code that used, for example:

(setq mode-line-format  default-mode-line-format)

A reasonable update of that code would likely be

(setq mode-line-format  (default-value 'mode-line-format))

That does not set the default value of `mode-line-format'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19424; Package emacs. (Sat, 30 Apr 2016 16:32:01 GMT) Full text and rfc822 format available.

Message #14 received at 19424 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 19424 <at> debbugs.gnu.org
Subject: Re: bug#19424: 23.4;
 incorrect byte-compiler warning for `mode-line-format'
Date: Sat, 30 Apr 2016 18:31:18 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> This is the warning:
>
>     Warning: `default-mode-line-format' is an obsolete variable
>     (as of Emacs 23.2); use `mode-line-format' instead.
>
> That is incorrect and useless.  Clearly, you cannot use
> `mode-line-format' in place of `default-mode-line-format'.
>
> The warning should instead say something like this, based on the doc
> string:
>
>     Warning: `default-mode-line-format' is an obsolete variable
>     (as of Emacs 23.2); use `(default-value 'mode-line-format)' instead.

Now fixed.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 30 Apr 2016 16:32:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.2, send any further explanations to 19424 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 30 Apr 2016 16:32:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 29 May 2016 11:24:06 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:06 GMT) Full text and rfc822 format available.

bug Marked as fixed in versions 26.1. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:06 GMT) Full text and rfc822 format available.

bug No longer marked as fixed in versions 25.2. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:06 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 01 Jan 2017 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.