From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Christopher Howard Newsgroups: gmane.emacs.help Subject: extending a mode Date: Sat, 28 Oct 2017 17:43:15 -0800 Message-ID: <1509241395.11482.8.camel@qlfiles.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-vpcDLlkhZsiUmdOhU2gO" X-Trace: blaine.gmane.org 1509241442 27250 195.159.176.226 (29 Oct 2017 01:44:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 29 Oct 2017 01:44:02 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 29 02:43:55 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8cdj-0005xJ-7J for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Oct 2017 02:43:51 +0100 Original-Received: from localhost ([::1]:34484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8cdq-0004l2-4X for geh-help-gnu-emacs@m.gmane.org; Sat, 28 Oct 2017 21:43:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e8cdN-0004kw-53 for help-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:43:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e8cdI-0000qR-Mc for help-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:43:29 -0400 Original-Received: from mx.kolabnow.com ([95.128.36.40]:45360) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e8cdI-0000pg-En for help-gnu-emacs@gnu.org; Sat, 28 Oct 2017 21:43:24 -0400 Original-Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 5C5C01C2 for ; Sun, 29 Oct 2017 02:43:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= mime-version:content-type:content-type:date:date:from:from :subject:subject:message-id:received:received:received; s= dkim20160331; t=1509241399; x=1509241421; bh=fspLUZ3fzqIpCgcFPer OA3bnZw2V1E/8ZWZLBNlmDM8=; b=nCa5us+HbFQrjIo3O0gNcHhfYqP1MM3UNfK ROoPI2k80/8r4cZo9CxvZUiJZx9nx9nnNPWgYCp6uuPJ+eEeeA4LJCUqe790Gz4g eBdrBUFMSDZ6lAw7P5lBxdIuCloDUUD8zu9TrY4Ky/Hh8PYSI13QFlUrAVBKKj84 oYfX7VaVdn6WeGV/Gfeq/dpBi1XgBl7UGJyQuS1sLiVhN9xSWWJ49srdA64PdNCg uiwkeruwC/o7eMGEV7itQZewh6AGQQNMsUsMfYUa0+Wex8OPAV/id4nDjkyr/xfP 4f3iEfNGYL7B971OJBvDo9Zheie+/m1FknrNTZOpOIdmvqFpX4EXAEnDenOnNn82 sfvOLA29mNfmq/6CKiYXPbOuiMX+BsvPqu0WyEQ/gTDIqrjUQ4HHipzX4MJpAzZr K3h2JTPvGcrekYJFrzzHQtjvs9K0d8DpBp7WOFC7syoAVQhVNVzI8ID5u0o1pYer +5ByNzinIYrdULaMvWhrY7EgqKz7DnkdsxBHz6z3yGnTtwwsIO9hZsoJHaCp+XgV /vIssSOpkKgmrKv6eOMnyKUVLDt4jPLQJcpcKyyYHl90hO X-Virus-Scanned: amavisd-new at mykolab.com Original-Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fzzLck-LFfpo for ; Sun, 29 Oct 2017 02:43:19 +0100 (CET) Original-Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 96844183 for ; Sun, 29 Oct 2017 02:43:19 +0100 (CET) Original-Received: from ext-subm001.mykolab.com (unknown [10.9.6.1]) by int-mx002.mykolab.com (Postfix) with ESMTPS id 7321F232E for ; Sun, 29 Oct 2017 02:43:19 +0100 (CET) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 95.128.36.40 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114688 Archived-At: --=-vpcDLlkhZsiUmdOhU2gO Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I wrote a simple command that I use when in Org mode, and probably will write a few more in the course of time. I'm not sure if anybody else besides me would ever use them. However, I want emacs to load those commands when it enters Org mode. What is the simplest and/or best way to do this? One trick I learned was that I could (add-hook) and 'org-mode-hook with a defun in it; however, this causes the command to be available under other modes as well. --=20 https://answersingenesis.org/ --=-vpcDLlkhZsiUmdOhU2gO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEE3cRyrLOhI3rPcNVUee7NbCP9XMUFAln1MjMACgkQee7NbCP9 XMWGrgf/fAJVg8wZmGLRXh9gesXN5UiTP///z1Ejbmx78kI8i7xxRyPxhp7OYqdk 8YZkt6cgVq7VTnzVNZ4TnNXFIrA2h1uiJyBrVzrEJFIhP7mugPbnUYcJxp2Iul7n YBRB1RNknNrLQmVxWrZAmLv9ictLm2hiu4dUKuc8Q3X+90SZzLOIM4WazWCLFQZt SSl1xiMgzO/CZGy9gZl4e2Pr2vVBiS9tbbpoFPn//7kX0dLwhRqPzT1MYMyF7J8l OmNdr7onMtQWDdOFgeibhFluSzkSx7AzlFPFdjwSEUj4vRUjkWO7i6XBRJMt4qqf grxBABYp+s/ccZUaWvOSwkeEWbwb5Q== =xLRv -----END PGP SIGNATURE----- --=-vpcDLlkhZsiUmdOhU2gO--