From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: drain Newsgroups: gmane.emacs.help Subject: Re: c-like comments settings Date: Thu, 3 Jan 2013 20:35:58 -0800 (PST) Message-ID: <1357274158790-274418.post@n5.nabble.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1357274173 18767 80.91.229.3 (4 Jan 2013 04:36:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Jan 2013 04:36:13 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 04 05:36:29 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 1Tqz14-0005CA-Hw for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Jan 2013 05:36:22 +0100 Original-Received: from localhost ([::1]:59006 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tqz0p-0007EI-Ac for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Jan 2013 23:36:07 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:56496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tqz0j-0007EB-It for Help-gnu-emacs@gnu.org; Thu, 03 Jan 2013 23:36:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tqz0i-00067M-FH for Help-gnu-emacs@gnu.org; Thu, 03 Jan 2013 23:36:01 -0500 Original-Received: from sam.nabble.com ([216.139.236.26]:59393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tqz0i-00067H-AG for Help-gnu-emacs@gnu.org; Thu, 03 Jan 2013 23:36:00 -0500 Original-Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Tqz0g-0004f2-Qr for Help-gnu-emacs@gnu.org; Thu, 03 Jan 2013 20:35:58 -0800 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 216.139.236.26 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:88433 Archived-At: Very lazy hint: take a look at the comment-region source code: (defun comment-region (beg end &optional arg) "Comment or uncomment each line in the region. With just \\[universal-argument] prefix arg, uncomment each line in region BEG .. END. Numeric prefix ARG means use ARG comment characters. If ARG is negative, delete that many comment characters instead. The strings used as comment starts are built from `comment-start' and `comment-padding'; the strings used as comment ends are built from `comment-end' and `comment-padding'. By default, the `comment-start' markers are inserted at the current indentation of the region, and comments are terminated on each line (even for syntaxes in which newline does not end the comment and blank lines do not get comments). This can be changed with `comment-style'." (interactive "*r\nP") (comment-normalize-vars) (if (> beg end) (let (mid) (setq mid beg beg end end mid))) (save-excursion ;; FIXME: maybe we should call uncomment depending on ARG. (funcall comment-region-function beg end arg))) -- View this message in context: http://emacs.1067599.n5.nabble.com/c-like-comments-settings-tp274365p274418.html Sent from the Emacs - Help mailing list archive at Nabble.com.