[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with "keymap" text property
From: |
Rebecca Breu |
Subject: |
Problem with "keymap" text property |
Date: |
Mon, 17 Mar 2008 09:11:53 -0700 (PDT) |
Hi all!
I want to do define a major mode with clickable links within the buffer via
the "keymap" text property, but I have problems getting it to work. I
defined the following keymap:
(if ucc-epr-keymap
nil
(setq ucc-epr-keymap (make-sparse-keymap))
(define-key ucc-epr-keymap "\C-c\C-c" '(lambda () (interactive)(message
"bla"))))
With the font-lock-keywords-list, I want to "bind" this keymap to some
characters:
(defvar ucc-output-mode-font-lock-keywords
'(("\\<\\(https://.*\\)" 1 '(face underline
mouse-face highlight
help-echo "bla"
keymap ucc-epr-keymap)))
"Syntax highlighting of ucc output."
)
When I activate my major mode, the syntax highlighting works, the help-echo
works, but when I place my cursor on the highlighted words and press C-c
C-c, all I get is "C-c C-c is undefined." What am I missing?
I am using Emacs 22 on Debian Testing ("This is GNU Emacs 22.1.1
(i486-pc-linux-gnu, GTK+ Version 2.12.3) of 2007-12-15 on noname, modified
by Debian")
I attached the complete file, just type some URL in a buffer and activate
the mode to see the problem.
http://www.nabble.com/file/p16095466/ucc-output-mode.el ucc-output-mode.el
--
View this message in context:
http://www.nabble.com/Problem-with-%22keymap%22-text-property-tp16095466p16095466.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Problem with "keymap" text property,
Rebecca Breu <=