From: Thorsten Jolitz <tjolitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to change 'comment-region' behaviour globally?
Date: Sat, 16 Feb 2013 12:31:05 +0100 [thread overview]
Message-ID: <87wqu8a41y.fsf@gmail.com> (raw)
In-Reply-To: 11CFE254D76E4D089E06E7ED86A704FD@us.oracle.com
"Drew Adams" <drew.adams@oracle.com> 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.
--
cheers,
Thorsten
next prev parent reply other threads:[~2013-02-16 11:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-16 2:00 How to change 'comment-region' behaviour globally? Thorsten Jolitz
2013-02-16 3:26 ` Drew Adams
2013-02-16 11:31 ` Thorsten Jolitz [this message]
2013-02-16 12:14 ` Thorsten Jolitz
2013-02-16 14:33 ` Stefan Monnier
2013-02-16 14:38 ` Thorsten Jolitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wqu8a41y.fsf@gmail.com \
--to=tjolitz@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.