help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: My uncomment-region broke


From: Stephen Berman
Subject: Re: My uncomment-region broke
Date: Tue, 02 Nov 2021 16:17:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

On Tue, 2 Nov 2021 10:18:08 -0400 Ken Goldman <kgoldman@us.ibm.com> wrote:

> (defun uncomment-region (b e)
>   "Remove one level of comment around region."
>   (interactive "r")
>   (comment-region b e -1))
>
> I've been using this for years.  I select a region with the
> mouse and this uncomments it.  With new emacs, I get
>
> comment-region-default-1: Wrong number of arguments: (lambda (b e) "Remove one
> level of comment around region." (interactive "r") (comment-region b e -1)), 3
>
> I'm not an elisp programmer.  Can someone supply a replacement?

Rename it to e.g. kg-uncomment-region.  (It raises an error because
comment-region-default-1 calls another emacs function uncomment-region
which takes an optional third argument, so it clashes with your
definition.)

Steve Berman



reply via email to

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