summaryrefslogtreecommitdiff
path: root/rust-mode.el
AgeCommit message (Collapse)Author
2024-08-22Bump version to 1.0.6Sibi Prabakaran
2024-03-27Fix dependencies between rust-mode implementationsJonas Bernoulli
"rust-prog-mode.el" and "rust-mode-treesitter.el" provide competing implementations of `rust-mode'. Both implementations depend on code in "rust-mode.el", and thus must require that. Doing that is complicated by the fact that "rust-mode.el" loads one of these libraries, depending on `rust-mode-treesitter-derive's value. Address this conflict by: 1. Requiring feature `rust-mode' in the two libraries that implement the `rust-mode' major-mode and that use things defined in "rust-mode.el". 2. Moving the require forms for these two libraries in "rust-mode.el", below the `provide' form for `rust-mode'.
2024-03-12Add email in package descriptioncondy
Fix #531
2024-03-12Allow autoloaded rust-mode function to be called interactivelyRoi Martin
2024-03-11Fix rust-mode lazy loadingRoi Martin
This PR fixes the following error that happends when opening a .rs file: File mode specification error: (void-function rust-mode) It conditionally autoloads the proper rust-mode version depending on the user environment. Fixes #528
2024-02-25Fix rust-mode and tree sitter integrationSibi Prabakaran
2024-02-17provide alternative rust-mode that derives from rust-ts-modebrotzeit
2023-01-11Use when-let as appropriate.Jim Blandy
2022-11-02Simplify and correct angle bracket propertizing and macro argument detection.Jim Blandy
Fixes #465. When `rust-syntax-propertize` uses `rust-macro-scopes` to find ranges of text that are macro arguments, it ends up inadvertently poisoning the `syntax-ppss` cache by applying it to text that doesn't have the necessary `syntax-table` properties applied yet - the very job that `rust-syntax-propertize` is trying to do. However, `rust-macro-scopes` does much more work than necessary. Rather than producing a list of ranges of macro arguments, we can just use the list of enclosing opening parens provided by syntax-ppss, checking each paren to see if it seems to be a macro or `macro_rules` call. We have to keep syntax-ppss's cache accurate for other reasons anyway, so we might as well just use its data, rather than introducing another cache of our own - especially a problematic one (see #465). * rust-mode.el (rust-in-macro): Consult `syntax-ppss`'s list of enclosing parens, rather than using `rust-macro-scope`. Remove optional arguments, which were only used by tests. (rust-macro-scopes, rust-macro-scope): Delete. Now we just use `syntax-ppss`'s internal cache. (rust-syntax-propertize): Don't bind `rust-macro-scopes`. (rust-looking-back-macro-rules): New function. (rust-looking-back-macro): Support a space between macro name and `!`, by consulting `rust-expression-introducers`. (rust-expression-introducers): New constant. Use in `rust-looking-back-macro` and `rust-is-in-expression-context`. (rust-is-in-expression-context): Use `rust-expression-introducers`. (rust-looking-back-ident): Don't use `looking-back`. We've already moved to the correct spot for `looking-at`, within a `save-excursion`. * rust-mode-tests.el: Update tests.
2022-09-19Use line-beginning-position instead of obsolete point-at-bolJonas Bernoulli
Obsolete since Emacs 29 / b7e867b841f47dcff3aeaef9b5608a237386ce70.
2022-08-29Avoid compilation warnings about potentially-undefined functions.Philipp Stephani
The byte compiler isn’t smart enough to figure out that these functions are indeed defined in this code branch.
2022-08-18apply minor fixesbrotzeit
2022-06-26bump version to 1.0.5brotzeit
2022-02-17bump version to 1.0.4brotzeit
2022-01-30Highlight the (optional) type suffix of numbers with the type faceChristophe Troestler
2022-01-08remove "use" from rust-top-item-beg-rebrotzeit
close #283
2021-12-28Avoid obsolete calling convention of ‘looking-back’.Philipp Stephani
Calling ‘looking-back’ with only one argument causes a compile warning.
2021-12-27Improve regexp to match the reference mark &Christophe Troestler
2021-12-27Do not prettify || after various symbolsChristophe Troestler
2021-12-27Do not prettify && when it is a double referenceChristophe Troestler
2021-12-26Merge pull request #429 from Chris00/prettifybrotzeit
Enable the use of prettify-symbols-mode
2021-12-25Add a face for the ampersand reference markChristophe Troestler
Customizing this face may improve code readability for some users. By default nothing is set for backward compatibility.
2021-12-25Enable the use of prettify-symbols-modeChristophe Troestler
2021-12-18bump version to 1.0.3brotzeit
2021-12-16Fix rust-electric-pair-skip-self-wrapRoy Crihfield
nil is a valid value for electric-pair-skip-self, so handle that case
2021-11-26bump version to 1.0.2brotzeit
2021-11-26allow changing rustfmt hook funtctionsbrotzeit
2021-11-16add more commands to rust-mode-mapbrotzeit
2021-10-29bump version to 1.0.1brotzeit
2021-10-22include keyword existential in rust-keywordsbrotzeit
2021-10-22update regexes used in rust-top-item-beg-rebrotzeit
2021-10-16update readme and bump versionbrotzeit
2021-04-23Make most additional libraries optionalJonas Bernoulli
2021-04-23Create rust-utils.el from existing codeJonas Bernoulli
2021-04-23Create rust-cargo.el from existing codeJonas Bernoulli
2021-04-23Create rust-playpen.el from existing codeJonas Bernoulli
2021-04-23Create rust-rustfmt.el from existing codeJonas Bernoulli
2021-04-23rust-end-of-string: Move definitionJonas Bernoulli
2021-04-23Properly markup two additional section headingsJonas Bernoulli
2021-04-23Add non-empty commentary section, slightly reword summaryJonas Bernoulli
2021-04-23Create rust-compile.el from existing codeJonas Bernoulli
For the time being `require' the new library from "rust-mode.el". In the mid-term we should stop doing that, so that users can load it if and only if they want to do so.
2021-04-23rust-mode: CosmeticsJonas Bernoulli
2021-04-23Add .dir-locals.elJonas Bernoulli
2021-04-23Remove "-face" suffix from names of facesJonas Bernoulli
As mentioned in (info "(emacs)Defining Faces") the name of a face > should not end in "-face" (that would be redundant). For historic reasons a few built-in faces actually do end with "-face" and it so happens that our faces are closely related to just those `font-lock' faces and that probably inspired our use of the suffix. Even so, we should stop now.
2021-02-26Add release build/run functionsAdam Gleave
2020-12-04Add rust-check functionAlyssa Ross
Because check exists and is so much faster, I only ever want to build when I want to test the binary, in which case I'd use run. So I think it's more useful to have a rust-check function available than it is to even have rust-compile.
2020-07-09Set default directory when compiling.Nathan Moreau
2020-07-09Divide library into sectionsJonas Bernoulli
2020-07-09Various cosmetic changesJonas Bernoulli
2020-07-09rearrange IV: MiscJonas Bernoulli