Skip to content

Emacs mode has issues with single quotes #5

Closed
@steveklabnik

Description

@steveklabnik

Issue by haxney
Thursday Oct 31, 2013 at 04:58 GMT

For earlier discussion, see rust-lang/rust#10190

This issue was labelled with: A-tools in the Rust repository


The latest version of rust-mode for Emacs (20130928.1740) has issues with
single-quoted characters, especially when that character is a " (double
quote). The following program executes correctly in Rust 0.8, but is font-locked
improperly in Emacs:

fn main() {
    println!("{}", '"');
}

It treats the double quote as the beginning of a string which runs to the end of
the file. If the double quote character is escaped like so:

fn main() {
    println!("{}", '\"');
}

Then there is not a problem with an unterminated string, but the characters
inside the single quotes are not fontified at all.

Note: Both programs compile and execute successfully under Rust 0.8.

This is related to #8793

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions