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

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

[nongnu] elpa/go-mode b880a36 139/495: derive go-mode from prog-mode if


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode b880a36 139/495: derive go-mode from prog-mode if possible
Date: Sat, 7 Aug 2021 09:05:00 -0400 (EDT)

branch: elpa/go-mode
commit b880a36226f142e613a404183f37706b2ecaaac5
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    derive go-mode from prog-mode if possible
---
 go-mode.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/go-mode.el b/go-mode.el
index 14886e0..e41da7b 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -52,6 +52,8 @@
 (defun go--old-completion-list-style (list)
   (mapcar (lambda (x) (cons x nil)) list))
 
+(defalias 'go--prog-mode
+   (if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
 
 (defun go--regexp-enclose-in-symbol (s)
   ;; XEmacs does not support \_<, GNU Emacs does. In GNU Emacs we make
@@ -374,7 +376,7 @@ current line will be returned."
       (forward-char))))
 
 ;;;###autoload
-(define-derived-mode go-mode fundamental-mode "Go"
+(define-derived-mode go-mode go--prog-mode "Go"
   "Major mode for editing Go source text.
 
 This mode provides (not just) basic editing capabilities for



reply via email to

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