Subject: RE: keymap property ignored for mouse click on overlay

From: "Drew Adams" <[email-masked]>
Date: Wed, 16 Apr 2008 13:58:39 -0700

> > (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)))
> 
> It's all in the original thread, compare:
> http://lists.gnu.org/archive/html/emacs-devel/2008-03/msg01923.html

Which is this:

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

Yidong's suggestion still has the (overlay-put overlay 'keymap foo-map); yours
does not. Is that part needed? (Trying to understand what is needed, not just
what works on this example.)

> I have at least one Emacs 22 build where this fails.  Please
> recheck whether it works for Emacs 22.2.

What is "it"? Your suggestion or Yidong's (or both)?