[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode f9e3618 468/486: Divide library into sections
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode f9e3618 468/486: Divide library into sections |
Date: |
Sat, 7 Aug 2021 09:26:16 -0400 (EDT) |
branch: elpa/rust-mode
commit f9e36188814d67d88ba7738a2250811afc2f85a7
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Nathan Moreau <nathan.moreau@m4x.org>
Divide library into sections
---
rust-mode.el | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/rust-mode.el b/rust-mode.el
index ba19a13..2d63dc5 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -137,7 +137,7 @@ to the function arguments. When nil, `->' will be indented
one level."
"Face for interpolating braces in builtin formatting macro strings."
:group 'rust-mode)
-;;; Rust-mode
+;;; Syntax
(defun rust-re-word (inner) (concat "\\<" inner "\\>"))
(defun rust-re-grab (inner) (concat "\\(" inner "\\)"))
@@ -230,6 +230,8 @@ Use idomenu (imenu with `ido-mode') for best mileage.")
table)
"Syntax definitions and helpers.")
+;;; Mode
+
(defvar rust-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "C-c C-f") 'rust-format-buffer)
@@ -934,7 +936,8 @@ buffer."
(save-excursion (= (progn (goto-char pos1) (line-end-position))
(progn (goto-char pos2) (line-end-position)))))
-;; Font-locking definitions and helpers
+;;; Font-locking definitions and helpers
+
(defun rust-next-string-interpolation (limit)
"Search forward from point for next Rust interpolation marker before LIMIT.
Set point to the end of the occurrence found, and return match beginning
@@ -1373,6 +1376,8 @@ whichever comes first."
'syntax-table (string-to-syntax "|"))
(goto-char (match-end 0))))))
+;;; Syntax Propertize
+
(defun rust-syntax-propertize (start end)
"A `syntax-propertize-function' to apply properties from START to END."
;; Cache all macro scopes as an optimization. See issue #208
@@ -1911,6 +1916,8 @@ Return the created process."
(interactive)
(compile (format "%s test" rust-cargo-bin)))
+;;; Hooks
+
(defun rust-before-save-hook ()
(when rust-format-on-save
(condition-case e
@@ -1929,6 +1936,8 @@ Return the created process."
(or (rust--format-error-handler)
(message "rustfmt detected problems, see *rustfmt* for more."))))))
+;;; Compilation
+
(defvar rustc-compilation-location
(let ((file "\\([^\n]+\\)")
(start-line "\\([0-9]+\\)")
@@ -1998,7 +2007,7 @@ the compilation window until the top of the error is
visible."
(add-to-list 'compilation-error-regexp-alist 'cargo)
(add-hook 'next-error-hook 'rustc-scroll-down-after-next-error)))
-;;; Functions to submit (parts of) buffers to the rust playpen, for sharing.
+;;; Secondary Commands
(defun rust-playpen-region (begin end)
"Create a shareable URL for the region from BEGIN to END on the Rust
playpen."
@@ -2065,6 +2074,8 @@ visit the new file."
(compile-command (mapconcat #'shell-quote-argument args " ")))
(compile compile-command)))
+;;; Utilities
+
(defun rust-update-buffer-project ()
(setq-local rust-buffer-project (rust-buffer-project)))
@@ -2078,6 +2089,8 @@ visit the new file."
(let ((output (json-read)))
(cdr (assoc-string "root" output))))))
+;;; Secondary Commands
+
(defun rust-insert-dbg ()
"Insert the dbg! macro."
(cond ((region-active-p)
@@ -2119,6 +2132,8 @@ visit the new file."
(delete-pair))
(t (rust-insert-dbg)))))))
+;;; _
+
(defun rust-mode-reload ()
(interactive)
(unload-feature 'rust-mode)
- [nongnu] elpa/rust-mode 4fd637c 428/486: rust-insert-dbg: handle the case of string literals. (#342), (continued)
- [nongnu] elpa/rust-mode 4fd637c 428/486: rust-insert-dbg: handle the case of string literals. (#342), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 844bb51 429/486: add support for "async fn", ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 63ec74c 434/486: Enforce use of spaces for indentation and cleanup whitespace (#353), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode a36c96a 435/486: integrate rustfmt error messages, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 8665005 436/486: Introduce constant for *rustfmt*., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 08d7141 449/486: README: support for emacs 24 has been dropped., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 1603a25 455/486: Change 'rust-build' to 'rust-compile' in README.md, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6e4835c 456/486: Update README.md, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5dc219f 465/486: rearrange III: Mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode beda16d 466/486: rearrange IV: Misc, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f9e3618 468/486: Divide library into sections,
ELPA Syncer <=
- [nongnu] elpa/rust-mode e9e9e32 472/486: Add release build/run functions, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e006788 474/486: Add .dir-locals.el, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 7fdb9c2 450/486: Use <kbd> to indicate keyboard input in README (#375), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode d211e68 453/486: Fix various byte compilation warnings in rust-mode-tests.el., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode bded667 457/486: Add missing ‘require’ form., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 139a658 482/486: Create rust-rustfmt.el from existing code, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 494d59f 486/486: Make most additional libraries optional, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 9f3d8cf 432/486: rust format buffer now saves position across multiple frames (#348), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6f1abc3 438/486: Expand README to include more information about features (#358), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e04e485 441/486: rustc-compilation-regexps: handle `note` case as compilation-info., ELPA Syncer, 2021/08/07