From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Re: [ELPA] Update package: psgml
Date: Wed, 19 Apr 2017 08:35:22 -0400 [thread overview]
Message-ID: <jwvzifcvb0z.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: m0a87ckfsb.fsf@gmail.com
>> Could you give some further details about the context where you bumped
>> into the problem?
> I'm doing a lot of DSSSL at the moment, and I wanted the SGML editor
> commands to work in DSSSL mode. With sgml-set-face turned on for
> editing SGML structure, doing something like sgml-insert-element
> fontifies for SGML up to point instead of fontifying for lisp because
> PSGML fontifies as it parses the buffer to figure out the current
> element.
I'm not really familiar with DSSSL, so I'm not sure what thie use case
looks like concretely. Is that some Lisp-ish sublanguage that appears
between two SGML tags or on the contrary Lisp-ish language with SGML
tags within it (i.e. some sort of multi-major-mode situation)?
Do you use a dsssl-mode major mode for it? Can you point me to it?
> I actually wanted it to be mode-local, which emacs doesn't really do,
Emacs does support "mode-local" in the following sense:
(add-hook 'foo1-mode-hook (lambda () (setq-local VAR VAL1)))
(add-hook 'foo2-mode-hook (lambda () (setq-local VAR VAL2)))
...
> I can set sgml-set-face in a hook for sgml-mode, but then I have to
> unset it if I want to edit in the other mode. I figured a single list
> of modes where SGML should be fontified would be easier to keep track of
> than a slue of mode hooks.
A bunch of mode hooks is the "standard" way to deal with such situations
in Emacs. Which is more convenient depends on the situation, admittedly.
In the specific case of psgml, I think the real fix should be to make
psgml interact more normally with font-lock. I haven't looked into it
hard enough yet, tho.
> I looked into indirect buffers, but this seems more intuitive.
This makes me feel like you indeed have a multi-major-mode situation, in
which case sgml-set-face is probably just one part of the problem (and
using indirect buffers would just add more problems).
Stefan
next prev parent reply other threads:[~2017-04-19 12:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-16 22:38 [ELPA] Update package: psgml Lucien Pullen
2017-04-17 16:34 ` Stefan Monnier
2017-04-19 7:39 ` Lucien Pullen
2017-04-19 12:35 ` Stefan Monnier [this message]
2017-04-21 8:06 ` [ELPA] Update package: psgml (discard patch) Lucien Pullen
2017-04-21 14:00 ` Stefan Monnier
2017-04-26 10:50 ` Lucien Pullen
2017-04-26 12:34 ` Stefan Monnier
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=jwvzifcvb0z.fsf-monnier+gmane.emacs.devel@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).