emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ mode and c-beginning-of-current-token


From: martin rudalics
Subject: Re: C++ mode and c-beginning-of-current-token
Date: Thu, 17 May 2007 15:51:32 +0200
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> Can I ask a silly question, too?  There are two "calling"s of
> UPDATE_SYNTAX_TABLE_BACKWARD in `skip_chars', one with the "argument"
> (pos), the other with (pos - 1).  To me, the second one does not look
> like a typo, but a correct piece of code on purpose.  Yes, changing it
>
>> from (pos - 1) to (pos) works, but it seems to be dangerous to me.

I do have my own problems with UPDATE_SYNTAX_TABLE_BACKWARD.  To
reproduce with Emacs -Q define foo as

(defun foo ()
  (interactive)
  (put-text-property (1- (point)) (point) 'syntax-table '(2))
  (setq parse-sexp-lookup-properties t))

open a text-mode buffer, insert a couple of non-word chars in the
buffer, leave point after them, and type M-x foo followed by M-b.  On my
system it goes back by _two_ characters instead of one.  I'm yet too
silly to understand what's going on.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]