GNU bug report logs - #102
keymap property ignored for mouse click on overlay

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sun, 30 Mar 2008 22:15:08 UTC

Severity: normal

Merged with 71

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 102 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: "'Martin Rudalics'" <rudalics <at> gmx.at>, <102 <at> debbugs.gnu.org>
Subject: Re: keymap property ignored for mouse click on overlay
Date: Wed, 16 Apr 2008 14:41:40 -0400
"Drew Adams" <drew.adams <at> oracle.com> writes:

>> Since the benefit of this feature is rather marginal in the first
>> place, I think it's better to simply document that display strings
>> don't inherit keymaps.  The way to DTRT is to give the display string
>> a 'keymap text property, which has always worked.
>
> Could you state how that would change in the test case I sent? I added
> both a `display' property and a `keymap' property to the overlay. What
> would the new test-case code look like?
>
> I'm OK with documenting a limitation if there is an easy alternative
> way to do what I need.

It's simple:

(defun foo (beg end)
  (interactive "r")
  (let ((overlay (make-overlay beg end)))
    (overlay-put
     overlay 'display
     (propertize "xxxxxxxxx" 'face 'font-lock-constant-face
                             'keymap foo-map))
    (overlay-put overlay 'keymap foo-map)))




This bug report was last modified 17 years and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.