* Problem with "keymap" text property
@ 2008-03-17 16:11 Rebecca Breu
0 siblings, 0 replies; only message in thread
From: Rebecca Breu @ 2008-03-17 16:11 UTC (permalink / raw)
To: Help-gnu-emacs
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-17 16:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-17 16:11 Problem with "keymap" text property Rebecca Breu
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).