[ python-Bugs-860101 ] python-mode.el colorizing is broken in
emacs21
SourceForge.net
noreply at sourceforge.net
Wed Dec 17 11:21:38 EST 2003
Bugs item #860101, was opened at 2003-12-14 18:41
Message generated for change (Comment added) made by montanaro
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=860101&group_id=5470
Category: Demos and Tools
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeff Bowden (offense)
Assigned to: Nobody/Anonymous (nobody)
Summary: python-mode.el colorizing is broken in emacs21
Initial Comment:
Something in the syntax detection is screwed up big
time. The problem is that keywords are being
highlighted in the middle of identifiers. For example
in the line:
os.rmdir(path)
"dir" receives the keyword color and everything else is
left default.
python version: 2.3.2
emacs version: 21.3
OS: Debian/Unstable
----------------------------------------------------------------------
>Comment By: Skip Montanaro (montanaro)
Date: 2003-12-17 10:21
Message:
Logged In: YES
user_id=44345
Works for me (see attached).
----------------------------------------------------------------------
Comment By: Jeff Bowden (offense)
Date: 2003-12-17 00:49
Message:
Logged In: YES
user_id=321043
That change does fix the problem however I think it goes too
far because now variables which might mask builtins are not
highlighted. Oh well, at least it's not as distraction as
before.
Here's a weird thing. The version of python-mode.el in the
debian python-elisp package is 4.40 whereas the one in the
python2.3 source package is 4.35. Both the binary
python-elisp and the python2.3 source claim to be version
2.3.2.91.
----------------------------------------------------------------------
Comment By: Skip Montanaro (montanaro)
Date: 2003-12-15 12:07
Message:
Logged In: YES
user_id=44345
Please try changing the lines which use kw3 to define a font-lock
pattern to
;; builtins when they don't appear as object attributes
(cons (concat "\(\b\|[.]\)\(" kw3 "\)\b[ \n\t(]") 2)
and let me know if that works for you. (The goal is to highlight
variables which might shadow builtins.)
----------------------------------------------------------------------
Comment By: Skip Montanaro (montanaro)
Date: 2003-12-15 11:40
Message:
Logged In: YES
user_id=44345
Known problem. I inserted the incorrect change to the python-
mode source. I wasn't aware it had been incorporated into the
version of python-mode.el distributed with Python.
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2003-12-15 04:29
Message:
Logged In: YES
user_id=6656
a) this should probably be submitted to the python-mode project.
b) at first blush, this looks more likely to be a local
config problem... 'dir' isn't a python keyword, for one thing.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=860101&group_id=5470
More information about the Python-bugs-list
mailing list