* Porting from XEmacs to Emacs: event-glyph-extent
@ 2004-07-13 20:07 Achim D. Brucker
2004-08-01 13:47 ` Kai Grossjohann
[not found] ` <mailman.2345.1091368467.1960.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 3+ messages in thread
From: Achim D. Brucker @ 2004-07-13 20:07 UTC (permalink / raw)
Hi,
is there an howto about porting elisp-code from XEmacs to GNU Emacs?
At the moment I'm trying to port an (unmainted) XEmacs mode to GNU
Emacs 21.3. With the help of lucid.el and looking into various (X)Emacs
modes I got most of the stuff working, but now I'm getting stuck with the
following routine:
(defun zeta-marker-activate (e)
(interactive "e")
(let ((m (event-glyph-extent e)) act)
(if (and m (setq act (extent-property m 'zeta-marker-action)))
(funcall act m)
(mouse-set-point e))))
"event-glyph-extent" seems to be problematic, at least my attempts to
emulate this in GNU Emacs (with constructs like "overlays-at
(event-start e)")
failed. Is this non-trivial or do I just missing something obvious?
Achim
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Porting from XEmacs to Emacs: event-glyph-extent
2004-07-13 20:07 Porting from XEmacs to Emacs: event-glyph-extent Achim D. Brucker
@ 2004-08-01 13:47 ` Kai Grossjohann
[not found] ` <mailman.2345.1091368467.1960.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 3+ messages in thread
From: Kai Grossjohann @ 2004-08-01 13:47 UTC (permalink / raw)
"Achim D. Brucker" <brucker@spamfence.net> writes:
> (defun zeta-marker-activate (e)
> (interactive "e")
> (let ((m (event-glyph-extent e)) act)
> (if (and m (setq act (extent-property m 'zeta-marker-action)))
> (funcall act m)
> (mouse-set-point e))))
>
> "event-glyph-extent" seems to be problematic, at least my attempts to
> emulate this in GNU Emacs (with constructs like "overlays-at
> (event-start e)")
> failed. Is this non-trivial or do I just missing something obvious?
Perhaps it is better to use text properties? Those will move with the
text.
The code snippet looks very interesting, btw. What does the code do
that you are trying to port?
Kai
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <mailman.2345.1091368467.1960.help-gnu-emacs@gnu.org>]
* Re: Porting from XEmacs to Emacs: event-glyph-extent
[not found] ` <mailman.2345.1091368467.1960.help-gnu-emacs@gnu.org>
@ 2004-08-02 19:17 ` Stefan Monnier
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2004-08-02 19:17 UTC (permalink / raw)
> > (defun zeta-marker-activate (e)
> > (interactive "e")
> > (let ((m (event-glyph-extent e)) act)
> > (if (and m (setq act (extent-property m 'zeta-marker-action)))
> > (funcall act m)
> > (mouse-set-point e))))
> > "event-glyph-extent" seems to be problematic, at least my attempts to
> > emulate this in GNU Emacs (with constructs like "overlays-at
> > (event-start e)") failed. Is this non-trivial or do I just missing
> > something obvious?
I think that using something like (overlays-at (posn-point (event-start e)))
should be workable. It's probably easier to just put a `keymap'
property on the overlay, tho (same thing for XEmacs).
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-08-02 19:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-13 20:07 Porting from XEmacs to Emacs: event-glyph-extent Achim D. Brucker
2004-08-01 13:47 ` Kai Grossjohann
[not found] ` <mailman.2345.1091368467.1960.help-gnu-emacs@gnu.org>
2004-08-02 19:17 ` Stefan Monnier
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).