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

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

[elpa] externals/smalltalk-mode 4160554 12/34: simplify installation of


From: Stefan Monnier
Subject: [elpa] externals/smalltalk-mode 4160554 12/34: simplify installation of Emacs modes
Date: Tue, 9 Apr 2019 22:30:43 -0400 (EDT)

branch: externals/smalltalk-mode
commit 4160554523f685fb4a188faf6942abde3848acc1
Author: Paolo Bonzini <address@hidden>
Commit: Paolo Bonzini <address@hidden>

    simplify installation of Emacs modes
---
 smalltalk-mode-init.el.in                 | 20 ++++++++++++++++++++
 smalltalk-mode.el.in => smalltalk-mode.el | 18 ------------------
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/smalltalk-mode-init.el.in b/smalltalk-mode-init.el.in
new file mode 100644
index 0000000..4c7c041
--- /dev/null
+++ b/smalltalk-mode-init.el.in
@@ -0,0 +1,20 @@
+;; Autoload file for smalltalk-mode
+
+;; duplicate zip files' setup for star files or fall back on
+;; archive-mode, which scans file contents to determine type so is
+;; safe to use
+(push (cons "\\.star\\'"
+           (catch 'archive-mode
+             (dolist (mode-assoc auto-mode-alist 'archive-mode)
+               (and (string-match (car mode-assoc) "Starfile.zip")
+                    (functionp (cdr mode-assoc))
+                    (throw 'archive-mode (cdr mode-assoc))))))
+      auto-mode-alist)
+
+(push '("\\.st\\'" . smalltalk-mode) auto-mode-alist)
+
+(push "\\.star\\'" inhibit-first-line-modes-regexps)
+
+(autoload 'smalltalk-mode "@lispdir@/smalltalk-mode.elc" "" t)
address@hidden@(autoload 'gst "@lispdir@/gst-mode.elc" "" t)
+
diff --git a/smalltalk-mode.el.in b/smalltalk-mode.el
similarity index 98%
rename from smalltalk-mode.el.in
rename to smalltalk-mode.el
index ac4e9c5..382553f 100644
--- a/smalltalk-mode.el.in
+++ b/smalltalk-mode.el
@@ -1036,22 +1036,4 @@ Whitespace is defined as spaces, tabs, and comments."
             (skip-chars-forward "^[")
             (smalltalk-end-of-defun))))
 
-;; ---[ Emacs configuration ]-----------------------------------------
-
-;; duplicate zip files' setup for star files or fall back on
-;; archive-mode, which scans file contents to determine type so is
-;; safe to use
-(push (cons "\\.star\\'"
-           (catch 'archive-mode
-             (dolist (mode-assoc auto-mode-alist 'archive-mode)
-               (and (string-match (car mode-assoc) "Starfile.zip")
-                    (functionp (cdr mode-assoc))
-                    (throw 'archive-mode (cdr mode-assoc))))))
-      auto-mode-alist)
-
-(push "\\.star\\'" inhibit-first-line-modes-regexps)
-
-(push '("\\.st\\'" . smalltalk-mode) auto-mode-alist)
-
 (provide 'smalltalk-mode)
-(autoload 'gst "@lispdir@/gst-mode.elc" "" t)



reply via email to

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