From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs 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-ID: References: <81c97390-9678-4a2e-9772-f2ba9378ecd0@default> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000c9b7a505910f58d9" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="158115"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 27583@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 27 03:40:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i2QSy-000f1q-Bm for geb-bug-gnu-emacs@m.gmane.org; Tue, 27 Aug 2019 03:40:12 +0200 Original-Received: from localhost ([::1]:45886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2QSx-0005aX-34 for geb-bug-gnu-emacs@m.gmane.org; Mon, 26 Aug 2019 21:40:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44677) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i2QSq-0005aP-Eb for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2019 21:40:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i2QSp-0003Fq-4n for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2019 21:40:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38576) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i2QSo-0003FR-Qn for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2019 21:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i2QSo-0005pg-Jj for bug-gnu-emacs@gnu.org; Mon, 26 Aug 2019 21:40:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <81c97390-9678-4a2e-9772-f2ba9378ecd0@default> Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Aug 2019 01:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: easy Original-Received: via spool by 27583-submit@debbugs.gnu.org id=B27583.156686999122390 (code B ref 27583); Tue, 27 Aug 2019 01:40:02 +0000 Original-Received: (at 27583) by debbugs.gnu.org; 27 Aug 2019 01:39:51 +0000 Original-Received: from localhost ([127.0.0.1]:47395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i2QSc-0005p3-VI for submit@debbugs.gnu.org; Mon, 26 Aug 2019 21:39:51 -0400 Original-Received: from mail-pf1-f172.google.com ([209.85.210.172]:39571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i2QSb-0005og-Ii for 27583@debbugs.gnu.org; Mon, 26 Aug 2019 21:39:49 -0400 Original-Received: by mail-pf1-f172.google.com with SMTP id y200so5309552pfb.6 for <27583@debbugs.gnu.org>; Mon, 26 Aug 2019 18:39:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=AA4641m6N6FChAlblAGO+MwmNir/9oyyq5qo8hMyYEQ=; b=kGcTLAMmbH05oaZEuy9dNArdlMAuqImXTl41AllYn6KAx6fk9lfg5edw4Cl7sK4fKU YV4lVoNF/xF+vmqyACANXDcDW+OYfQdy8nq1Z1TNUXJcSXYHsv8DzVHQgOq+tE+FjjoT W9dmPVt2uUXhVS6TTvMexpoFTsTXskHTShIwY4uthDOX3zPOulbuYYbG21mvZ4d3oZGc z4UrpZOtevj6ivVNra2STANp8VoeFTxPIr94d4B2oCkYtbeKpzf3hHBH9Rf9BH+QFtF+ hikHupUezB2uzyCmFXWJWREJI5Qa3Fbpxva/UXhwq61V/FAaF5V/A+PP1HVQTNfRqnUB V5ww== X-Gm-Message-State: APjAAAXKFQuknGbX3b/Y7OCpYUVZul0ZMmF72BI6teHzJvFwrgtx9ucT HraGIwhNut5907I6GpUqTM3n8J8ka+nLy5gkAA0= X-Google-Smtp-Source: APXvYqxNyQzOZQnPerqfcmsQS7vJLOF8RP+1jV7IScqpWhv+BYWfP4GgmRgeQjVi4agX4Yy/8gP9hdaWgscg5LQUEBE= X-Received: by 2002:a63:69c1:: with SMTP id e184mr18216625pgc.198.1566869983678; Mon, 26 Aug 2019 18:39:43 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:165932 Archived-At: --000000000000c9b7a505910f58d9 Content-Type: text/plain; charset="UTF-8" tags 27583 + patch quit Drew Adams 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 --000000000000c9b7a505910f58d9 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Use-derived-mode-p-consistently-in-info.el.patch" Content-Disposition: attachment; filename="0001-Use-derived-mode-p-consistently-in-info.el.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jzt5w3fr0 RnJvbSBhZDYzOGNiOTc4N2M0MmQ0YzhhMjUzMzdmYjc4NDNlMGZkZWE2ZTc0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTdGVmYW4gS2FuZ2FzIDxzdGVmYW5rYW5nYXNAZ21haWwuY29t PgpEYXRlOiBUdWUsIDI3IEF1ZyAyMDE5IDAzOjM2OjA1ICswMjAwClN1YmplY3Q6IFtQQVRDSF0g VXNlIGRlcml2ZWQtbW9kZS1wIGNvbnNpc3RlbnRseSBpbiBpbmZvLmVsCgoqIGxpc3AvaW5mby5l bCAoSW5mby1oaWRlLW5vdGUtcmVmZXJlbmNlcywgaW5mby1kaXNwbGF5LW1hbnVhbCkKKGluZm8t LW1hbnVhbC1uYW1lcyk6IFVzZSBkZXJpdmVkLW1vZGUtcC4gIChCdWcjMjc1ODMpCi0tLQogbGlz cC9pbmZvLmVsIHwgNiArKystLS0KIDEgZmlsZSBjaGFuZ2VkLCAzIGluc2VydGlvbnMoKyksIDMg ZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC9pbmZvLmVsIGIvbGlzcC9pbmZvLmVsCmlu ZGV4IDE3YTJkNjNlNmQuLmJjZmFkZGNmNWEgMTAwNjQ0Ci0tLSBhL2xpc3AvaW5mby5lbAorKysg Yi9saXNwL2luZm8uZWwKQEAgLTMxOCw3ICszMTgsNyBAQCBJbm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