How to install and setup Flusspferd's Emacs Mode

Flusspferd comes with an Emacs mode to call the Flusspferd Shell and interactively send javascript code to the Shell similar to emacs-lisp-mode or inferior python mode.

If you have Emacs installed on your System then installing Flusspferd will byte compile the mode and install it into $PREFIX/share/emacs/site-lisp. To use the mode you have to make sure that $PREFIX/share/emacs/site-lisp is in your Emacs load-path. If $PREFIX is for example /usr/local (the default) you can simply put the following into your "~/.emacs" file

 (add-to-list 'load-path "/usr/local/share/emacs")

To use Flusspferd mode you have to put the following line into your "~/.emacs" file

 (autoload 'flusspferd "flusspferd" "Inferior Flusspferd Mode." t)

and restart Emacs. By typing "M-x flusspferd" you can start the Flusspferd Shell now.

There is also a minor mode for sending javascript code to the Flusspferd Shell. You can use it by adding the following line to your "~/.emacs" file

 (autoload 'flusspferd-minor-mode "flusspferd" "Flusspferd Minor Mode" t)

By calling "M-x flusspferd-minor-mode" you can now use e.g. flusspferd-eval-buffer-and-go to evaluate the buffer and switch to the Flusspferd Shell to see the result.

If you want to activate the minor mode everytime you edit a javascript file you can simply add a hook to your javascript-mode. If you use js2-mode you have to add the following line to your "~/.emacs" file

 (add-hook 'js2-mode-hook 'flusspferd-minor-mode)

if you use javascript-mode you have to add

(add-hook 'javascript-mode-hook 'flusspferd-minor-mode)

Contact us at team -AT- flusspferd -DOT- org or as described on our homepage.

Generated on Thu Feb 4 23:05:12 2010 for Flusspferd by doxygen 1.6.1