emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: C-h k does not catch text properies keymaps]


From: Richard Stallman
Subject: address@hidden: C-h k does not catch text properies keymaps]
Date: Sun, 04 Mar 2007 21:56:09 -0500

Would someone please debug this and ack?

------- Start of forwarded message -------
Date: Thu, 22 Feb 2007 15:28:14 +0100
From: "Lennart Borgman (gmail)" <address@hidden>
MIME-Version: 1.0
To: "address@hidden" <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Subject: C-h k does not catch text properies keymaps
X-Spam-Status: No, score=0.5 required=5.0 tests=TO_ADDRESS_EQ_REAL 
        autolearn=no version=3.0.4

Using C-h k to check mouse bindings does not work for text property keymaps.

To show this do

    emacs -Q

then paste the following code in the *Scratch* buffer and eval it:

(defun temp-test-mouse-ctrl-h-k()
   (interactive)
   (switch-to-buffer-other-window (get-buffer-create "test mouse buffer"))
   (goto-char (point-max))
   (let ((map (make-sparse-keymap))
         (txt "click here"))
     (define-key map [mouse-1] '(lambda()
                                  "This is the lambda for mouse-1"
                                  (interactive)
                                  (message "lambda for mouse-1 here")))
     (define-key map [f2] '(lambda()
                             "This is the lambda for f2"
                             (interactive)
                             (message "lambda for f2 here")))
     (put-text-property 0 (length txt) 'face '(:underline t :foreground 
"red") txt)
     (put-text-property 0 (length txt) 'mouse-face 'highlight txt)
     (put-text-property 0 (length txt) 'keymap map txt)
     (insert "\n" txt)
     ))

Do

    M-x temp-test-mouse-ctrl-h-k
    C-h k

and then click the red underlined text with mouse button 1. It will say

   <down-mouse-1> at that spot runs the command mouse-drag-region

which is not correct.


In GNU Emacs 22.0.93.1 (i386-mingw-nt5.1.2600)
  of 2007-02-19


_______________________________________________
emacs-pretest-bug mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]