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.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefan <at> marxist.se>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 27583 <at> debbugs.gnu.org
Subject: 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)]

This bug report was last modified 5 years and 318 days ago.

Previous Next


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