From: Kevin Rodgers <kevin.rodgers@ihs.com>
Subject: Re: Font locking in PSGML mode
Date: Wed, 12 Mar 2003 10:02:34 -0700 [thread overview]
Message-ID: <3E6F682A.1070000@ihs.com> (raw)
In-Reply-To: v6t4tqpp83n715@corp.supernews.com
chris wrote:
> When I load a file into Emacs that starts sgml mode, there is no
> syntax coloring. After I parse the DTD, the font coloring starts
> working, but only on text that I manually move my cursor through. As I
> move through each element, it becomes colorized.
>
> Is there a way to get this to happen automatically?
1. How do you parse the DTD?
2. Here's a variable declaration and some code I use in an sgml-mode-hook
function:
(defvar psgml-auto-parse 'query
"*If t, `\\[sgml-mode'] automatically invokes `\\[sgml-next-trouble-spot]';
if a number, automatically parse the buffer if the buffer's size is smaller;
if non-nil and non-t, query the user whether to parse the buffer.")
(if (and (cond ((eq psgml-auto-parse t))
((numberp psgml-auto-parse)
(<= (buffer-size) psgml-auto-parse))
((not (null psgml-auto-parse)) ; symbolp
(y-or-n-p "Parse SGML document? ")))
(or (null sgml-top-tree)
(null (sgml-tree-end sgml-top-tree))))
(progn
(sgml-next-trouble-spot) ; doesn't return a meaningful value,
; or signal an error...
(if (eobp)
(goto-char (point-min)))))
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
next prev parent reply other threads:[~2003-03-12 17:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-12 1:56 Font locking in PSGML mode chris
2003-03-12 9:30 ` Kai Großjohann
2003-03-13 4:16 ` chris
2003-03-13 9:00 ` Kai Großjohann
2003-03-14 19:05 ` Karl Eichwalder
2003-03-15 0:02 ` Chris
2003-03-13 6:11 ` Karl Eichwalder
2003-03-12 17:02 ` Kevin Rodgers [this message]
2003-03-13 4:17 ` chris
2003-03-13 18:27 ` Kevin Rodgers
2003-03-15 0:00 ` Chris
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=3E6F682A.1070000@ihs.com \
--to=kevin.rodgers@ihs.com \
/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.