unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10033: 24.0.91; Uncommenting fails in Autoconf mode
@ 2011-11-13  2:21 Chong Yidong
  2011-11-13  2:39 ` Chong Yidong
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2011-11-13  2:21 UTC (permalink / raw)
  To: 10033

With latest trunk:

emacs -Q configure.ac
M-;
asdf
C-SPC M-<
M-x uncomment-region RET

The uncomment-region does nothing; the line containing "dnl asdf"
remains commented out.

This is a regression; in Emacs 23.3, uncomment-region works as expected.
However, using the version of autoconf.el from Emacs 23 in Emacs 24
still shows the problem.

In GNU Emacs 24.0.91.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.2.0)
 of 2011-11-13 on furball
Windowing system distributor `The X.Org Foundation', version 11.0.11004000
configured using `configure  '--with-x-toolkit=gtk3' 'CFLAGS=-g''





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

* bug#10033: 24.0.91; Uncommenting fails in Autoconf mode
  2011-11-13  2:21 bug#10033: 24.0.91; Uncommenting fails in Autoconf mode Chong Yidong
@ 2011-11-13  2:39 ` Chong Yidong
  2011-11-13  8:40   ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2011-11-13  2:39 UTC (permalink / raw)
  To: 10033

Chong Yidong <cyd@gnu.org> writes:

> With latest trunk:
>
> emacs -Q configure.ac
> M-;
> asdf
> C-SPC M-<
> M-x uncomment-region RET
>
> The uncomment-region does nothing; the line containing "dnl asdf"
> remains commented out.

This is because the value of comment-start-skip in Autoconf mode is

   "\\(?:\\<dnl\\|#\\) +"

The \< is intended to avoid matching a "dnl" that is part of a word.  In
Emacs 23, the \< matches the beginning of the line

dnl asdf

in Autoconf mode.  But in Emacs 24, it does not match the beginning of
that line at all.  I don't see any related regexp changes in NEWS.  Does
it ring a bell for anyone?





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

* bug#10033: 24.0.91; Uncommenting fails in Autoconf mode
  2011-11-13  2:39 ` Chong Yidong
@ 2011-11-13  8:40   ` Andreas Schwab
  2011-11-15  5:29     ` Chong Yidong
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2011-11-13  8:40 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 10033

Chong Yidong <cyd@gnu.org> writes:

> This is because the value of comment-start-skip in Autoconf mode is
>
>    "\\(?:\\<dnl\\|#\\) +"
>
> The \< is intended to avoid matching a "dnl" that is part of a word.

dnl isn't a word, it is a comment, so \< cannot match it.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

* bug#10033: 24.0.91; Uncommenting fails in Autoconf mode
  2011-11-13  8:40   ` Andreas Schwab
@ 2011-11-15  5:29     ` Chong Yidong
  2011-11-15  8:22       ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2011-11-15  5:29 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 10033

Andreas Schwab <schwab@linux-m68k.org> writes:

> Chong Yidong <cyd@gnu.org> writes:
>
>> This is because the value of comment-start-skip in Autoconf mode is
>>
>>    "\\(?:\\<dnl\\|#\\) +"
>>
>> The \< is intended to avoid matching a "dnl" that is part of a word.
>
> dnl isn't a word, it is a comment, so \< cannot match it.

Yet syntax-propertize-function for Autoconf uses

  (set (make-local-variable 'syntax-propertize-function)
       (syntax-propertize-rules ("\\<dnl\\>" (0 "<"))))

which does work for matching only occurrences of `dnl' as separate
tokens.





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

* bug#10033: 24.0.91; Uncommenting fails in Autoconf mode
  2011-11-15  5:29     ` Chong Yidong
@ 2011-11-15  8:22       ` Andreas Schwab
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2011-11-15  8:22 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 10033

Chong Yidong <cyd@gnu.org> writes:

> Yet syntax-propertize-function for Autoconf uses
>
>   (set (make-local-variable 'syntax-propertize-function)
>        (syntax-propertize-rules ("\\<dnl\\>" (0 "<"))))
>
> which does work for matching only occurrences of `dnl' as separate
> tokens.

That's before dnl turns into a comment.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

end of thread, other threads:[~2011-11-15  8:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-13  2:21 bug#10033: 24.0.91; Uncommenting fails in Autoconf mode Chong Yidong
2011-11-13  2:39 ` Chong Yidong
2011-11-13  8:40   ` Andreas Schwab
2011-11-15  5:29     ` Chong Yidong
2011-11-15  8:22       ` Andreas Schwab

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).