* bug#5366: (un)comment-line macros
@ 2010-01-12 19:39 Mads Jensen
2011-10-06 7:50 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: Mads Jensen @ 2010-01-12 19:39 UTC (permalink / raw)
To: bug-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 866 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#5366: (un)comment-line macros
2010-01-12 19:39 bug#5366: (un)comment-line macros Mads Jensen
@ 2011-10-06 7:50 ` Glenn Morris
0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2011-10-06 7:50 UTC (permalink / raw)
To: 5366-done
tags 5366 wontfix
stop
Thanks for sending them, but I don't think Emacs needs these commands.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-06 7:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 19:39 bug#5366: (un)comment-line macros Mads Jensen
2011-10-06 7:50 ` Glenn Morris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.