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

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

[nongnu] elpa/go-mode 68e9626 177/495: fully implement prog-mode for old


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 68e9626 177/495: fully implement prog-mode for older emacsen
Date: Sat, 7 Aug 2021 09:05:08 -0400 (EDT)

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

    fully implement prog-mode for older emacsen
---
 go-mode.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/go-mode.el b/go-mode.el
index efa6dd5..832b2ed 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -76,14 +76,14 @@
 (defun go--old-completion-list-style (list)
   (mapcar (lambda (x) (cons x nil)) list))
 
-;; 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.
+;; GNU Emacs 24 has prog-mode, older GNU Emacs and XEmacs do not, so
+;; copy its definition for those.
 (if (not (fboundp 'prog-mode))
-    (define-derived-mode prog-mode fundamental-mode "" ""))
+    (define-derived-mode prog-mode fundamental-mode "Prog"
+      "Major mode for editing source code."
+      (set (make-local-variable 'require-final-newline) 
mode-require-final-newline)
+      (set (make-local-variable 'parse-sexp-ignore-comments) t)
+      (setq bidi-paragraph-direction 'left-to-right)))
 
 (defun go--regexp-enclose-in-symbol (s)
   ;; XEmacs does not support \_<, GNU Emacs does. In GNU Emacs we make



reply via email to

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