Re: Emacs smalltalk mode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Emacs smalltalk mode

Paolo Bonzini
Paul wrote:

> Hi Paolo!
>
> The enclosed diff file adds a Smalltalk menu to Emacs when editing a smalltalk
> file (.st). It is useful mainly as a reminder for the key mappings. I
> probably won't use Emacs as much when I get used to the Browser, but until
> then, I find it useful and other people may be interested.
>
> Keep up the good work! GNU st is really a great product.
>
>  
I guess you want it in gst-mode.el instead?  Also, please send the diff
as "diff -u OLDFILE NEWFILE".

But it looks nice!  Thanks very much.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Emacs smalltalk mode

Paul Maurice
Paolo Bonzini wrote
> I guess you want it in gst-mode.el instead?

No, although the menu and key maps call functions defined in gst-mode, they go in smalltalk-mode. The smaltalk-mode applies to the buffer containing the smalltalk code being edited. From that buffer you can start and stop gst, select code and send it to gst to be executed, compile methods, file-in other files... It is similar to the Worksheet created from the browser.

The gst-mode applies to the buffer connected to the gst process, It works as a terminal running gst without the graphical interface.

> Also, please send the diff as "diff -u OLDFILE NEWFILE".

Here it is:
--- /usr/local/share/emacs/site-lisp/smalltalk-mode.el  2006-02-11 14:42:09.000000000 -0500
+++ ./smalltalk-mode.el 2006-02-12 20:28:24.000000000 -0500
@@ -23,6 +23,7 @@

 ;;; Incorporates Frank Caggiano's changes for Emacs 19.
 ;;; Updates and changes for Emacs 20 and 21 by David Forster
+;;; Smalltalk mode menu added: Paul Maurice, Feb 12, 2006

 ;; ===[ Variables and constants ]=====================================

@@ -177,6 +178,7 @@
   (setq mode-name "Smalltalk")

   (use-local-map smalltalk-mode-map)
+  (smalltalk-add-menu)
   (set-syntax-table smalltalk-mode-syntax-table)
   (setq local-abbrev-table smalltalk-mode-abbrev-table)

@@ -835,3 +837,33 @@

 (provide 'smalltalk-mode)
 (autoload 'gst "/usr/local/share/emacs/site-lisp/gst-mode.elc" "" t)
+
+;;
+;;
+;; Smalltalk Mode Menu
+;;
+;;
+
+(require 'easymenu)
+
+(defun smalltalk-add-menu ()
+  "Add the \"Smalltalk\" menu to the menu bar."
+
+  (easy-menu-define
+   smalltalk-mode-menu
+   smalltalk-mode-map
+   "Menu for smalltalk-mode."
+   (append (list "Smalltalk")
+              (list
+               ["Start gst"             gst                   t]
+               ["----------"            nil                 nil]
+               ["Do-it"                 smalltalk-eval-region t]
+;              ["Eval-expression"       smalltalk-doit        t]
+               ["Print-it"              smalltalk-print       t]
+               ["----------"            nil                 nil]
+               ["Compile method"        smalltalk-compile     t]
+               ["File-in"               smalltalk-filein      t]
+               ["Snapshot image"        smalltalk-snapshot    t]
+               ["----------"            nil                 nil]
+               ["Quit gst"              smalltalk-quit        t])))
+  (easy-menu-add smalltalk-mode-menu))

Paul Maurice


_______________________________________________
help-smalltalk mailing list
help-smalltalk@gnu.org
http://lists.gnu.org/mailman/listinfo/help-smalltalk