From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Rankin Newsgroups: gmane.emacs.help Subject: Correct way to load define-auto-insert in major mode? Date: Fri, 15 Jul 2016 17:52:43 +1000 Message-ID: <1468569163.2613862.666987553.576F8507@webmail.messagingengine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1468569223 5991 80.91.229.3 (15 Jul 2016 07:53:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Jul 2016 07:53:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 15 09:53:31 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bNxwA-00083B-A1 for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Jul 2016 09:53:30 +0200 Original-Received: from localhost ([::1]:59017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNxw9-0001e3-EM for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Jul 2016 03:53:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNxvg-0001Uq-8K for help-gnu-emacs@gnu.org; Fri, 15 Jul 2016 03:53:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNxvd-00085q-1E for help-gnu-emacs@gnu.org; Fri, 15 Jul 2016 03:53:00 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:49960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNxva-000856-JJ for help-gnu-emacs@gnu.org; Fri, 15 Jul 2016 03:52:56 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id CB435203A6 for ; Fri, 15 Jul 2016 03:52:43 -0400 (EDT) Original-Received: from web1 ([10.202.2.211]) by compute4.internal (MEProxy); Fri, 15 Jul 2016 03:52:43 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=paulwrankin.com; h=content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=quI keL2om0ojI/ANk+wg0jdiJS0=; b=z6ux297w8rc6VBEea61v6+yuhYeOipZYH8c 8PzJIKL1p4yytX4CKaCY9N1XGvyn5MlA4d1zYNvu+qW454k87VGnbiBsnRonT0jk jFlyCx6Qd8Q/Ryr+SUPpkH0iGtB+9IDfWpQ+MWnoBcm5mbigA0mO/5yS0ygzyVRv t1s3+mTU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=quIkeL2om0ojI/ANk+wg0jdiJS0=; b=b3wPl 9vgB/XeYAQL2FRKQnmyGpmiXPEoZPnxevrjpl9z+PxhE0jIy+rkXWsO/6uKns7CH M6WPLhKKxQ7kRD+IYYuCNoK9chID1BXj9vZBHUYN9ZDwBcw4UyjWV/Q7v68qIVad knE70dRPYHnIQaUW2s7ry7uxDxf+YvmxQ2o7sc= Original-Received: by mailuser.nyi.internal (Postfix, from userid 99) id 96A5A6A2E4; Fri, 15 Jul 2016 03:52:43 -0400 (EDT) X-Sasl-Enc: 5x4vZmF91OlLUiHBM7jHxH2Muxka9BzshM/o550CkxKI 1468569163 X-Mailer: MessagingEngine.com Webmail Interface - ajax-bf4e2c8f X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.29 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:110861 Archived-At: Is it right to autoload this? ;;;###autoload (with-eval-after-load 'autoinsert (define-auto-insert '(my-major-mode . "My major mode skeleton") my-major-mode-skeleton)) This is outside the mode definition. I had put this inside the define-derived-mode macro, but it was duplicating the skeleton to auto-insert-alist each time the mode was loaded.