[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: |
Alan Mackenzie |
Subject: |
Re: paragraph-start and fill-paragraph in texinfo-mode |
Date: |
Tue, 13 Sep 2005 16:17:35 +0000 (GMT) |
Hi, Stefan!
On Mon, 12 Sep 2005, Stefan Monnier wrote:
>Would the patch below do the trick?
>I always hate it when the make-local-variable is separated from the setq,
>precisely because of the risk of introducing the kind of bug above.
Calling c-set-style for anything apart from a CC Mode buffer doesn't make
any sense. If somebody tries it, they're best stopped straight away, as
is done in the patch I put out earlier on.
If the buffer is already in a CC Mode when c-set-style gets called, then
these variables are "guaranteed" to be buffer-local already. But I think
it would be an excellent idea to put redundant `make-local-variable's in,
because somebody, somewhere, sometime is sure to find a way round the
aforementioned guarantee. ;-( I'll do that. Thanks for the tip!
> Stefan
>
>Index: lisp/progmodes/cc-styles.el
>===================================================================
>RCS file: /cvsroot/emacs/emacs/lisp/progmodes/cc-styles.el,v
>retrieving revision 1.35
>diff -u -r1.35 cc-styles.el
>--- lisp/progmodes/cc-styles.el 1 Aug 2005 08:37:49 -0000 1.35
>+++ lisp/progmodes/cc-styles.el 12 Sep 2005 18:15:36 -0000
>@@ -498,17 +498,19 @@
> (let ((comment-line-prefix
> (concat "[ \t]*\\(" c-current-comment-prefix "\\)[ \t]*")))
>
>- (setq paragraph-start (concat comment-line-prefix
>+ (set (make-local-variable 'paragraph-start)
>+ (concat comment-line-prefix
> c-paragraph-start
> "\\|"
>- page-delimiter)
[ .... ]
--
Alan Mackenzie (Munich, Germany)