Skip to content

Commit 6a57253

Browse files
committed
rust-dbg-wrap-or-unwrap: bind to C-c C-d rather than C-c d.
see `Key Binding Conventions' in the Emacs manual.
1 parent a36bc70 commit 6a57253

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

rust-mode-tests.el

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3283,3 +3283,24 @@ impl Two<'a> {
32833283
(equal "tmp<T>" (buffer-substring-no-properties (point-min)
32843284
(point-max)))))
32853285
(electric-pair-mode (or old-electric-pair-mode 1))))))
3286+
3287+
(ert-deftest rust-mode-map ()
3288+
(with-temp-buffer
3289+
(let (from to match (match-count 0))
3290+
(rust-mode)
3291+
(describe-buffer-bindings (current-buffer))
3292+
(goto-char (point-min))
3293+
(re-search-forward "Major Mode Bindings")
3294+
(setq from (point))
3295+
(re-search-forward " ")
3296+
(setq to (point))
3297+
(goto-char from)
3298+
(while (re-search-forward "^C-c.*$" to t)
3299+
(setq match-count (1+ match-count))
3300+
(setq match (match-string 0))
3301+
(eval
3302+
`(should
3303+
(or
3304+
(string-match "Prefix Command" ,match)
3305+
(string-match "^C-c C" ,match)))))
3306+
(should (< 0 match-count)))))

rust-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1583,7 +1583,7 @@ Return the created process."
15831583
(defvar rust-mode-map
15841584
(let ((map (make-sparse-keymap)))
15851585
(define-key map (kbd "C-c C-f") 'rust-format-buffer)
1586-
(define-key map (kbd "C-c d") 'rust-dbg-wrap-or-unwrap)
1586+
(define-key map (kbd "C-c C-d") 'rust-dbg-wrap-or-unwrap)
15871587
map)
15881588
"Keymap for Rust major mode.")
15891589

0 commit comments

Comments
 (0)