unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Bug in looking-at?
Date: Sun, 14 Aug 2005 23:12:49 +0200	[thread overview]
Message-ID: <42FFB3D1.6050104@student.lu.se> (raw)
In-Reply-To: <42FE50AC.9030707@student.lu.se>

Lennart Borgman wrote:

> Lennart Borgman wrote:
>
>> Second time today I think I have found a bug... What should I say... 
>> Hope this one is ok ;-)
>>
>> (defun bug-looking-at()
>>  "Instructions for showing the possible bug:
>> 1. Place the point before \(interactive\) and run this function.
>>   The first looking-at succeeds, the second fails.
>> 2. Then copy the last (looking-at ...), place point as before and run 
>> with M-S-:.
>>   It should fail to match again.
>> 3. Now recall this in M-S-: and add character s last in the regexp.
>>   This time it should match. Try removing the s again..."
>>  (interactive)
>>  (unless (looking-at "(interactive)")
>>    (error "Please put the point at \(interactive\)"))
>>  (message "Second (looking-at ...) => %s" (looking-at 
>> "(interactive)[[:space:]]+(unles")))
>>
>> I am doing this on w32, Emacs from 9 aug, emacs -Q.
>
>
> Some more information. Looking at the char syntax:
>
> (message "%s,%s,%s"
>        (string (char-syntax ?\t))
>        (string (char-syntax ?\r))
>        (string (char-syntax ?\n)))
>
> gives " ,_,>" -- this is whitespace character, symbol constituent and 
> comment ender.
>
> Could part of the problem here be that the syntax table is broken on 
> w32 since ?\r is symbol constituent? But this can not be the whole 
> story, since it behaves differently when run through -S-:

Richard has replied that he does not see this problem on his system 
(GNU/Linux I suppose). I have the following to add:

- Setting the syntax for \r to either " " or ">" does not make 
looking-at return t.
- If however [[:space:]] is replaced with [ \t\r\n] then looking-at 
returns t.

To me there seems to be a couple of strange things going on. I have no 
idea even where to start looking. Can someone else please test on at 
least w32?

  reply	other threads:[~2005-08-14 21:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-13 16:35 Bug in looking-at? Lennart Borgman
2005-08-13 19:57 ` Lennart Borgman
2005-08-14 21:12   ` Lennart Borgman [this message]
2005-08-14 21:50     ` Jason Rumney
2005-08-14 21:58     ` Jason Rumney
2005-08-14 22:39       ` Lennart Borgman
2005-08-15 23:42         ` Lennart Borgman
2005-08-14 17:21 ` Richard M. Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42FFB3D1.6050104@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).