GNU bug report logs - #27583
24.5; `info.el': some test for (eq major-mode 'Info-mode)

Previous Next

Package: emacs;

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

Date: Wed, 5 Jul 2017 02:12:01 UTC

Severity: minor

Tags: easy, patch

Found in version 24.5

Fixed in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

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 27583 in the body.
You can then email your comments to 27583 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#27583; Package emacs. (Wed, 05 Jul 2017 02:12:01 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. (Wed, 05 Jul 2017 02:12: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: 24.5; `info.el': some test for (eq major-mode 'Info-mode)
Date: Tue, 4 Jul 2017 19:11:04 -0700 (PDT)
Most of the places where `major-mode' is tested use a test like this:
(derived-mode-p 'Info-mode).  But there are still a few places where
this is done: (eq major-mode 'Info-mode).

I think (but am not positive) that each of the latter tests should be
changed to use `derived-mode-p', to let users and libraries define and
use modes that are derived from `Info-mode'.

It looks like the places that still use (eq major-mode 'Info-mode)
constitute code that doesn't get much love.  The occurrences are in
these 3 things:

 Info-hide-note-references (in the option's :set function)
 info-display-manual
 info--manual-names (used only by info-display-manual)



In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'




Added tag(s) easy. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 17 Jul 2018 23:00:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27583; Package emacs. (Tue, 27 Aug 2019 01:40:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 27583 <at> debbugs.gnu.org
Subject: Re: bug#27583: 24.5;
 `info.el': some test for (eq major-mode 'Info-mode)
Date: Tue, 27 Aug 2019 03:39:32 +0200
[Message part 1 (text/plain, inline)]
tags 27583 + patch
quit

Drew Adams <drew.adams <at> oracle.com> writes:

> Most of the places where `major-mode' is tested use a test like this:
> (derived-mode-p 'Info-mode).  But there are still a few places where
> this is done: (eq major-mode 'Info-mode).
>
> I think (but am not positive) that each of the latter tests should be
> changed to use `derived-mode-p', to let users and libraries define and
> use modes that are derived from `Info-mode'.
>
> It looks like the places that still use (eq major-mode 'Info-mode)
> constitute code that doesn't get much love.  The occurrences are in
> these 3 things:
>
>  Info-hide-note-references (in the option's :set function)
>  info-display-manual
>  info--manual-names (used only by info-display-manual)

Makes sense.  How about the attached patch?

Best regards,
Stefan Kangas
[0001-Use-derived-mode-p-consistently-in-info.el.patch (text/x-patch, attachment)]

Added tag(s) patch. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Tue, 27 Aug 2019 01:40:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27583; Package emacs. (Tue, 27 Aug 2019 02:34:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 27583 <at> debbugs.gnu.org
Subject: RE: bug#27583: 24.5; `info.el': some test for (eq major-mode
 'Info-mode)
Date: Mon, 26 Aug 2019 19:33:01 -0700 (PDT)
> How about the attached patch?

LGTM.

I have a tiny doubt that we can be sure
that an arbitrary derived mode would call
for those things, but that's a problem that's
not special to Info, I guess.

Thx.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27583; Package emacs. (Tue, 03 Sep 2019 18:25:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 27583 <at> debbugs.gnu.org
Subject: Re: bug#27583: 24.5;
 `info.el': some test for (eq major-mode 'Info-mode)
Date: Tue, 3 Sep 2019 20:23:59 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> > How about the attached patch?
>
> LGTM.

Thanks.  If no one has any objections, I'll install it in a couple of days.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27583; Package emacs. (Sat, 07 Sep 2019 22:21:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 27583 <at> debbugs.gnu.org
Subject: Re: bug#27583: 24.5;
 `info.el': some test for (eq major-mode 'Info-mode)
Date: Sun, 8 Sep 2019 00:20:19 +0200
close 27583 27.1
quit

Stefan Kangas <stefan <at> marxist.se> writes:
> If no one has any objections, I'll install it in a couple of days.

Now pushed to master as commit 8e93e6da7c.

Thanks,
Stefan Kangas




bug marked as fixed in version 27.1, send any further explanations to 27583 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sat, 07 Sep 2019 22:21:03 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, 06 Oct 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 197 days ago.

Previous Next


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