[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX] Comment or uncomment only one line
From: |
Igor Sosa Mayor |
Subject: |
Re: [AUCTeX] Comment or uncomment only one line |
Date: |
Mon, 19 May 2014 20:55:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Thorsten Grothe <address@hidden> writes:
> let's say I only want to comment out one line like *nosolutions*, when I hit
> C-c ; or C-c % Auctex comments out the whole paragraph or the whole region but
> I want to comment out/in only *one single line*, is this possible with a
> shortcut?
I'm not aware of such a function, but you could do something like that:
--8<---------------cut here---------------start------------->8---
(defun Tex-comment-line ()
(interactive)
(beginning-of-line)
(let ((beg (point)))
(end-of-line)
(TeX-comment-or-uncomment-region beg (point)))
)
--8<---------------cut here---------------end--------------->8---
and bind it to a key.
--
:: Igor Sosa Mayor :: address@hidden ::
:: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ ::
:: jabberid: rogorido :: ::