all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Updated Patch for command remapping through keymaps
       [not found]         ` <5x3d0ee237.fsf@kfs2.cua.dk>
@ 2002-02-06 23:44           ` Kim F. Storm
  2002-02-07  9:42             ` Eli Zaretskii
  2002-02-08 13:57             ` Richard Stallman
  2002-02-07  9:39           ` Juanma Barranquero
  1 sibling, 2 replies; 11+ messages in thread
From: Kim F. Storm @ 2002-02-06 23:44 UTC (permalink / raw)


storm@cua.dk (Kim F. Storm) writes:

> Richard Stallman <rms@gnu.org> writes:
> 
> >     However, I don't really understand the lack of GCPRO in some of the
> >     functions in keymap.c.  Specifically, I would have expected GCPRO
> >     before the calls to
> >       keymap = get_keymap (..., ..., 1);
> >     in
> >       Fset_keymap_parent  (parent)
> > 
> > You are right.  This was not needed in the past, but now that
> > get_keymap can autoload and thus run Lisp code, the gcpro is needed.
> > Could someone add that?
> 
> I will do that as soon as I have committed my current set of patches.

Well, I have looked at it, and it is more complicated than that.  If
get_keymap can GC, then all the functions which calls it can also GC -
and so on.  For example, functions calling Fkeymap_parent may also GC.

I think fixing this requires a better understanding of the relationships
between these functions, so the maintainer of keymap.c should make the
changes.


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

* Re: Updated Patch for command remapping through keymaps
       [not found]         ` <5x3d0ee237.fsf@kfs2.cua.dk>
  2002-02-06 23:44           ` Updated Patch for command remapping through keymaps Kim F. Storm
@ 2002-02-07  9:39           ` Juanma Barranquero
  2002-02-07 11:29             ` Kim F. Storm
  1 sibling, 1 reply; 11+ messages in thread
From: Juanma Barranquero @ 2002-02-07  9:39 UTC (permalink / raw)



On 06 Feb 2002 22:23:56 +0100, storm@cua.dk (Kim F. Storm) wrote:

> I will do that as soon as I have committed my current set of patches.

Before your patches:

ELISP> (global-set-key (kbd "C-c a") #'(lambda (arg) (interactive "p") (message "%s" arg)))
(lambda
  (arg)
  (interactive "p")
  (message "%s" arg))

ELISP> (where-is-internal (lookup-key global-map (kbd "C-c a")))
([3 97])

After your patches:

ELISP> (global-set-key (kbd "C-c a") #'(lambda (arg) (interactive "p") (message "%s" arg)))
(lambda
  (arg)
  (interactive "p")
  (message "%s" arg))

ELISP> (where-is-internal (lookup-key global-map (kbd "C-c a")))
*** Eval error ***  Wrong type argument: arrayp, (lambda (arg) (interactive "p") (message "%s" arg))


                                                           /L/e/k/t/u


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

* Re: Updated Patch for command remapping through keymaps
  2002-02-06 23:44           ` Updated Patch for command remapping through keymaps Kim F. Storm
@ 2002-02-07  9:42             ` Eli Zaretskii
  2002-02-07 14:18               ` Stefan Monnier
  2002-02-08 13:57               ` Richard Stallman
  2002-02-08 13:57             ` Richard Stallman
  1 sibling, 2 replies; 11+ messages in thread
From: Eli Zaretskii @ 2002-02-07  9:42 UTC (permalink / raw)
  Cc: emacs-devel


On 7 Feb 2002, Kim F. Storm wrote:

> Well, I have looked at it, and it is more complicated than that.  If
> get_keymap can GC, then all the functions which calls it can also GC -
> and so on.  For example, functions calling Fkeymap_parent may also GC.
> 
> I think fixing this requires a better understanding of the relationships
> between these functions, so the maintainer of keymap.c should make the
> changes.

The irony of this is that on most modern platforms, including that of 
keymap.c's maintainer, GCPRO is a no-op...

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

* Re: Updated Patch for command remapping through keymaps
  2002-02-07  9:39           ` Juanma Barranquero
@ 2002-02-07 11:29             ` Kim F. Storm
  0 siblings, 0 replies; 11+ messages in thread
From: Kim F. Storm @ 2002-02-07 11:29 UTC (permalink / raw)
  Cc: emacs-devel

Juanma Barranquero <lektu@terra.es> writes:

> After your patches:
> 
> ELISP> (global-set-key (kbd "C-c a") #'(lambda (arg) (interactive "p") (message "%s" arg)))
> (lambda
>   (arg)
>   (interactive "p")
>   (message "%s" arg))
> 
> ELISP> (where-is-internal (lookup-key global-map (kbd "C-c a")))
> *** Eval error ***  Wrong type argument: arrayp, (lambda (arg) (interactive "p") (message "%s" arg))

Thanks.  I've fixed that now.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

* Re: Updated Patch for command remapping through keymaps
  2002-02-07  9:42             ` Eli Zaretskii
@ 2002-02-07 14:18               ` Stefan Monnier
  2002-02-08 13:57               ` Richard Stallman
  1 sibling, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2002-02-07 14:18 UTC (permalink / raw)
  Cc: Kim F. Storm, emacs-devel

> > Well, I have looked at it, and it is more complicated than that.  If
> > get_keymap can GC, then all the functions which calls it can also GC -
> > and so on.  For example, functions calling Fkeymap_parent may also GC.
> > 
> > I think fixing this requires a better understanding of the relationships
> > between these functions, so the maintainer of keymap.c should make the
> > changes.
> 
> The irony of this is that on most modern platforms, including that of 
> keymap.c's maintainer, GCPRO is a no-op...

I for one am running on a platform where GCPROs are no-ops, but I fiddled
the source so as not to use this (neat) feature (well, not for all my
builds, admittedly).


	Stefan


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

* Re: Updated Patch for command remapping through keymaps
  2002-02-06 23:44           ` Updated Patch for command remapping through keymaps Kim F. Storm
  2002-02-07  9:42             ` Eli Zaretskii
@ 2002-02-08 13:57             ` Richard Stallman
  2002-02-08 15:00               ` Stefan Monnier
  1 sibling, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2002-02-08 13:57 UTC (permalink / raw)
  Cc: emacs-devel

    I think fixing this requires a better understanding of the relationships
    between these functions, so the maintainer of keymap.c should make the
    changes.

Is there any "the maintainer of keymap.c", other than me?  I can do it
if necessary, but I hope someone else will.

It is not fundamentally hard--you look at all calls to get_keymap and
add gcpro around them; you make a list of the functions they are in,
and look at all calls to them and add gcpro around them; you keep
repeating until there are no more calls in C code.  Not fundamentally
hard, but time-consuming.


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

* Re: Updated Patch for command remapping through keymaps
  2002-02-07  9:42             ` Eli Zaretskii
  2002-02-07 14:18               ` Stefan Monnier
@ 2002-02-08 13:57               ` Richard Stallman
  1 sibling, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2002-02-08 13:57 UTC (permalink / raw)
  Cc: storm, emacs-devel

    The irony of this is that on most modern platforms, including that of 
    keymap.c's maintainer, GCPRO is a no-op...

Until this is true on all the platforms we care to support,
the GCPROs remain necessary.


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

* Re: Updated Patch for command remapping through keymaps
  2002-02-08 13:57             ` Richard Stallman
@ 2002-02-08 15:00               ` Stefan Monnier
  2002-02-10  5:19                 ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2002-02-08 15:00 UTC (permalink / raw)
  Cc: storm, emacs-devel

>     I think fixing this requires a better understanding of the relationships
>     between these functions, so the maintainer of keymap.c should make the
>     changes.
> 
> Is there any "the maintainer of keymap.c", other than me?  I can do it
> if necessary, but I hope someone else will.

I volunteered as maintainer of keymap.c, so I assumed he was referring
to me.


	Stefan


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

* Re: Updated Patch for command remapping through keymaps
  2002-02-08 15:00               ` Stefan Monnier
@ 2002-02-10  5:19                 ` Richard Stallman
  2002-02-10 15:52                   ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Richard Stallman @ 2002-02-10  5:19 UTC (permalink / raw)
  Cc: storm, emacs-devel

    I volunteered as maintainer of keymap.c, so I assumed he was referring
    to me.

Will you take care of adding these GCPROs?

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

* Re: Updated Patch for command remapping through keymaps
  2002-02-10  5:19                 ` Richard Stallman
@ 2002-02-10 15:52                   ` Stefan Monnier
  2002-02-11 18:47                     ` Richard Stallman
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2002-02-10 15:52 UTC (permalink / raw)
  Cc: monnier+gnu/emacs, storm, emacs-devel

>     I volunteered as maintainer of keymap.c, so I assumed he was referring
>     to me.
> 
> Will you take care of adding these GCPROs?

Yes, as soon as I find the time,


	Stefan


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

* Re: Updated Patch for command remapping through keymaps
  2002-02-10 15:52                   ` Stefan Monnier
@ 2002-02-11 18:47                     ` Richard Stallman
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Stallman @ 2002-02-11 18:47 UTC (permalink / raw)
  Cc: monnier+gnu/emacs, storm, emacs-devel

    > Will you take care of adding these GCPROs?

    Yes, as soon as I find the time,

If that won't be soon, then it would be better if KFS tries it.
When do you think it will be?

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


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

end of thread, other threads:[~2002-02-11 18:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5xvgdngssk.fsf@kfs2.cua.dk>
     [not found] ` <5x665fe4t0.fsf@kfs2.cua.dk>
     [not found]   ` <200202040926.g149Qvf02362@aztec.santafe.edu>
     [not found]     ` <5xwuxsrxgl.fsf@kfs2.cua.dk>
     [not found]       ` <200202061354.g16DsLt04019@aztec.santafe.edu>
     [not found]         ` <5x3d0ee237.fsf@kfs2.cua.dk>
2002-02-06 23:44           ` Updated Patch for command remapping through keymaps Kim F. Storm
2002-02-07  9:42             ` Eli Zaretskii
2002-02-07 14:18               ` Stefan Monnier
2002-02-08 13:57               ` Richard Stallman
2002-02-08 13:57             ` Richard Stallman
2002-02-08 15:00               ` Stefan Monnier
2002-02-10  5:19                 ` Richard Stallman
2002-02-10 15:52                   ` Stefan Monnier
2002-02-11 18:47                     ` Richard Stallman
2002-02-07  9:39           ` Juanma Barranquero
2002-02-07 11:29             ` Kim F. Storm

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.