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

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

[debbugs-tracker] bug#35600: closed (27.0.50; uncomment-region fails cor


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#35600: closed (27.0.50; uncomment-region fails correctly to reverse the action of comment-region.)
Date: Fri, 10 May 2019 07:37:02 +0000

Your message dated Fri, 10 May 2019 07:36:28 +0000
with message-id <address@hidden>
and subject line Re: bug#35600: 27.0.50; uncomment-region fails correctly to 
reverse the action of comment-region.
has caused the debbugs.gnu.org bug report #35600,
regarding 27.0.50; uncomment-region fails correctly to reverse the action of 
comment-region.
to be marked as done.

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


-- 
35600: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35600
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 27.0.50; uncomment-region fails correctly to reverse the action of comment-region. Date: Mon, 6 May 2019 10:11:00 +0000 User-agent: Mutt/1.10.1 (2018-07-13)
Hello, Emacs.

In the master branch:

With indent-tabs-mode t, and tab-width (say) 8, start off with the
following two line of Emacs lisp:

    (if (null bs-state)
        (ignore)
    ^
  <tab>


(the first of these lines being indented by four spaces, the second by a
<tab>).

Mark the two lines, and execute M-x comment-region.  We get this:

    ;; (if (null bs-state)
    ;;  (ignore)
       ^
     <tab>

(where all the space is space characters except for the <tab> just
before "(ignore)").

Now execute M-x uncomment-region.  This should restore the region to
what it started as.  Instead one gets:

    (if (null bs-state)
        (ignore)
^^^^  ^
SPCs <tab>

, there now being four spurious spaces before the <tab> preceding
"(ignore)".  This is a bug.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

In uncomment-region-default-1, the variable `spt' gets set to the result
of comment-search-forward, the ";" at the beginning of the comment on
the current line.  The function then narrows to between `spt' and BO
next line.

In this narrowed region, the function removes the comment starter.
Because of the narrowing, it cannot take any account of the spaces at
the start of the line.

Possibly, uncomment-region needs to be amended so that that narrowing
includes any space preceding the comment starter, and that space gets
properly handled.

-- 
Alan Mackenzie (Nuremberg, Germany).



--- End Message ---
--- Begin Message --- Subject: Re: bug#35600: 27.0.50; uncomment-region fails correctly to reverse the action of comment-region. Date: Fri, 10 May 2019 07:36:28 +0000 User-agent: Mutt/1.10.1 (2018-07-13)
The bug has been fixed in master.

-- 
Alan Mackenzie (Nuremberg, Germany).

On Mon, May 06, 2019 at 10:12:02 +0000, GNU bug Tracking System wrote:
> Thank you for filing a new bug report with debbugs.gnu.org.

> This is an automatically generated reply to let you know your message
> has been received.

> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.

> Your message has been sent to the package maintainer(s):
>  address@hidden

> If you wish to submit further information on this problem, please
> send it to address@hidden

> Please do not send mail to address@hidden unless you wish
> to report a problem with the Bug-tracking system.

> -- 
> 35600: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35600
> GNU Bug Tracking System
> Contact address@hidden with problems


--- End Message ---

reply via email to

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