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

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

[nongnu] elpa/d-mode 68ee0fe 012/346: Parent mode is conditional for com


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode 68ee0fe 012/346: Parent mode is conditional for compatibility
Date: Sun, 29 Aug 2021 10:59:56 -0400 (EDT)

branch: elpa/d-mode
commit 68ee0fe1beb44313cbb6abc112490c002fa1d551
Author: Roy Crihfield <rscrihf@gmail.com>
Commit: Roy Crihfield <rscrihf@gmail.com>

    Parent mode is conditional for compatibility
---
 d-mode.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/d-mode.el b/d-mode.el
index e2d17f2..11ae816 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -367,6 +367,10 @@ operators."
 ;;----------------------------------------------------------------------------
 ;;;###autoload (add-to-list 'auto-mode-alist '("\\.d[i]?\\'" . d-mode))
 
+;; For compatibility with Emacs < 24
+(defalias 'd-parent-mode
+  (if (functionp 'prog-mode) 'prog-mode 'fundamental-mode))
+
 ;;;###autoload
 (define-derived-mode d-mode prog-mode "D"
   "Major mode for editing code written in the D Programming Language.



reply via email to

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