emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#5366: closed ((un)comment-line macros)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#5366: closed ((un)comment-line macros)
Date: Thu, 06 Oct 2011 07:51:02 +0000

Your message dated Thu, 06 Oct 2011 03:50:22 -0400
with message-id <address@hidden>
and subject line Re: bug#5366: (un)comment-line macros
has caused the debbugs.gnu.org bug report #5366,
regarding (un)comment-line macros
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
5366: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5366
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: (un)comment-line macros Date: Tue, 12 Jan 2010 20:39:39 +0100 User-agent: Thunderbird 2.0.0.23 (X11/20090817)
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= 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= major-mode "text-mode"))
          (indent-region start end)))))

I bound them to "C-c l" and "C-c u" respectively.

Yours sincerely,
Mads Jensen

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message --- Subject: Re: bug#5366: (un)comment-line macros Date: Thu, 06 Oct 2011 03:50:22 -0400 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
tags 5366 wontfix
stop

Thanks for sending them, but I don't think Emacs needs these commands.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]