Function rust_code_analysis::get_from_emacs_mode[][src]

pub fn get_from_emacs_mode(mode: &str) -> Option<LANG>

Detects the language associated to the input Emacs mode.

An Emacs mode is used to detect a language according to particular text-information contained in a file.

Examples

use rust_code_analysis::get_from_emacs_mode;

let emacs_mode = "rust";

get_from_emacs_mode(emacs_mode).unwrap();