unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#16180: M-x align eats text
@ 2013-12-17 22:15 Paul Pogonyshev
  2013-12-18  1:27 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Pogonyshev @ 2013-12-17 22:15 UTC (permalink / raw)
  To: 16180

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

To reproduce, create a .cpp file with the following two lines:

aaa = 1; // xxx
b = 2; // yyy

select everything and 'M-x align'. Result here:

aaa = 1;                        // x
b   = 2;                        // yyy

The first comment is half-eaten.

Version: GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.6)
of 2013-12-17 on gonzo.localdomain

Paul

[-- Attachment #2: Type: text/html, Size: 533 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#16180: M-x align eats text
  2013-12-17 22:15 bug#16180: M-x align eats text Paul Pogonyshev
@ 2013-12-18  1:27 ` Glenn Morris
  2013-12-19 18:07   ` Paul Pogonyshev
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2013-12-18  1:27 UTC (permalink / raw)
  To: Paul Pogonyshev; +Cc: 16180


I can't reproduce this.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#16180: M-x align eats text
  2013-12-18  1:27 ` Glenn Morris
@ 2013-12-19 18:07   ` Paul Pogonyshev
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Pogonyshev @ 2013-12-19 18:07 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 16180

[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]

Hm, I could have sworn I tested it with 'emacs -q', but apparently I made a
mistake. In the end, however, it boiled down to corrupted part of '.emacs'
where customization variables are (this is an alignment rule):

     (open-comment
      (regexp lambda
              (end reverse)
              (funcall
               (if reverse
                   (quote re-search-backward)
                 (quote re-search-forward))
               (concat "[^
\\\\]"
                       (regexp-quote comment-start)
                       "\\(.+\\)$")
               end t))
      (modes . align-open-comment-modes))

The string after 'concat' looks very incorrect and when I replaced it with
the proper one from current source code, comment eating is gone. Of course,
I cannot guarantee I didn't modify it, but _maybe_ at some point Emacs
screwed it up itself. Can you try customizing 'align-rules-list' in a
harmless way and check that what is written in Elisp is actually correct?

Paul


On 18 December 2013 04:27, Glenn Morris <rgm@gnu.org> wrote:

>
> I can't reproduce this.
>

[-- Attachment #2: Type: text/html, Size: 1681 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-19 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-17 22:15 bug#16180: M-x align eats text Paul Pogonyshev
2013-12-18  1:27 ` Glenn Morris
2013-12-19 18:07   ` Paul Pogonyshev

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).