This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: font lock keyword regular expressions
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: rhettinger, robert-brown, skip.montanaro
Priority: normal Keywords:

Created on 2004-12-09 21:43 by robert-brown, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg23623 - (view) Author: Robert Brown (robert-brown) Date: 2004-12-09 21:43
I've noticed that when I use Python mode (alpha 1) with
font lock mode, "self" is highlighted in the following
line:

    his_self()

The problem appears to be a combination of using "\b" in
the Python font lock regular expressions and my .emacs
file,
which does:

  (modify-syntax-entry ?\_ "_" py-mode-syntax-table)

I do not experience similar problems with highlighting in
C mode, but there "\<" and "\>" are used in the font lock
regular expressions.  Using these word delimiters instead
of "\b" appears to fix the problem for me in Python mode.

Please wrap keywords with "\<" and "\>" instead of with
"\b" in the font lock regular expression.

Thanks very much.

Bob
msg23624 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2004-12-11 03:36
Logged In: YES 
user_id=80475

Skip, can you field this one?
msg23625 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2005-05-20 02:45
Logged In: YES 
user_id=44345

python-mode.el 4.71. Raymond, sorry for taking so long with this.  Please 
give it a try and let me know how it works.
msg23626 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2005-05-23 01:41
Logged In: YES 
user_id=44345

Passing along to Raymond.  If it works for you, please close.  If not,
pass it back to me.
History
Date User Action Args
2022-04-11 14:56:08adminsetgithub: 41303
2004-12-09 21:43:56robert-browncreate