We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
rust-mode
prog-mode
1 parent 73e9a12 commit 1e37e0aCopy full SHA for 1e37e0a
src/etc/emacs/rust-mode.el
@@ -306,8 +306,12 @@
306
((eq (rust-context-align cx) t) (+ (rust-context-column cx) (if closing -1 0)))
307
(t (+ base (if closing 0 unit)))))))
308
309
+;; For compatibility with Emacs < 24, derive conditionally
310
+(defalias 'rust-parent-mode
311
+ (if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
312
+
313
;;;###autoload
-(define-derived-mode rust-mode fundamental-mode "Rust"
314
+(define-derived-mode rust-mode rust-parent-mode "Rust"
315
"Major mode for editing Rust source files."
316
(set-syntax-table rust-syntax-table)
317
(setq major-mode 'rust-mode mode-name "Rust")
0 commit comments