bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Stefan Kangas
Subject: bug#27583: 24.5; `info.el': some test for (eq major-mode 'Info-mode)
Date: Tue, 27 Aug 2019 03:39:32 +0200

tags 27583 + patch
quit

Drew Adams <drew.adams@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

Attachment: 0001-Use-derived-mode-p-consistently-in-info.el.patch
Description: Text Data


reply via email to

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