Decorator face doesn't match @foo.bar

Bug #744335 reported by davidmiller
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Undecided
Andreas Roehler

Bug Description

When I define a function with a decorator like so:

@foo.bar
def baz():
    pass

the .bar part of the decorator is not matched by the regexp for py-decorators-face.

The following patch fixes this:

=== modified file 'python-mode.el'
--- python-mode.el 2011-03-15 21:31:20 +0000
+++ python-mode.el 2011-03-28 14:56:13 +0000
@@ -636,7 +636,7 @@
         )
     (list
      ;; decorators
- '("^[ \t]*\\(@[a-zA-Z_][a-zA-Z_0-9]+\\)\\((.+)\\)?" 1 'py-decorators-face)
+ '("^[ \t]*\\(@[a-zA-Z_][a-zA-Z_0-9.]+\\)\\((.+)\\)?" 1 'py-decorators-face)
      ;; keywords
      (cons (concat "\\<\\(" kw1 "\\)\\>[ \n\t(]") 1)
      ;; builtins when they don't appear as object attributes

Related branches

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
status: New → Confirmed
Changed in python-mode:
status: Confirmed → Fix Committed
Changed in python-mode:
milestone: none → 6.0
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.