emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode 6a57253 427/486: rust-dbg-wrap-or-unwrap: bind t


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 6a57253 427/486: rust-dbg-wrap-or-unwrap: bind to C-c C-d rather than C-c d.
Date: Sat, 7 Aug 2021 09:26:07 -0400 (EDT)

branch: elpa/rust-mode
commit 6a5725328a155e12fee567de03a4625e3eddac26
Author: Nathan Moreau <nathan.moreau@m4x.org>
Commit: Nathan Moreau <nathan.moreau@m4x.org>

    rust-dbg-wrap-or-unwrap: bind to C-c C-d rather than C-c d.
    
    see `Key Binding Conventions' in the Emacs manual.
---
 rust-mode-tests.el | 21 +++++++++++++++++++++
 rust-mode.el       |  2 +-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 343b6c1..b234771 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -3283,3 +3283,24 @@ impl Two<'a> {
              (equal "tmp<T>" (buffer-substring-no-properties (point-min)
                                                              (point-max)))))
         (electric-pair-mode (or old-electric-pair-mode 1))))))
+
+(ert-deftest rust-mode-map ()
+  (with-temp-buffer
+    (let (from to match (match-count 0))
+      (rust-mode)
+      (describe-buffer-bindings (current-buffer))
+      (goto-char (point-min))
+      (re-search-forward "Major Mode Bindings")
+      (setq from (point))
+      (re-search-forward "")
+      (setq to (point))
+      (goto-char from)
+      (while (re-search-forward "^C-c.*$" to t)
+        (setq match-count (1+ match-count))
+        (setq match (match-string 0))
+        (eval
+         `(should
+           (or
+            (string-match "Prefix Command" ,match)
+            (string-match "^C-c C" ,match)))))
+      (should (< 0 match-count)))))
diff --git a/rust-mode.el b/rust-mode.el
index b381893..b839558 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1583,7 +1583,7 @@ Return the created process."
 (defvar rust-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map (kbd "C-c C-f") 'rust-format-buffer)
-    (define-key map (kbd "C-c d") 'rust-dbg-wrap-or-unwrap)
+    (define-key map (kbd "C-c C-d") 'rust-dbg-wrap-or-unwrap)
     map)
   "Keymap for Rust major mode.")
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]