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

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

[nongnu] elpa/d-mode 685f825 013/346: Parent mode is conditional for com


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

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

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

diff --git a/d-mode.el b/d-mode.el
index e2d17f2..0ddde42 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -367,8 +367,12 @@ 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"
+(define-derived-mode d-mode d-parent-mode "D"
   "Major mode for editing code written in the D Programming Language.
 See http://www.digitalmars.com/d for more information about the D language.
 The hook `c-mode-common-hook' is run with no args at mode



reply via email to

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