[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode bf0bd30 144/495: Change the way we use prog-mode
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode bf0bd30 144/495: Change the way we use prog-mode |
Date: |
Sat, 7 Aug 2021 09:05:01 -0400 (EDT) |
branch: elpa/go-mode
commit bf0bd301dfcab371a88199665033745865fd0208
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>
Change the way we use prog-mode
---
go-mode.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 7318328..e1139d9 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -61,8 +61,14 @@
(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))
+;; GNU Emacs 24 has prog-mode, older GNU Emacs and XEmacs do not.
+;; Ideally we'd use defalias instead, but that breaks in XEmacs.
+;;
+;; TODO: If XEmacs decides to add prog-mode, change this to use
+;; defalias to alias prog-mode or fundamental-mode to go--prog-mode
+;; and use that in define-derived-mode.
+(if (not (fboundp 'prog-mode))
+ (define-derived-mode prog-mode fundamental-mode "" ""))
(defun go--regexp-enclose-in-symbol (s)
;; XEmacs does not support \_<, GNU Emacs does. In GNU Emacs we make
@@ -385,7 +391,7 @@ current line will be returned."
(forward-char))))
;;;###autoload
-(define-derived-mode go-mode go--prog-mode "Go"
+(define-derived-mode go-mode prog-mode "Go"
"Major mode for editing Go source text.
This mode provides (not just) basic editing capabilities for
- [nongnu] elpa/go-mode 92102a5 120/495: do not rely on find-lisp, xemacs doesn't have that, (continued)
- [nongnu] elpa/go-mode 92102a5 120/495: do not rely on find-lisp, xemacs doesn't have that, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode bb66ca4 122/495: xemacs comment handling, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8476d21 123/495: provide alternative to syntax-ppss for older versions of xemacs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 052a356 125/495: remove unused variables, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 60dec2c 126/495: add godef documentation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode dc68bd2 124/495: add a lot of compatibility for xemacs, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode b880a36 139/495: derive go-mode from prog-mode if possible, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7411757 141/495: readme: move godef install instructions up to first mentioning of godef, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 41f8759 135/495: document line-offset in go--apply-rcs-patch, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 895b285 138/495: add customizable variable for mode hook, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode bf0bd30 144/495: Change the way we use prog-mode,
ELPA Syncer <=
- [nongnu] elpa/go-mode 2ec688b 143/495: kill gofmt errbuf if the buffer was already formatted, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 98e66f7 142/495: add docstring to go--apply-rcs-patch, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode fd03739 151/495: push mark to find-tag-marker-ring, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 4c13588 147/495: replace go-goto-opening-parenthesis implementation with backward-up-list, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode dc6bd34 154/495: swallow error in go-goto-opening-parenthesis, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode c2b4441 155/495: Require ring so that we don't rely on a transitive require, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8a1c5df 159/495: minor style changes from CL, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 96eb71e 153/495: fix godef-jump on Windows, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 4e92adb 150/495: add godef-jump-other-window, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 2f67998 160/495: don't change point in go--line-column-to-point, ELPA Syncer, 2021/08/07