unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Alan Mackenzie <acm@muc.de>
Cc: martin rudalics <rudalics@gmx.at>, emacs-devel@gnu.org
Subject: Re: [acm@muc.de: Re: Emacs 22.2 release plans - request for a slight delay.]
Date: Mon, 17 Mar 2008 09:37:38 -0400	[thread overview]
Message-ID: <jwveja9bhj9.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20080317090449.GA2100@muc.de> (Alan Mackenzie's message of "Mon,  17 Mar 2008 09:04:49 +0000")

> I think the answer to this is to write the following in cc-cmds.el:

>     (defun c-defun-name (&optional pos)
>       "Return the name of the current function, or the one at POS.

>     \"Function\" here means any named structure with a brace block, and
>     \"current\" means the one surrounding point, starting or terminating at
>     point.

>     If there is no current function, return nil."
>     .....
>     )

> That should reduce the above `add-change-log-entry''s time to ~ 1 second.

It would be good to move all the code relating to c-mode (and
derivatives) from add-log.el to cc-mode.el.

> > I'm puzzled that (parse-partial-sexp (point-min) (point-max)) completes
> > instantaneously here (without any paren/brackets limits).
> Isn't there some sort of cacheing of p-p-s?

No.  `syntax-ppss' does such caching (and uses pps), but pps doesn't.
So syntax-ppss would be even faster in normal use (where the cache is
already filled because font-lock uses it).


        Stefan




      parent reply	other threads:[~2008-03-17 13:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-07  7:27 [acm@muc.de: Re: Emacs 22.2 release plans - request for a slight delay.] Alan Mackenzie
2008-03-16 14:11 ` martin rudalics
2008-03-16 19:36   ` Alan Mackenzie
2008-03-17  3:09     ` Stefan Monnier
2008-03-17  7:33     ` martin rudalics
2008-03-17  9:04       ` Alan Mackenzie
2008-03-17  9:30         ` martin rudalics
2008-03-25 23:17           ` Alan Mackenzie
2008-03-17 13:37         ` Stefan Monnier [this message]

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=jwveja9bhj9.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    /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).