[Gd-chatter] r11746 - trunk/gwydion/tools/elisp
andreas at gwydiondylan.org
andreas at gwydiondylan.org
Mon Mar 24 15:20:53 CET 2008
Author: andreas
Date: Mon Mar 24 15:20:52 2008
New Revision: 11746
Modified:
trunk/gwydion/tools/elisp/dylan-mode.el
Log:
job: minor
Derive package for slime from module: line.
Modified: trunk/gwydion/tools/elisp/dylan-mode.el
==============================================================================
--- trunk/gwydion/tools/elisp/dylan-mode.el (original)
+++ trunk/gwydion/tools/elisp/dylan-mode.el Mon Mar 24 15:20:52 2008
@@ -1573,6 +1573,14 @@
(font-lock-default-fontify-region beg end loudly)
(setq font-lock-dont-widen save-font-lock-dont-widen)))))))
+(defun dylan-find-slime-buffer-package ()
+ (let ((case-fold-search t)
+ (regexp "^module: \\([^ \n\r\t]+\\)"))
+ (save-excursion
+ (when (or (re-search-backward regexp nil t)
+ (re-search-forward regexp nil t))
+ (match-string 1)))))
+
(defun dylan-mode-init-variables ()
;; Use value appropriate for font-lock mode now. Reset after running hooks.
@@ -1628,6 +1636,10 @@
nil t nil nil
(font-lock-fontify-region-function
. dylan-font-lock-fontify-region))))
+ (make-local-variable 'slime-buffer-package)
+ (setq slime-buffer-package (dylan-find-slime-buffer-package))
+ (if (fboundp 'slime-mode)
+ (slime-mode))
(if (fboundp 'run-mode-hooks)
(run-mode-hooks 'dylan-mode-hook)
(run-hooks 'dylan-mode-hook)) ; For compatibility with older Emacsen,
More information about the chatter
mailing list