unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Setting risky-local-variable
@ 2005-05-26 15:14 Juanma Barranquero
  2005-05-27 14:20 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2005-05-26 15:14 UTC (permalink / raw)


What is the recommended way to set 'risky-local-variable for a Lisp
variable defined in C code?

  extern Qrisky_local_variable;
  Fput(Vmy_var, Qrisky_local_variable, Qt);

or an autoload

  ;;;###autoload (put 'my_var 'risky-local-variable t)

on a related lisp module?

-- 
                    /L/e/k/t/u

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

* Re: Setting risky-local-variable
  2005-05-26 15:14 Setting risky-local-variable Juanma Barranquero
@ 2005-05-27 14:20 ` Richard Stallman
  2005-05-27 23:30   ` Juanma Barranquero
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2005-05-27 14:20 UTC (permalink / raw)
  Cc: emacs-devel

    What is the recommended way to set 'risky-local-variable for a Lisp
    variable defined in C code?

      extern Qrisky_local_variable;
      Fput(Vmy_var, Qrisky_local_variable, Qt);

    or an autoload

      ;;;###autoload (put 'my_var 'risky-local-variable t)

I think the former is cleaner, but the latter is also ok
if it is more convenient.

Also put a comment about this near where the C code defines the
variable.

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

* Re: Setting risky-local-variable
  2005-05-27 14:20 ` Richard Stallman
@ 2005-05-27 23:30   ` Juanma Barranquero
  2005-05-28 11:52     ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2005-05-27 23:30 UTC (permalink / raw)


On 5/27/05, Richard Stallman <rms@gnu.org> wrote:

> I think the former is cleaner, but the latter is also ok
> if it is more convenient.

I finally used the former, but I had to do:

  extern Lisp_Object Qrisky_local_variable;
  Fput (intern ("image-library-alist"), Qrisky_local_variable, Qt);

> Also put a comment about this near where the C code defines the
> variable.

A comment about what?

-- 
                    /L/e/k/t/u

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

* Re: Setting risky-local-variable
  2005-05-27 23:30   ` Juanma Barranquero
@ 2005-05-28 11:52     ` Richard Stallman
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2005-05-28 11:52 UTC (permalink / raw)
  Cc: emacs-devel

    > Also put a comment about this near where the C code defines the
    > variable.

    A comment about what?

That statement refers to the other method where you would put on the
property in Lisp code.

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

end of thread, other threads:[~2005-05-28 11:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-26 15:14 Setting risky-local-variable Juanma Barranquero
2005-05-27 14:20 ` Richard Stallman
2005-05-27 23:30   ` Juanma Barranquero
2005-05-28 11:52     ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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