Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python-mode] Properly highlight lambda with no arguments #45302

Closed
rubyjoker mannequin opened this issue Aug 12, 2007 · 4 comments
Closed

[python-mode] Properly highlight lambda with no arguments #45302

rubyjoker mannequin opened this issue Aug 12, 2007 · 4 comments
Assignees
Labels
type-feature A feature request or enhancement

Comments

@rubyjoker
Copy link
Mannequin

rubyjoker mannequin commented Aug 12, 2007

BPO 1772721
Nosy @warsaw, @birkenfeld, @amauryfa, @devdanzin
Files
  • lambda-with-no-arguments-highlighting.patch
  • lambda-with-no-arguments-highlighting-2.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/warsaw'
    closed_at = <Date 2010-10-21.13:02:28.726>
    created_at = <Date 2007-08-12.19:05:44.000>
    labels = ['type-feature']
    title = '[python-mode] Properly highlight lambda with no arguments'
    updated_at = <Date 2010-10-21.13:02:28.724>
    user = 'https://bugs.python.org/rubyjoker'

    bugs.python.org fields:

    activity = <Date 2010-10-21.13:02:28.724>
    actor = 'georg.brandl'
    assignee = 'barry'
    closed = True
    closed_date = <Date 2010-10-21.13:02:28.726>
    closer = 'georg.brandl'
    components = ['Demos and Tools']
    creation = <Date 2007-08-12.19:05:44.000>
    creator = 'rubyjoker'
    dependencies = []
    files = ['8164', '13643']
    hgrepos = []
    issue_num = 1772721
    keywords = ['patch']
    message_count = 4.0
    messages = ['53020', '85684', '85694', '119287']
    nosy_count = 5.0
    nosy_names = ['barry', 'georg.brandl', 'amaury.forgeotdarc', 'rubyjoker', 'ajaksu2']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'test needed'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1772721'
    versions = ['Python 2.7']

    @rubyjoker
    Copy link
    Mannequin Author

    rubyjoker mannequin commented Aug 12, 2007

    Currently source highlighter in python-mode doesn't catch lambda forms without arguments, i.e. in:

    function = lambda: 42

    word "lambda" is not highlighted.

    Attached patch fixes this issue by adding new rule to python-font-lock-keywords list. Patch against current trunk (r56963 now).

    @devdanzin
    Copy link
    Mannequin

    devdanzin mannequin commented Apr 7, 2009

    Many changes have landed in Misc/python-mode.el since rev 56963, can
    anyone confirm the described behavior?

    @devdanzin devdanzin mannequin added type-feature A feature request or enhancement labels Apr 7, 2009
    @amauryfa
    Copy link
    Member

    amauryfa commented Apr 7, 2009

    Yes, the behavior is the same with latest trunk.
    I'd suggest this new patch though, it has the same effect but avoids a
    new rule.

    @birkenfeld
    Copy link
    Member

    python-mode.el is not maintained in Python anymore.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants