From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Avoiding this byte compile warning Date: Thu, 11 Jan 2007 19:04:45 +1100 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87sleidm5e.fsf@lion.rapttech.com.au> References: <1168446868.216149.54390@k58g2000hse.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1168504824 11491 80.91.229.12 (11 Jan 2007 08:40:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Jan 2007 08:40:24 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 11 09:40:22 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H4vTx-0001fo-EW for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Jan 2007 09:40:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H4vTx-0001gn-3w for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Jan 2007 03:40:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!news.glorb.com!sn-xt-sjc-05!sn-xt-sjc-11!sn-xt-sjc-08!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) Cancel-Lock: sha1:OXeuTMbb86tkozT9XJvYAbgiyfA= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 41 Original-Xref: shelby.stanford.edu gnu.emacs.help:144627 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40231 Archived-At: "rgb" writes: > I get the following message if the column-marker feature isn't > available. > > tal-mode.el:1367:26:Warning: the following functions are not known to > be defined: column-marker-1, column-marker-2 > > What's the proper way to code the function below so that it works the > way I want but doesn't cause a warning? > > Thanks. > > > (defun tal-setup-column-markers () > "Turns on column markers if configured and available. > See `tal-column-marker-1' and `tal-column-marker-2' " > (if (condition-case () > (progn (require 'column-marker) nil) > (error t)) > (if (not (and (zerop tal-column-marker-1) > (zerop tal-column-marker-2))) > (message "column markers are configured but %s" > " column-marker feature not available.")) > (setq indent-tabs-mode nil) ;documented as buffer local > (column-marker-1 tal-column-marker-1) > (column-marker-2 tal-column-marker-2))) > You could try a combination of eval-when-compile and condition-case at the beginning of your file. e.g. (not tested) (eval-when-compile (condition-case nil (require 'blah) (error nil))) Tim -- tcross (at) rapttech dot com dot au