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 13:14:09 +0100 Message-ID: <87sj4wa226.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 1361016871 26977 80.91.229.3 (16 Feb 2013 12:14:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Feb 2013 12:14:31 +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 13:14:53 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 1U6gfM-0003dd-R7 for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Feb 2013 13:14:52 +0100 Original-Received: from localhost ([::1]:56893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6gf2-0006t7-S7 for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Feb 2013 07:14:32 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6gew-0006sm-Gb for help-gnu-emacs@gnu.org; Sat, 16 Feb 2013 07:14:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6get-0004cq-O9 for help-gnu-emacs@gnu.org; Sat, 16 Feb 2013 07:14:26 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:40801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6get-0004cg-H3 for help-gnu-emacs@gnu.org; Sat, 16 Feb 2013 07:14:23 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U6gfA-0003ZF-5k for help-gnu-emacs@gnu.org; Sat, 16 Feb 2013 13:14:40 +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 13:14:40 +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 13:14:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 25 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:ekVMNynzn2VTiHBc0nycTNFIhKU= 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:89124 Archived-At: "Drew Adams" writes: > 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. One more question about the global vs buffer-local variable 'comment-style': if I want to temporarilly set it to another value in a program, do I have to check first if its a global value or a buffer-local value that is set for the buffer, or is this immaterial, i.e. whenever I call setq on 'comment-style', it will apply to the version that is active in the buffer? In other words, can I simply call '(setq comment-style "plain") at the beginning of the program, and then e.g. '(setq comment-style "indent") at the end of the program, without worrying if 'comment-style' is global or local for the buffer at hand? -- cheers, Thorsten