* Vincent Belaïche (2008-08-10) writes: > Ralf Angeli a écrit : >> >> The idea was not to make each line a of the preprocessor code its own >> paragraph separator, but to establish some separation between a normal >> comment and the preprocessor code. Then when you fill a comment >> paragraph it will not mess up the preprocessor code. >> >> The solution for the preprocessor code is simply not to type `M-q' when >> point is in it. In case there should be more control about how the code >> is to be indented or filled, using a separate major mode which gets >> switched on if the preprocessor code is entered and off when left would >> probably be a better idea than shoehorning filling restrictions into >> AUCTeX. >> > Then there are two drawbacks for that > 1) the user has to care not to make a M-q when the point is in the > pre-preprocessor code
That's what I've already written above. Of course this would not be a problem if there were dedicated filling code which would be able to deal with the syntax of the preprocessor code. This would be a superior solution to simply making the preprocessor code immutable to the filling code. The latter way would just be a quick way of providing something like the verbatim environment in LaTeX. I'd use something like that for content which does not follow a certain syntax. In other cases a separate major mode would usually be better. I've hinted at that before as well. > 2) the pre-processor code will split paragraphs into pieces, which I > think is awkward. I don't understand this statement. >> I can still see some use for the definition of sections which should be >> spared from filling (especially if a larger region is to be filled), but >> perhaps there should better be a general mechanism in Emacs which could >> be used or adopted by AUCTeX once it is there. [...] > What you suggest would need that AUCTeX filling mechanism should be a > layer on top of some general filling kernel provided by Emacs, whereas > it seems to be currently a complete overload of Emacs filling procedure > (w/o reuse). It would be good if we could use more of the functionality from Emacs proper, but filling in AUCTeX has to jump through quite some hoops to be able to fill docTeX documentation parts and cater for special break points in LaTeX code. Since the standard Emacs filling code did not provide this, it was implemented in AUCTeX. But this is just an implementation detail. What I was talking about earlier is that _conceptually_ the possibility to make sections immutable to filling should not be a trait of AUCTeX, but of Emacs, i.e. _if_ there really is a need for this it should be provided as a general functionality. Personally I think it would be better to improve Emacs' provisions for multi major mode files types. > *Please confirm your intention* : > do you object to my contribution ? > If yes, you seem however to see some need for unfillable sections, could > you please tell me how I could make this function available in an > acceptable manner, as I do need for it, and I am sure that other people > may need for it too. I'd post the idea on the Emacs development list for discussion. -- Ralf _______________________________________________ auctex mailing list [email protected] http://lists.gnu.org/mailman/listinfo/auctex
