unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Reuben Thomas <rrt@sc3d.org>
Cc: 46331@debbugs.gnu.org
Subject: bug#46331: provided-mode-derived-p doesn't work on aliases
Date: Sat, 06 Feb 2021 12:04:14 +0100	[thread overview]
Message-ID: <8735y9e9u9.fsf@gnus.org> (raw)
In-Reply-To: <CAOnWdohb_FtsBpw17fcc8MfLf0GwtK3TZq7PkBdZg41_XUJ4Lg@mail.gmail.com> (Reuben Thomas's message of "Fri, 5 Feb 2021 17:13:06 +0000")

Reuben Thomas <rrt@sc3d.org> writes:

> javascript-mode is an alias for js-mode, and some third-party modes (e.g.
> json-mode) derive from it.
>
> (provided-mode-derived-p 'js-mode 'prog-mode) == t
>
> but
>
> (provided-mode-derived-p 'javascript-mode 'prog-mode) == nil
>
> Hence in json-mode, (derived-mode-p 'prog-mode) evaluates to nil, which seems
> unfortunate.

Yup.  I've now changed the function to also work on MODE parameters that
are function aliases.

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





  reply	other threads:[~2021-02-06 11:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05 17:13 bug#46331: provided-mode-derived-p doesn't work on aliases Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-06 11:04 ` Lars Ingebrigtsen [this message]
2021-02-06 11:22   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-06 11:27     ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-06 11:31       ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-06 11:32         ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-06 11:39           ` Lars Ingebrigtsen
2021-02-06 11:41             ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-06 12:54               ` Lars Ingebrigtsen
2021-02-06 11:37       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735y9e9u9.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=46331@debbugs.gnu.org \
    --cc=rrt@sc3d.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).