* Robert Widhopf-Fenk <[EMAIL PROTECTED]> writes:

  > On Sunday, November 7, 2004 at 00:31:39, Steve Youngs wrote:
  > [...]
  >> Well, you GNU/Emacs people can't have all the fun. :-)

  > When it comes to fun ... I did not knew that a warning about
  > an undefined function can be avoided by defaliasing it to
  > ignore.  Cool!

Yeah, it can be handy.

  > There are two things I wonder about:
  > - If those functions/packages become available in XEmacs, do
  >   we then have to recompile the ELs in order to guarantee
  >   that everything is working?

After removing the defalias in xtla-build, yeah.

  > - Is it possible to avoid a undefined-function warning also
  >   locally, i.e. a the position of a call.

If you define a function _after_ where you first call that function
you'll get a warning.  Move the definition to _before_ where you first
call it and the warning goes away.

This isn't the case for the functions I've defalias'd to ignore
because those functions are _not_ defined in xtla, just called.

  >   Since by getting no warning anymore I also might miss new
  >   occurrences of the function which are not guarded against
  >   XEmacs so far.

I see what you are getting at and perhaps this might be better than
ignoring those functions...

(defmacro tla--funcall-if-exists (function &rest args)
  "Call FUNCTION with ARGS as parameters if it exists."
  (if (fboundp function)
      `(funcall ',function ,@args)))



-- 
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
|                   Te audire no possum.                   |
|             Musa sapientum fixa est in aure.             |
|----------------------------------<[EMAIL PROTECTED]>---|

Attachment: pgpoB9UIbnBlZ.pgp
Description: PGP signature

Reply via email to