1

When editing an Autoconf (configure.ac) file I observe strange behaviour when using M-; (comment-dwim) to uncomment a selected region. When a region with comments is selected comment-dwim calls uncomment-region, so maybe the problem is in that function.

Commenting a region works as expected:

# ACML
AC_SEARCH_LIBS(dgemm, acml_mp,
   [found_blas=1 AM_CPPFLAGS="-D_acml_ $AM_CPPFLAGS"],
   [AC_MSG_NOTICE([NOT using AMD the ACML library])],
   [-lgfortran]
)

becomes:

dnl # ACML
dnl AC_SEARCH_LIBS(dgemm, acml_mp,
dnl    [found_blas=1 AM_CPPFLAGS="-D_acml_ $AM_CPPFLAGS"],
dnl    [AC_MSG_NOTICE([NOT using AMD the ACML library])],
dnl    [-lgfortran]
dnl )

However, when trying to uncomment the region, the result is:

dnl ACML
dnl AC_SEARCH_LIBS(dgemm, acml_mp,
   [found_blas=1 AM_CPPFLAGS="-D_acml_ $AM_CPPFLAGS"],
dnl    [AC_MSG_NOTICE([NOT using AMD the ACML library])],
   [-lgfortran]
dnl )

Did I miss something or have I hit a bug?

  • Testing this in Emacs 24.4 (-Q) and I do not see this behavior. The comments are added and removed on each line. – glucas Nov 6 '14 at 15:21
  • Hmm, Emacs 24.3.1 here. The problem is present even when using -Q. I probably should start looking for a Emacs 24.4 repo for Ubuntu... – ph0t0nix Nov 6 '14 at 15:38
  • Sounds like a bug (regression) in 24.3.1. – Drew Nov 11 '14 at 23:12
1

Works in Emacs 23.4, reproduced in Emacs 24.3.

This is Bug #14046, with no resolution as I write.

I think it's a duplicate of Bug #15822, which is fixed by revision 115027 to autoconf.el released in Emacs 24.4.

  • Thank you for digging into this and pointing to the bug reports and resolution. – ph0t0nix Nov 11 '14 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.