smalltalk--backstage--2.2--patch-43
Emacs auto-modes for GST files
Does the obvious thing and sets up .st files to get smalltalk-mode by
default; also does a somewhat less obvious thing to get .star files in
archive-mode or some other appropriate thing so you can browse them in
Emacs easily.There's a changelog in the attached patch in case you change your mind about entries for .el changes :) -- ;;; Stephen Compall ** http://scompall.nocandysw.com/blog ** "Peta" is Greek for fifth; a petabyte is 10 to the fifth power, as well as fifth in line after kilo, mega, giga, and tera. -- Lee Gomes, performing every Wednesday in his tech column "Portals" on page B1 of The Wall Street Journal
2007-07-11 Stephen Compall <[EMAIL PROTECTED]>
* smalltalk-mode.el.in: Automatically change to appropriate mode
for .st and .star files.
--- orig/smalltalk-mode.el.in
+++ mod/smalltalk-mode.el.in
@@ -1035,6 +1035,22 @@
(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)
signature.asc
Description: This is a digitally signed message part
_______________________________________________ help-smalltalk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-smalltalk
