[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: Re: Emacs 22.2 release plans - request for a slight
From: |
Stefan Monnier |
Subject: |
Re: address@hidden: Re: Emacs 22.2 release plans - request for a slight delay.] |
Date: |
Mon, 17 Mar 2008 09:37:38 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
> 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
- address@hidden: Re: Emacs 22.2 release plans - request for a slight delay.], Alan Mackenzie, 2008/03/07
- Re: address@hidden: Re: Emacs 22.2 release plans - request for a slight delay.], martin rudalics, 2008/03/16
- Re: address@hidden: Re: Emacs 22.2 release plans - request for a slight delay.], Alan Mackenzie, 2008/03/16
- Re: address@hidden: Re: Emacs 22.2 release plans - request for a slight delay.], Stefan Monnier, 2008/03/16
- Re: address@hidden: Re: Emacs 22.2 release plans - request for a slight delay.], martin rudalics, 2008/03/17
- Re: address@hidden: Re: Emacs 22.2 release plans - request for a slight delay.], Alan Mackenzie, 2008/03/17
- Re: address@hidden: Re: Emacs 22.2 release plans - request for a slight delay.], martin rudalics, 2008/03/17
- Re: address@hidden: Re: Emacs 22.2 release plans - request for a slight delay.], Alan Mackenzie, 2008/03/25
- Re: address@hidden: Re: Emacs 22.2 release plans - request for a slight delay.],
Stefan Monnier <=