unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5706: 23.1; Comments incorrectly detected in autoconf mode
@ 2010-03-11 15:34 rrt
  2020-11-19  3:12 ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: rrt @ 2010-03-11 15:34 UTC (permalink / raw)
  To: 5706

A hash character does not always introduce a comment in autoconf code,
but autoconf-mode always colors if as if it did. Unfortunately, I
cannot really tell from the autoconf manual what the rules are. I
suspect that # does not start a comment if it is inside [...] quotes,
but I guess this should be checked.


In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3)
 of 2009-11-10 on vernadsky, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10604000
configured using `configure  '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Autoconf

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  show-paren-mode: t
  savehist-mode: t
  minibuffer-electric-default-mode: t
  iswitchb-mode: t
  icomplete-mode: t
  global-auto-revert-mode: t
  desktop-save-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-s p c r e _ m a k e C-a C-p C-p C-p C-p C-p C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-x b <return> <backspace> 
C-x C-s <right> <right> <right> <right> <right> <down> 
<down> <down> <down> <left> <up> <up> <up> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <right> 
<right> <return> SPC SPC <down> <down> <down> <right> 
<right> <right> <down> <right> <left> ] <right> <backspace> 
C-/ <left> <backspace> ) ] <right> C-x C-s <up> <up> 
<up> <up> <up> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <down> <left> <left> <left> 
<left> <left> <left> <right> <right> <right> <left> 
<right> <right> <right> <right> <left> <right> <down> 
<down> <down> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <down> <left> <left> <left> <right> 
<left> <right> <left> <up> <up> <up> <up> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <down> <down> <down> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <down> <left> 
<right> <right> <down> <left> <left> <left> <left> 
<left> <left> <right> <right> <right> <right> <right> 
<right> <left> <left> <left> <left> <left> <backspace> 
<backspace> C-x C-s M-x r e p o r t b <backspace> = 
<backspace> - - <backspace> e m a c s - b u g <ret
urn>

Recent messages:
Mark saved where search started [2 times]
Saving file /home/rrt/repo/grep-dlopen-pcre/configure.ac...
Wrote /home/rrt/repo/grep-dlopen-pcre/configure.ac
Auto-saving...done
Undo!
Saving file /home/rrt/repo/grep-dlopen-pcre/configure.ac...
Wrote /home/rrt/repo/grep-dlopen-pcre/configure.ac
Saving file /home/rrt/repo/grep-dlopen-pcre/configure.ac...
Wrote /home/rrt/repo/grep-dlopen-pcre/configure.ac
Reverting buffer `configure'.







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

* bug#5706: 23.1; Comments incorrectly detected in autoconf mode
  2010-03-11 15:34 bug#5706: 23.1; Comments incorrectly detected in autoconf mode rrt
@ 2020-11-19  3:12 ` Stefan Kangas
  2020-11-19  7:37   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2020-11-19  3:12 UTC (permalink / raw)
  To: rrt; +Cc: 5706

rrt@sc3d.org writes:

> A hash character does not always introduce a comment in autoconf code,
> but autoconf-mode always colors if as if it did. Unfortunately, I
> cannot really tell from the autoconf manual what the rules are. I
> suspect that # does not start a comment if it is inside [...] quotes,
> but I guess this should be checked.

(This bug was reported 10 years ago, but unfortunately never got a reply
at the time.)

Could you give an example of some autoconf code where you believe the
hash character is incorrectly identified as a comment?





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

* bug#5706: 23.1; Comments incorrectly detected in autoconf mode
  2020-11-19  3:12 ` Stefan Kangas
@ 2020-11-19  7:37   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-11-19 14:51     ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-11-19  7:37 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 5706

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

On Thu, 19 Nov 2020 at 03:12, Stefan Kangas <stefan@marxist.se> wrote:

> rrt@sc3d.org writes:
>
> > A hash character does not always introduce a comment in autoconf code,
> > but autoconf-mode always colors if as if it did. Unfortunately, I
> > cannot really tell from the autoconf manual what the rules are. I
> > suspect that # does not start a comment if it is inside [...] quotes,
> > but I guess this should be checked.
>
> (This bug was reported 10 years ago, but unfortunately never got a reply
> at the time.)
>
> Could you give an example of some autoconf code where you believe the
> hash character is incorrectly identified as a comment?
>

A quick bit of grepping finds the in XEmacs's configure.ac. Note in
particular the contents of the first argument to AC_LANG_PROGRAM:

AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <features.h>],[
#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
#error Not a GNU libc system :-(
******* ======= ******** &&&&&&&&
#endif
])], have_glibc=yes, have_glibc=no)

-- 
https://rrt.sc3d.org

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

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

* bug#5706: 23.1; Comments incorrectly detected in autoconf mode
  2020-11-19  7:37   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-11-19 14:51     ` Stefan Kangas
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Kangas @ 2020-11-19 14:51 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: 5706

tags 5706 + confirmed
thanks

Reuben Thomas <rrt@sc3d.org> writes:

> On Thu, 19 Nov 2020 at 03:12, Stefan Kangas <stefan@marxist.se> wrote:
>
>> rrt@sc3d.org writes:
>>
>> > A hash character does not always introduce a comment in autoconf code,
>> > but autoconf-mode always colors if as if it did. Unfortunately, I
>> > cannot really tell from the autoconf manual what the rules are. I
>> > suspect that # does not start a comment if it is inside [...] quotes,
>> > but I guess this should be checked.
>>
>> (This bug was reported 10 years ago, but unfortunately never got a reply
>> at the time.)
>>
>> Could you give an example of some autoconf code where you believe the
>> hash character is incorrectly identified as a comment?
>>
>
> A quick bit of grepping finds the in XEmacs's configure.ac. Note in
> particular the contents of the first argument to AC_LANG_PROGRAM:
>
> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <features.h>],[
> #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
> #error Not a GNU libc system :-(
> ******* ======= ******** &&&&&&&&
> #endif
> ])], have_glibc=yes, have_glibc=no)

Thanks.  I see the same on current master using the configure.ac from
Emacs.

It incorrectly uses `font-lock-comment-face' for the entire line after
"langinfo.h" below:

AC_CACHE_CHECK([for nl_langinfo and CODESET], [emacs_cv_langinfo_codeset],
  [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <langinfo.h>]],





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

end of thread, other threads:[~2020-11-19 14:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-11 15:34 bug#5706: 23.1; Comments incorrectly detected in autoconf mode rrt
2020-11-19  3:12 ` Stefan Kangas
2020-11-19  7:37   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-19 14:51     ` Stefan Kangas

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