From: Leo <sdl.web@gmail.com>
To: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Font locking #|...|# block in lisp mode?
Date: Tue, 26 Oct 2010 11:24:31 +0800 [thread overview]
Message-ID: <m1ocahljps.fsf@cam.ac.uk> (raw)
In-Reply-To: <4CC5DDAF.4060107@gnu.org> (Sam Steingold's message of "Mon, 25 Oct 2010 15:42:39 -0400")
[-- Attachment #1: Type: text/plain, Size: 836 bytes --]
On 2010-10-26 03:42 +0800, Sam Steingold wrote:
> emacs uses the heuristic that "^(" starts a function.
> this mean that a paren in column one which does not start a function
> will mess emacs us.
> you can add a space before it in comment or backslash in doc string:
>
> (defun f ()
> "Doc which contains parens.
> \(backslash disappears in the reader but saves emacs)"
> code...)
>
> #| add a space before "(defun" to help emacs
> (defun f ())
> #|
On 2010-10-26 03:38 +0800, Stefan Monnier wrote:
> Don't know: works for me, so I'm not sure what case needs to
> be improved.
>
>
> Stefan
From time to time I have seen code inside #| |# not shown in a comment
face, unfortunately the font locking seems random to me i.e. sometimes
the block is properly font locked after deleting or re-opening the file.
For example:
[-- Attachment #2: emacs-comment.png --]
[-- Type: image/png, Size: 27368 bytes --]
[-- Attachment #3: Type: text/plain, Size: 108 bytes --]
I can get |# to be highlighted in a normal face by deleting or inserting
a blank line in front of it.
Leo
next prev parent reply other threads:[~2010-10-26 3:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 15:13 Font locking #|...|# block in lisp mode? Leo
2010-10-25 19:38 ` Stefan Monnier
2010-10-25 19:42 ` Sam Steingold
2010-10-26 3:24 ` Leo [this message]
2010-10-26 4:06 ` Stefan Monnier
2010-10-27 1:29 ` Leo
2010-11-08 19:23 ` Stefan Monnier
2010-11-09 11:48 ` Leo
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=m1ocahljps.fsf@cam.ac.uk \
--to=sdl.web@gmail.com \
--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).