From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: How to change 'comment-region' behaviour globally? Date: Sat, 16 Feb 2013 12:31:05 +0100 Message-ID: <87wqu8a41y.fsf@gmail.com> References: <87txpdggqv.fsf@gmail.com> <11CFE254D76E4D089E06E7ED86A704FD@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361014283 6401 80.91.229.3 (16 Feb 2013 11:31:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Feb 2013 11:31:23 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 16 12:31:45 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U6fzc-000573-OO for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Feb 2013 12:31:44 +0100 Original-Received: from localhost ([::1]:50210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6fzJ-0007uk-0i for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Feb 2013 06:31:25 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6fzC-0007t7-7K for help-gnu-emacs@gnu.org; Sat, 16 Feb 2013 06:31:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6fzB-00023M-8A for help-gnu-emacs@gnu.org; Sat, 16 Feb 2013 06:31:18 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:51919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6fzB-00023D-1L for help-gnu-emacs@gnu.org; Sat, 16 Feb 2013 06:31:17 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U6fzR-00053O-Fz for help-gnu-emacs@gnu.org; Sat, 16 Feb 2013 12:31:33 +0100 Original-Received: from e178118153.adsl.alicedsl.de ([85.178.118.153]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Feb 2013 12:31:33 +0100 Original-Received: from tjolitz by e178118153.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 16 Feb 2013 12:31:33 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178118153.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:wA4yKrfoQdbLODKSCiZrC8fY/tg= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89123 Archived-At: "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. -- cheers, Thorsten