From: Rebecca Breu <rebecca@rbreu.de>
To: Help-gnu-emacs@gnu.org
Subject: Problem with "keymap" text property
Date: Mon, 17 Mar 2008 09:11:53 -0700 (PDT) [thread overview]
Message-ID: <16095466.post@talk.nabble.com> (raw)
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.
reply other threads:[~2008-03-17 16:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16095466.post@talk.nabble.com \
--to=rebecca@rbreu.de \
--cc=Help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).