From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Shahid Newsgroups: gmane.emacs.help Subject: Re: minor-mode hook not run Date: Tue, 20 Mar 2018 16:31:53 -0400 Message-ID: <87woy6h4jq.fsf@gmail.com> References: <2c3c91da-0f8e-cad2-1746-b3f7a66da98d@easy-emacs.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1521577858 21311 195.159.176.226 (20 Mar 2018 20:30:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 20 Mar 2018 20:30:58 +0000 (UTC) User-Agent: mu4e 1.0-alpha3; emacs 27.0.50 Cc: Help Gnu Emacs mailing list To: Andreas =?utf-8?Q?R=C3=B6hler?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 20 21:30:54 2018 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 1eyNuG-0005Pa-U0 for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Mar 2018 21:30:53 +0100 Original-Received: from localhost ([::1]:51620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyNwK-0008G7-3Z for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Mar 2018 16:33:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eyNvS-0008EN-RB for help-gnu-emacs@gnu.org; Tue, 20 Mar 2018 16:32:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eyNvO-0005OO-US for help-gnu-emacs@gnu.org; Tue, 20 Mar 2018 16:32:06 -0400 Original-Received: from mail-qt0-x233.google.com ([2607:f8b0:400d:c0d::233]:44982) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eyNvO-0005Mj-PN for help-gnu-emacs@gnu.org; Tue, 20 Mar 2018 16:32:02 -0400 Original-Received: by mail-qt0-x233.google.com with SMTP id j26so3080304qtl.11 for ; Tue, 20 Mar 2018 13:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=sU+KkhV6HO+fCtx1HBR6/KBSqXsy3RTY9vMtb50LO/k=; b=V0mmrixps38g1zfD+F2vEOd3KBrkDcQ3j6RnhdmEGp2+ivzA1jy19XVb2g8jHwJCEO FgDignx8y/GMSZnEI0lG6HgeOY6ZPyPGlVAcxnZOSchkQCJgxUeVxbyOtqllT+3RtYg+ n3g2zzsVBGALhTl0Gsja+IHYVQcAR5jRNliBJDTiIQOTSYGU1vRMQYDEIuwsZ9Eyyxyt bz1H5KoDJVX5IcMTSgNGLfnNEBB1opxtrKqgg14WGHxeGyDtmz+SC7JU52NoRP9AhoDW kRDjpQpkb1jMGGDki97Eb/YS3BA4EhatHkHDPScmpCHmc7qnTGBRVdHOvvipeqz1PJP6 dNtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=sU+KkhV6HO+fCtx1HBR6/KBSqXsy3RTY9vMtb50LO/k=; b=kVoMCXPW/NVROn/7GieggX8WgHnXOXQ6YXCnw731cpqqEgcu9x17jvGBjYFTP/Fqww MqazgAwl2Bt7ZHjz0ZzK2LYxuxDEfh2EIan+Js7/KkQGBJWOa3lVlJt50z1bjy6Pv1tn J7YbJyc1gZ7/8qrH2X0r6pWZy2FsZa6Wu5D1NWQU2yEPlmSlngXFi0rqmVTnSNMkPPgB Hyel+BAyz8YELYUtdSwuA7MYrcUmYBiX0DEproPwGh3vx6/KxFXL0pY7fn2mRP8aPwMh EyszB/kONlBdD5nSArHm85BGAF+8nKeWlMTSxmE98JRYj+DBH9QiIJun4plBsUIDlJbu ERdg== X-Gm-Message-State: AElRT7Fmo/wjG/2R85uRZklNvKqef+N4AcPmsWAZZzLzcULcnHeP+xyB 4MKYUcb7hrN//cIRQ83PKbM2aYYs X-Google-Smtp-Source: AG47ELsuxNbQuaw2H/jRNWqgwCmgcXWzS+I+weRr5yREDikrh/g1rBVmXvt3LdtzvMvOHzsbmx3NPw== X-Received: by 10.237.63.113 with SMTP id q46mr25763461qtf.308.1521577921400; Tue, 20 Mar 2018 13:32:01 -0700 (PDT) Original-Received: from amun ([142.154.219.2]) by smtp.gmail.com with ESMTPSA id o4sm2365874qkl.69.2018.03.20.13.32.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 13:32:00 -0700 (PDT) In-reply-to: <2c3c91da-0f8e-cad2-1746-b3f7a66da98d@easy-emacs.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::233 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:116216 Archived-At: i think the hook will be called `foo-hook' not `foo-mode-hook' Andreas R=C3=B6hler writes: > Hi, > > writing a minor-mode, whose hook should do some setup > > (define-minor-mode foo > "Do something" nil " FOO"} > :keymap foo-map > (cond > ((eq major-mode 'abc) > (add-hook 'foo-mode-hook 'foo-load-abc nil t) > ;; (funcall 'foo-load-abc) > ) > ... > > Unfortunately, while the function =E2=80=98foo-load-abc-mode=E2=80=99 is = present in the hook, > it is not called. > > While uncommenting the funcall shown would set up the vars. > > Any idea, while this as a hook has no effect? > > Thanks, > > Andreas