From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mads Jensen Newsgroups: gmane.emacs.bugs Subject: bug#5366: (un)comment-line macros Date: Tue, 12 Jan 2010 20:39:39 +0100 Message-ID: <4B4CCFFB.6020404@inducks.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB65D5F490517F2D7590FE49E" X-Trace: ger.gmane.org 1263418344 31238 80.91.229.12 (13 Jan 2010 21:32:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jan 2010 21:32:24 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 13 22:32:16 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NVAp4-0006aU-CM for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jan 2010 22:32:14 +0100 Original-Received: from localhost ([127.0.0.1]:43662 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVAp5-00070B-03 for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jan 2010 16:32:15 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUng8-0006u4-Ae for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 15:49:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUng3-0006qa-GK for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 15:49:27 -0500 Original-Received: from [199.232.76.173] (port=59661 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUng3-0006qO-8P for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 15:49:23 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36068) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NUng2-0008QR-Sn for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 15:49:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NUnV3-0005PL-K7; Tue, 12 Jan 2010 15:38:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Mail-Followup-To: Mads Jensen , 5366@debbugs.gnu.org Resent-From: Mads Jensen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Jan 2010 20:38:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5366 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.126332862920741 (code B ref -1); Tue, 12 Jan 2010 20:38:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Jan 2010 20:37:09 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUnU0-0005O9-Ko for submit@debbugs.gnu.org; Tue, 12 Jan 2010 15:37:09 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUmbI-0004hN-1b for submit@debbugs.gnu.org; Tue, 12 Jan 2010 14:40:26 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]:36231) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUmbD-00015v-P2 for submit@debbugs.gnu.org; Tue, 12 Jan 2010 14:40:19 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NUmbC-0005AQ-1U for submit@debbugs.gnu.org; Tue, 12 Jan 2010 14:40:18 -0500 Original-Received: from lists.gnu.org ([199.232.76.165]:48048) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NUmbB-0005AG-QM for submit@debbugs.gnu.org; Tue, 12 Jan 2010 14:40:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NUmbB-0007ob-9a for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 14:40:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NUmb6-0007nk-FF for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 14:40:16 -0500 Original-Received: from [199.232.76.173] (port=50181 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NUmb6-0007nf-Au for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 14:40:12 -0500 Original-Received: from fitch7.uni2.net ([129.142.225.149]:55368) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NUmb5-00054I-UU for bug-gnu-emacs@gnu.org; Tue, 12 Jan 2010 14:40:12 -0500 Original-Received: from [10.0.10.211] (unknown [130.227.120.134]) by fitch7.uni2.net (Postfix) with ESMTP id 6F9922A02C9F for ; Tue, 12 Jan 2010 20:40:02 +0100 (CET) User-Agent: Thunderbird 2.0.0.23 (X11/20090817) X-Enigmail-Version: 0.95.7 OpenPGP: id=7E775BDA X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Tue, 12 Jan 2010 15:36:55 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -6.6 (------) Resent-Date: Tue, 12 Jan 2010 15:38:01 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Wed, 13 Jan 2010 16:31:17 -0500 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34299 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB65D5F490517F2D7590FE49E Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Hi, I wrote the following two very simple macros. Nevertheless, I find them very useless, and would be pleased if you could include them in a future version of emacs. (defun comment-line () "comments the line" (interactive) (let ((start (point-at-bol)) (end (point-at-eol))) (save-excursion (indent-region start end) (comment-region start end) (if (not (string=3D major-mode "text-mode")) (indent-for-tab-command))))) (defun uncomment-line () "uncomments the current line" (interactive) (let ((start (point-at-bol)) (end (point-at-eol))) (save-excursion (uncomment-region start end) (if (not (string=3D major-mode "text-mode")) (indent-region start end))))) I bound them to "C-c l" and "C-c u" respectively. Yours sincerely, Mads Jensen --------------enigB65D5F490517F2D7590FE49E Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAktMz/sACgkQPOK1Nn53W9r9GgCdEWcxUJY3U2ZpfDuvKrdU4BFT rlYAn157ifbI+nTcj5SPhXEKmsdddlTc =ODSL -----END PGP SIGNATURE----- --------------enigB65D5F490517F2D7590FE49E--