From: Anselm Helbig <anselm.helbig+news2009@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How debug font lock mode settings and/or view existing font lock mode settings?
Date: Tue, 21 Apr 2009 14:39:01 +0200 [thread overview]
Message-ID: <87y6tumba2.wl%anselm.helbig+news2009@googlemail.com> (raw)
In-Reply-To: <d8fed125-d2bb-4a58-bace-1e1f290a9f73@c18g2000prh.googlegroups.com>
Hi!
> I created my own minor mode that highlights characters beyond column
> 78.
> It works most of the time but sometimes fails like in java mode.
>
> Is it possible to dump the font lock mode settings in a separate
> buffer when it doesn't work to see what is going on?
Well, that should be easy, you either do
M-: font-lock-defaults<RET>
or just put the string "font-lock-defaults" in your java code (most
probably in a comment) and evaluate it there - C-x C-e to see the
result in the echo area and in the *Messages* buffer, C-u C-x C-e to
dump it right into the current buffer.
You could also write a function that writes the settings into some
other buffer,
(defun debug-font-lock ()
(let ((copy-of-font-lock-defaults font-lock-defaults))
(save-excursion
(set-buffer (get-buffer-create "*debug-font-lock*"))
(goto-char (point-max))
(insert (format "%s" copy-of-font-lock-defaults)))))
and then call
M-: (debug-font-lock)
when you're in your java buffer. There might be more elegant ways to
do this. 8-)
HTH, kind regards,
Anselm
--
Anselm Helbig
mailto:anselm.helbig+news2009@googlemail.com
next prev parent reply other threads:[~2009-04-21 12:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-20 20:17 How debug font lock mode settings and/or view existing font lock mode settings? Chris Seberino
2009-04-21 12:39 ` Anselm Helbig [this message]
2009-04-27 18:38 ` Chris Seberino
2009-05-03 2:14 ` David Combs
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y6tumba2.wl%anselm.helbig+news2009@googlemail.com \
--to=anselm.helbig+news2009@googlemail.com \
--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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.