unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* customize question
@ 2002-12-20 15:10 Ian Zimmerman
  2002-12-20 17:50 ` Kevin Rodgers
  2002-12-20 19:22 ` Kai Großjohann
  0 siblings, 2 replies; 3+ messages in thread
From: Ian Zimmerman @ 2002-12-20 15:10 UTC (permalink / raw)



I'd like to reuse a customized variable (which is not autoloaded) from
another package in my code.  Is there a way to do that other than
(require 'otherpackage) ?

(In particular, I was thinking of declaring the same variable myself,
either in my group or in the group of the other package.  What would
be the effect of that, and can it be depended on?)

-- 
Ian Zimmerman, Oakland, California, U.S.A. 
if (sizeof(signed) > sizeof(unsigned) + 4) { delete this; }
GPG: 433BA087  9C0F 194F 203A 63F7 B1B8  6E5A 8CA3 27DB 433B A087

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: customize question
  2002-12-20 15:10 customize question Ian Zimmerman
@ 2002-12-20 17:50 ` Kevin Rodgers
  2002-12-20 19:22 ` Kai Großjohann
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2002-12-20 17:50 UTC (permalink / raw)


Ian Zimmerman wrote:

> I'd like to reuse a customized variable (which is not autoloaded) from
> another package in my code.  Is there a way to do that other than
> (require 'otherpackage) ?


Not that I know of.  But you might be able to get away with wrapping that in
eval-when-compile.


> (In particular, I was thinking of declaring the same variable myself,
> either in my group or in the group of the other package.  What would
> be the effect of that, and can it be depended on?)

I don't know.  Why don't you declare your own variable and have it default to
the value of the other variable: (defvar foo-var bar-var).

-- 
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;">Kevin Rodgers</a>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: customize question
  2002-12-20 15:10 customize question Ian Zimmerman
  2002-12-20 17:50 ` Kevin Rodgers
@ 2002-12-20 19:22 ` Kai Großjohann
  1 sibling, 0 replies; 3+ messages in thread
From: Kai Großjohann @ 2002-12-20 19:22 UTC (permalink / raw)


Ian Zimmerman <itz@speakeasy.org> writes:

> I'd like to reuse a customized variable (which is not autoloaded) from
> another package in my code.  Is there a way to do that other than
> (require 'otherpackage) ?

You could autoload it.

> (In particular, I was thinking of declaring the same variable myself,
> either in my group or in the group of the other package.  What would
> be the effect of that, and can it be depended on?)

Oh, no.  Better don't do that.  I think it's not a good idea to change
the custom spec of a variable.  And if you do, load order determines
who wins.

How about just requiring the package and adding the variable to your
own custom group?  I believe that defgroup allows you to list some
variables which are to be in that group.

-- 
~/.signature is: umop ap!sdn    (Frank Nobis)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-12-20 19:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-20 15:10 customize question Ian Zimmerman
2002-12-20 17:50 ` Kevin Rodgers
2002-12-20 19:22 ` Kai Großjohann

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).