From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pankaj Jangid Newsgroups: gmane.emacs.help Subject: How to deal with 'function' not known to be defined Date: Thu, 01 Oct 2020 22:51:40 +0530 Organization: Code Is Great Foundation Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29385"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) To: Emacs Help Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 01 19:27:46 2020 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 1kO2Mr-0007YP-El for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 01 Oct 2020 19:27:45 +0200 Original-Received: from localhost ([::1]:56868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kO2Mq-0005m6-Bi for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 01 Oct 2020 13:27:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kO2H5-0008LN-E8 for help-gnu-emacs@gnu.org; Thu, 01 Oct 2020 13:21:47 -0400 Original-Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]:35370) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kO2H3-0003jV-QU for help-gnu-emacs@gnu.org; Thu, 01 Oct 2020 13:21:47 -0400 Original-Received: by mail-pj1-x102e.google.com with SMTP id jw11so2250497pjb.0 for ; Thu, 01 Oct 2020 10:21:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:organization:mail-followup-to:date:message-id :user-agent:mime-version; bh=jgCV4X16FoB8DH1M+FBONbH2WUq01VSYth/3XzcmII4=; b=OTwHLWbOcPpVGRAk9WLydqTFYp1rrTAuPa3E0odo6+XMHJcS6yPfVF0nCSwHQEKHSw bTLfs3pns0uUurSDEw8jpiMOQu32vTTM3bUOsZsSilAkGCQf70efk9LtXM7vYAlMKeQl ztDBi5TL5xK94FjqC5fUTGtP/GpXt0L2SptsRJkee9r4CCechv+N7ADdmlyD/q2JHBtK ebM+abVesXC8PcwaN0atg3Vo8IUTkoBx/GIGYZz+0FWFHKOMIj2ow+rr1NBtrb376aU7 gK88tRDWhEG4x0uOOCNBwsPlnoVPIO+BxxK2ef0YSwXehSKUzNbQDJF+/x9qj9PwPsfJ NbtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:organization:mail-followup-to :date:message-id:user-agent:mime-version; bh=jgCV4X16FoB8DH1M+FBONbH2WUq01VSYth/3XzcmII4=; b=kqYxixQimpF+n5H2jEpZgTe4jMovVovojQxLTaQogDOAE6mUz+oZ9ZUVX+z6FOlOo1 KrAsnN/NdbiARO7zdj2RWdHNgfpOebU6Xmg5xZtuE+1NMlQjEYDmRoZVXZ1cn51VDaG1 LwiKnV0Vu2T+OcWlsFoztP2YvayGkl5ICZzxmsg1ns7wujd6EnThn4BGkD1X63EsnLvx oziQVY1f9VLSkfHdxMUARp2Ygmqz67gEbXPKEuwJD9esEcp5M6UseoqHhgBPuhKwxFrx gzb6YGN6uIuAaSlJoXEOXr1Ewf0USkyNcnwGu0P7ns2zCxaXVJkdYehZfRVxyjCaO6Fb wzjw== X-Gm-Message-State: AOAM532mA5rwnRiXE2GV4fIHWY3CBnpXZ/r7RFfHbW36IxBfaQOS7ZC7 /pKGJRP0PrEyvdSXoHliPm2PmaHHHHPMUQ== X-Google-Smtp-Source: ABdhPJzUHQxNxZjJsFtwSMCX+xsm4vSlBNPaVrALDEN5m+nJtn41WD/8k3PeVuisNtrrbKHpfEVuUg== X-Received: by 2002:a17:90a:3d0e:: with SMTP id h14mr980244pjc.34.1601572904036; Thu, 01 Oct 2020 10:21:44 -0700 (PDT) Original-Received: from mb2.local ([2405:201:5c06:7893:48f2:a962:e142:fa7b]) by smtp.gmail.com with ESMTPSA id 32sm5826209pgu.17.2020.10.01.10.21.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2020 10:21:43 -0700 (PDT) Mail-Followup-To: Emacs Help Received-SPF: none client-ip=2607:f8b0:4864:20::102e; envelope-from=pankaj.jangid@codeisgreat.com; helo=mail-pj1-x102e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no 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:124231 Archived-At: I have a lisp file `init-which-key.el` which is included in `~/.emacs.d/init.el`. #+BEGIN_SRC elisp (require 'package) (defun my/which-key-setup () "Startup configuration for which-key." (unless (package-installed-p 'which-key) (package-install 'which-key)) (which-key-mode 1)) (my/which-key-setup) #+END_SRC Flymake reports one warning - "The function 'which-key-mode" is not known to be define. I know that 'which-key-mode' is not available till the package is installed. And flymake tries to compile and find errors and warnings. What are the best practices to write such modular files that are free from flymake warnings? Any pointers where I can read specifically on this topic?