From: Tim X <timx@nospam.dev.null>
Subject: Re: Avoiding this byte compile warning
Date: Thu, 11 Jan 2007 19:04:45 +1100 [thread overview]
Message-ID: <87sleidm5e.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: 1168446868.216149.54390@k58g2000hse.googlegroups.com
"rgb" <rbielaws@i1.net> 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
next prev parent reply other threads:[~2007-01-11 8:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-10 16:34 Avoiding this byte compile warning rgb
2007-01-11 8:04 ` Tim X [this message]
2007-01-11 17:46 ` rgb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sleidm5e.fsf@lion.rapttech.com.au \
--to=timx@nospam.dev.null \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).