From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.help Subject: Re: Minor modes and file names Date: Thu, 28 Jan 2021 17:15:46 +0100 Message-ID: <87ft2lt4ul.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35213"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: steve-humphreys@gmx.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 28 17:17:57 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 1l59zZ-00093i-En for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Jan 2021 17:17:57 +0100 Original-Received: from localhost ([::1]:57904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l59zY-0000tJ-GX for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Jan 2021 11:17:56 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l59xY-0008SL-Nx for help-gnu-emacs@gnu.org; Thu, 28 Jan 2021 11:15:52 -0500 Original-Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:34720) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l59xV-0001zv-UD for help-gnu-emacs@gnu.org; Thu, 28 Jan 2021 11:15:52 -0500 Original-Received: by mail-wr1-x432.google.com with SMTP id g10so5992640wrx.1 for ; Thu, 28 Jan 2021 08:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version; bh=sra7QPW5JRHmdWGdst4kM3+MK48SXIQb2XiknTcpPFM=; b=quGlSNQG73mTXGlScJFw9BLADYau00adDUnz2mHP9ywXGQed6WWqBtkDn5Yasbw57p TpODjkZTgB8jl1JIdDZTwvF39ckC5NG5/hnR5CfPeJWKxDzV0m2DccITHBsk8D3J6aFi VlPDWI6qc359GG9zucnriOtWwMJ9vddwgq5oQWEMww4mpYf9bzZQhUsXM83cjMwxU2Qi g29hauv7B3n16+etiyDS8RqJ0QScxoqEPimKBA76R3yoglLs9uTqZVXNFiECC3yM3Oj5 E6z1n6hdlY+mBPqhpH4eGubdJssc2ECWQKrMUbvsGN/BP0J6sOwdQtQjgIlPhyY7EO9n /hzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=sra7QPW5JRHmdWGdst4kM3+MK48SXIQb2XiknTcpPFM=; b=PSn/k6iwOZGRfQODC/zR7zpQ1S3xLIje7cBbs1ws0QxKoNsxvulRfs+o2ZBtPrLFdi 6ivIpAPVp0flfOhTOpH+OpVbTY85Y7HVOJHg/DJAlCRzF3SrPRnPJTNiSwlRPH6F9q9l CHkJYo1WoCbn5ZifFyIPLpryxeZR8JGydJRmHzE4fYEyV+UvSm93QHtKcOeO3VulyfR6 9FsVefsZ2cz0CS16a/gg25aVobeF2xXEft+9BSxdUSN4zgJjjI27Y/Toj8lql5MX7v9r zgto4niY8iaVjgqFkTEJVwpTsf6OGtotJUJmucRSyQ4NAQh8KiMxaRxHFTh0a88E2fCl mLpg== X-Gm-Message-State: AOAM531Y4wPk4J0xnGDA0SwWZdkVxDoMyJPp7y1GJMDCPLU3cpJTnrBO F0yS4OyJ62Dmv5Cg2mvQRU4sZKSVb8BD+Q== X-Google-Smtp-Source: ABdhPJzI62QzZaRJseVvU7XBHj21kcwB08JVGPuXzBCwbRJacpgi0UiNO7TKuDFONJOfBbPxYqjPqQ== X-Received: by 2002:a5d:5304:: with SMTP id e4mr16937923wrv.167.1611850547646; Thu, 28 Jan 2021 08:15:47 -0800 (PST) Original-Received: from rltb ([2a01:e34:ecfc:a861:69b6:6aaf:dbd3:8964]) by smtp.gmail.com with ESMTPSA id k6sm7911134wro.27.2021.01.28.08.15.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jan 2021 08:15:47 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: (steve-humphreys@gmx.com's message of "Thu, 28 Jan 2021 16:57:11 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=rpluim@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:127402 Archived-At: >>>>> 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'