unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: steve-humphreys@gmx.com
Cc: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: Minor modes and file names
Date: Thu, 28 Jan 2021 17:15:46 +0100	[thread overview]
Message-ID: <87ft2lt4ul.fsf@gmail.com> (raw)
In-Reply-To: <trinity-33a577e4-c142-40a9-b576-71ea0c3f3fa4-1611849431651@3c-app-mailcom-bs07> (steve-humphreys@gmx.com's message of "Thu, 28 Jan 2021 16:57:11 +0100")

>>>>> On Thu, 28 Jan 2021 16:57:11 +0100, steve-humphreys@gmx.com said:

    steve-humphreys> I have made a minor made for texinfo and noticed that the minor mode
    steve-humphreys> does not take effect unless tho file name matches the minor mode name.

    steve-humphreys> For instance, changing the name of the file to "crucible-mode-2021-01-28.el"
    steve-humphreys> the minor mode fails to load.

    steve-humphreys> ----- crucible-mode.el -----
    steve-humphreys> (define-minor-mode crucible-mode ...)
    steve-humphreys> (provide 'crucible-mode)

    steve-humphreys> ----- gtexinfo.el -----
    steve-humphreys> (add-to-list
    steve-humphreys>    'load-path "~/Genadm/build/gungadin-1.0/elisp/crucible")
    steve-humphreys> (require 'crucible-mode)
    steve-humphreys> (add-hook 'texinfo-mode-hook 'crucible-mode)

This is expected and documented:

    (require FEATURE &optional FILENAME NOERROR)

      Probably introduced at or before Emacs version 15.

    If feature FEATURE is not loaded, load it from FILENAME.
    If FEATURE is not a member of the list `features', then the feature is
    not loaded; so load the file FILENAME.

    If FILENAME is omitted, the printname of FEATURE is used as the file
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    name, and `load' will try to load this name appended with the suffix
    `.elc', `.el'



  reply	other threads:[~2021-01-28 16:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 15:57 Minor modes and file names steve-humphreys
2021-01-28 16:15 ` Robert Pluim [this message]
2021-01-28 16:51   ` steve-humphreys
2021-01-28 20:29     ` Tassilo Horn

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=87ft2lt4ul.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=steve-humphreys@gmx.com \
    /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.
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).