[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change 'comment-region' behaviour globally?

From: Thorsten Jolitz
Subject: Re: How to change 'comment-region' behaviour globally?
Date: Sat, 16 Feb 2013 12:31:05 +0100
User-agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.2 (gnu/linux)

"Drew Adams" <> writes:

>> Is there a way to change the behaviour of 'comment-region'
>> globally such that, even when applied one line after another,
>> the 'comment-start' characters are
>> never indented, but always placed at the beginning of line?
>> With globally I mean that this works independent from the 
>> comment-style definitions of the major-mode, and overrides
>> the major-mode settings if they are different. 
> Customizing `comment-style' to `plain' doesn't help?
> I guess it won't help if a given major mode declares that variable to be
> buffer-local and sets its own value for it.  But it's not playing nice if the
> major mode does that, IMO.  `comment-styles' is a user option.

But I could check for a buffer-local value of 'comment-style', read and
store it, set it temporarilly to 'plain', and restore the old value when
I'm done. 

Thanks for the tip - that helped. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]