unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw.
@ 2006-12-15  5:03 Richard Stallman
  2006-12-15  6:31 ` Sean O'Rourke
                   ` (2 more replies)
  0 siblings, 3 replies; 120+ messages in thread
From: Richard Stallman @ 2006-12-15  5:03 UTC (permalink / raw)


I have now read the messages about this which arrived in the past week
or two, and checked the code again.

Basically, we have three different things in Emacs that
need to find, more or less, "the start of this defun".

* beginning-of-defun-raw.

* syntax.el

* find_defun_start in syntax.c

There are different features for customizing each of these three.
This is a very confusing situation.

The change I asked for, to make open-paren-in-column-0-is-defun-start
affect beginning-of-defun-raw, causes a major slowness.  4 seconds for
M-> is too painful.  So now I think that change should be undone.  But
just undoing it won't make everything ok.

The name open-paren-in-column-0-is-defun-start implies to me
that this variable ought to affect beginning-of-defun-raw.
After all, that command finds a defun start.

So if we make that variable apply only to syntax.c, as it used to,
perhaps we should rename it to open-paren-in-column-0-is-outer-level.

However, that name suggests that syntax.el ought to obey it too.

That makes me wonder whether find_defun_start should use
syntax-begin-function.  Does that work right?  If so, we could
eliminate open-paren-in-column-0-is-defun-start.  Stefan suggested
something similar: making back_comment use syntax-ppss.

How hard is that to implement?

Stefan also suggested we arrange another better way to
customize beginning-of-defun (and the parts of Font Lock that
highlight things that look like beginnings of defuns).

With those two changes, open-paren-in-column-0-is-defun-start
could be eliminated.

As for fixing the misfontifications of C mode, David Kastrup wrote:

    The large slowdown most likely would not be necessary if information
    was reused intelligently and not scanned repeatedly.  That requires a
    good analysis and careful implementation/reimplementation.

I agree with him that that is worth trying, but only after the
release.


A different but related question:

Should C mode do (setq beginning-of-defun-function 'c-beginning-of-defun)
Is there any reason that would be bad?

^ permalink raw reply	[flat|nested] 120+ messages in thread

end of thread, other threads:[~2006-12-18  0:06 UTC | newest]

Thread overview: 120+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87y7po2e9b.fsf@leeloo.anubex.internal>
     [not found] ` <45741FBE.3000107@swipnet.se>
     [not found]   ` <45742464.1090504@gmx.at>
2006-12-04 21:17     ` Mysterious fontification/C++ context issue Alan Mackenzie
2006-12-06  0:47       ` Richard Stallman
2006-12-06  9:04       ` martin rudalics
2006-12-06 12:22         ` Kim F. Storm
2006-12-06 16:31           ` Chong Yidong
2006-12-07  4:59             ` Richard Stallman
2006-12-09 17:46               ` Chong Yidong
2006-12-09 20:09                 ` Stefan Monnier
2006-12-11  1:05                   ` Richard Stallman
2006-12-11  2:27                     ` Stefan Monnier
2006-12-11  4:38                     ` Stefan Monnier
2006-12-12 16:24                       ` Chong Yidong
2006-12-12 17:10                         ` Stefan Monnier
2006-12-10  4:24                 ` Richard Stallman
2006-12-10  0:35               ` Alan Mackenzie
2006-12-10  1:11                 ` Chong Yidong
2006-12-10  9:12                   ` Alan Mackenzie
2006-12-10 12:46                     ` David Kastrup
2006-12-10 14:50                       ` Alan Mackenzie
2006-12-10 15:13                         ` David Kastrup
2006-12-10 20:30                     ` Chong Yidong
2006-12-13 21:29                       ` Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw Alan Mackenzie
2006-12-14  1:02                         ` Chong Yidong
2006-12-14  7:36                           ` Alan Mackenzie
2006-12-14 10:47                             ` martin rudalics
2006-12-14 18:26                               ` Alan Mackenzie
2006-12-14 18:53                                 ` David Kastrup
2006-12-14 20:21                                 ` Chong Yidong
2006-12-14 20:35                                 ` Chong Yidong
2006-12-14 22:18                                   ` Alan Mackenzie
2006-12-14 22:51                                     ` Chong Yidong
2006-12-15  0:53                                     ` David Kastrup
2006-12-15 10:35                                     ` Johan Bockgård
2006-12-14 21:53                                 ` What `opic0ids' really is [was: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw.] Stuart D. Herring
2006-12-15  7:32                                 ` Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw martin rudalics
2006-12-15 19:22                                   ` Alan Mackenzie
2006-12-15 22:20                                     ` David Kastrup
2006-12-16 10:17                                     ` martin rudalics
2006-12-17 11:44                                       ` Alan Mackenzie
2006-12-17 12:02                                         ` David Kastrup
2006-12-17 12:08                                           ` Alan Mackenzie
2006-12-17 12:14                                             ` David Kastrup
2006-12-17 12:26                                               ` Alan Mackenzie
2006-12-17 12:51                                                 ` David Kastrup
2006-12-17 17:28                                         ` martin rudalics
2006-12-17 18:36                                         ` Mysterious fontification/C++ context issue - Patch for c-basic-common-init Alan Mackenzie
2006-12-17 18:45                                           ` Chong Yidong
2006-12-17 22:18                                             ` Alan Mackenzie
2006-12-17 22:59                                               ` Chong Yidong
2006-12-18  0:06                                         ` Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw Stefan Monnier
2006-12-15 23:24                               ` Stefan Monnier
2006-12-16 10:17                                 ` martin rudalics
2006-12-16 18:14                                   ` Chong Yidong
2006-12-16 18:27                                   ` martin rudalics
2006-12-16 19:00                                     ` martin rudalics
2006-12-16 19:33                                       ` Chong Yidong
2006-12-16 19:59                                         ` martin rudalics
2006-12-16 20:10                                           ` Chong Yidong
2006-12-16 21:26                                             ` Chong Yidong
2006-12-16 22:43                                               ` martin rudalics
2006-12-16 23:30                                               ` Stefan Monnier
2006-12-16 23:40                                                 ` martin rudalics
2006-12-17  0:04                                                   ` Stefan Monnier
2006-12-17  4:02                                                     ` Chong Yidong
2006-12-17 10:32                                                       ` martin rudalics
2006-12-17 10:26                                                     ` martin rudalics
2006-12-17 10:59                                                       ` David Kastrup
2006-12-17 23:23                                                       ` Stefan Monnier
2006-12-17 11:10                                                     ` Alan Mackenzie
2006-12-17 12:01                                                       ` David Kastrup
2006-12-18  0:04                                                       ` Stefan Monnier
2006-12-16 22:11                                             ` martin rudalics
2006-12-16 23:29                                           ` Stefan Monnier
2006-12-16 23:37                                             ` martin rudalics
2006-12-16 20:22                                         ` David Kastrup
2006-12-16 22:21                                           ` martin rudalics
2006-12-14 17:29                             ` Chong Yidong
2006-12-14 18:56                               ` David Kastrup
2006-12-14 22:57                               ` Alan Mackenzie
2006-12-15 22:56                           ` Stefan Monnier
2006-12-15 23:03                             ` David Kastrup
2006-12-14 10:45                         ` martin rudalics
2006-12-14 18:29                           ` Alan Mackenzie
2006-12-15 22:49                         ` Stefan Monnier
2006-12-10 21:39                     ` Mysterious fontification/C++ context issue Stefan Monnier
2006-12-10 23:14                       ` Kim F. Storm
2006-12-14  7:43                       ` Alan Mackenzie
2006-12-14  7:51                         ` Miles Bader
2006-12-15 23:36                         ` Stefan Monnier
2006-12-10  9:18                   ` martin rudalics
2006-12-11  1:23                     ` Stefan Monnier
2006-12-11  7:23                       ` martin rudalics
2006-12-11  7:36                         ` Stefan Monnier
2006-12-11  8:32                           ` martin rudalics
2006-12-11 16:30                             ` Stefan Monnier
2006-12-11  1:05                 ` Stefan Monnier
2006-12-11  1:06                 ` Richard Stallman
2006-12-06 18:44         ` Richard Stallman
2006-12-06 22:38           ` martin rudalics
2006-12-08  5:05             ` Richard Stallman
2006-12-09  9:42               ` martin rudalics
2006-12-10  4:24                 ` Richard Stallman
2006-12-10  8:38                   ` martin rudalics
2006-12-10 10:56                   ` Alan Mackenzie
2006-12-10 11:58                     ` martin rudalics
2006-12-10 14:30                       ` Slawomir Nowaczyk
2006-12-11  1:29                     ` Stefan Monnier
2006-12-06 20:52         ` Alan Mackenzie
2006-12-06 22:38           ` martin rudalics
2006-12-07  5:07           ` Stefan Monnier
2006-12-15  5:03 Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw Richard Stallman
2006-12-15  6:31 ` Sean O'Rourke
2006-12-15 16:08   ` Chong Yidong
2006-12-15 16:16     ` Sean O'Rourke
2006-12-15 16:44       ` Chong Yidong
2006-12-15 20:46         ` Stuart D. Herring
2006-12-15 21:24   ` Richard Stallman
2006-12-15 22:31     ` Sean O'Rourke
2006-12-15 16:57 ` Chong Yidong
2006-12-15 23:33 ` Stefan Monnier

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).