From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: steve-humphreys@gmx.com Newsgroups: gmane.emacs.help Subject: Re: Minor modes and file names Date: Thu, 28 Jan 2021 17:51:07 +0100 Message-ID: References: <87ft2lt4ul.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40471"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: Robert Pluim Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 28 17:52:25 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l5AWv-000APw-Li for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Jan 2021 17:52:25 +0100 Original-Received: from localhost ([::1]:51778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l5AWu-0007LA-NV for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Jan 2021 11:52:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5AVl-0007KI-LQ for help-gnu-emacs@gnu.org; Thu, 28 Jan 2021 11:51:15 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:46975) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l5AVi-0006ex-QZ for help-gnu-emacs@gnu.org; Thu, 28 Jan 2021 11:51:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1611852667; bh=NlAc8zAfOb+FFh1xKmI2bZTwWvngr88LboCuC31O5dc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=fgv21JMMiR+OcfDQxK8P+T8HsHIe8EbFLaRvgpfgihfYZcNsbVC9qBAu39iOszI3j B+4GO9/fUg6wmZ0Uln4+8+oH8p5R4iA5Z+X+O1dlOPAdLHWYCTtTbNrjIC30a+yNJJ vvoE4OWLXBtR9AVe3GsGkydkMtGSii5wXieRKMdk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs07.server.lan [172.19.170.175]) (via HTTP); Thu, 28 Jan 2021 17:51:07 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87ft2lt4ul.fsf@gmail.com> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:JRf3ZI0/piLXMqWwDDS+JPToVWVc3HhTR0W6F14k4yonoc00D1vUr0SWjI2+L26ziESWv GQJAJHAeqXYCpC4NgbUQhM73e8lg0gQFnigTnYDe4qtHQsv3U6hKBy3Zd0BX4VoPyzy8Aa4Qq8Au T1v6s2+/0KwMwXAhlSAjUaQgPb+nKypnG3ikIr42AI3P/miAlAMySMpIJsjy9QJfQcu5M48RGYFu hJo+ZTYORsHJxGPtKvWp98SI4noTvAugEzafi6ju4PYYNC0Qb2VcBAeimPxRLuGpE13jOODPvaPj gs= X-UI-Out-Filterresults: notjunk:1;V03:K0:PawmZI/Ihng=:qoZaTLFqaqgymES1rRABIb pfVgDwMKWd0Y5D2u4OEAwlmV+NjPjOjKrFrCT9AXU30cW5rigBuQXfk6aFtQE9g/ugJL/To/T G2v/uZSuXdSjAlb02SV3gqxx0W3SAi4UyWP41dZyKQZLJjKECOWxctRacq6xCtQvCw18GMDFK lEUMo+jZ/zjbp9SfsPo1CavBOKpemT3Y7asj4H3hJ2q3D8dgyP/xyr3y9NsDmnapt1bbHu6Fd h0yb7NnydwudDvR39U2+S4/vDpgxsM/AmYffyTelhTfx0LFQzq+esKo+EMQdRnj0oEz5ZTED2 yUQlmtCMaqFVkvOWpvX5ZKJK4n9lvRu/8khgncSVCA7BjPt2Zm3wP2q8Ib1jhFQlOwtfxVw0g CnQQMtwKN3FUU5ZUyBRyENJ23JdLoO2Zniyi/uH3qL8eA61v3vc7qEuWxfYMOdMD5hs0XkdcP ZQEMVwT3f7WmLKQymg9jdhOk9UDL3CtUx3EUmh9vgpnqE8jt0mJ1TOCszBdADEDPCYSU1xYfI WPba3Fu4TcPx+wajX9jdG7HRaYwaXyiYv2V44vso7ByD106Ekc0vMvU8zAyI6JPZgSqTnNuNA 0BAlzMe1i48aU= Received-SPF: pass client-ip=212.227.17.22; envelope-from=steve-humphreys@gmx.com; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:127403 Archived-At: Have tried to use it, but have encountered difficulties (add-to-list 'load-path "~/Genadm/build/gungadin-1.0/elisp/crucible") (require 'crucible-mode crucible-mode-prot-2021-01-28-utc0656) (add-hook 'texinfo-mode-hook 'crucible-mode) > Sent: Friday, January 29, 2021 at 4:15 AM > From: "Robert Pluim" > To: steve-humphreys@gmx.com > Cc: "Help Gnu Emacs" > Subject: Re: Minor modes and file names > > >>>>> 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 th= at the minor mode > steve-humphreys> does not take effect unless tho file name matches t= he minor mode name. > > steve-humphreys> For instance, changing the name of the file to "cru= cible-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/cr= ucible") > 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' > >