[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: paragraph-start and fill-paragraph in texinfo-mode
From: |
Joseph Kiniry |
Subject: |
Re: paragraph-start and fill-paragraph in texinfo-mode |
Date: |
Mon, 12 Sep 2005 17:35:10 +0100 |
User-agent: |
Gnus/5.1001 (Gnus v5.10.1) Emacs/22.0.50 (darwin) |
Hi Richard et al,
"Richard M. Stallman" <address@hidden> writes:
> Tracing fill-paragraph shows that forward-paragraph is not working
> properly, perhaps due to paragraph-separate/paragraph-start not being
> defined properly.
>
> That definition is strange--I suggest you figure out where it comes from.
I agree. I have been trying to figure out its source.
> In a texinfo buffer (the buffer-local variable) paragraph-start is
> defined as
> "\\|@[a-zA-Z]*[ \n]\\|[ ]*\\(//+\\|\\**\\)[ ]*\\|^\f"
>
> Here's what I see when I visit a file in Texinfo mode
> after emacs -Q.
>
> "\\|@[a-zA-Z]*[
> ]\\|[ ]*$"
I see the same.
A grep-tree of all paths in my load-path reveals that the only place
the suspicious subexpression "//+\\|\\**" is used (literally) is
in cc-vars.el wrt the defcustom of c-comment-prefix-regexp.
After some debugging, the problem seems to be with
c-setup-paragraph-style via c-add-style.
I define my own programming styles and use c-add-style to add them to
c-style-alist. If I set the &optional set-p in the application of
c-add-style, then c-setup-paragraph-style sets paragraph-start as if
it were not a buffer local variable. Thus, all buffers henceforth
have comment-line-prefix and c-paragraph-start appended to their
paragraph-start.
I find the documentation for dont-override in c-set-style to be obtuse.
Regardless of use, the definition of a new c-style should not impact
buffers in other styles, yet it does, due to the use of
paragraph-start as a global variable in c-setup-paragraph-style.
My apologies, but I am not familiar enough with cc-styles to provide a
quick patch, nor would I trust my patch with such a small data set
with which to test. Perhaps the CC Mode maintainers have a position
on this situation? I have CCed them on this note.
Best,
Joe
--
Joseph Kiniry
School of Computer Science and Informatics
UCD Dublin
http://secure.ucd.ie/
http://srg.cs.ucd.ie/