
-----------------------------------
haskell
Mon Feb 05, 2007 5:12 pm

XEmacs - Adding the Emacs modes you love and adore
-----------------------------------
First, here are the links to the modes that will be talked about:
 - SLIME

 SLIME is an acronymn for "Superior Lisp Interaction Mode for Emacs". It is a must for any Common Lisp user who chooses XEmacs or Emacs.

 To install SLIME:
 - Download SLIME(setq inferior-lisp-program "path-to-common-lisp")
(add-to-list 'load-path "path-to-slime-directory")
(require 'slime)
(slime-setup)

As in the example of:
(setq inferior-lisp-program "C:/clisp-2.41/clisp.exe")
(add-to-list 'load-path "C:/Program Files/XEmacs/slime")
(require 'slime)
(slime-setup)
- If all is done right, then close and reopen XEMacs.
- Then do M-x slime OR for you non-Emacs people, press "Alt+X" then type "slime".
- And voila, SLIME is active :).

Python-Mode

This is the very nice Python mode for *macers.

- Download Python-Mode(autoload 'python-mode "path-to-python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
As in the example of:
(autoload 'python-mode "C:/Program Files/XEmacs/python-mode/python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
- If all is done right, close and reopen XEmacs
- Then open a Python fileCc-Mode

 This is the mode for your C-based languages(besides Perl, Perl has its own mode). C/C++/Java/C#/etc...

 Installation instructions are Ruby-Mode

 This is the "hidden-in-the-back" Ruby mode for Emacs, available from the misc folder on ruby-lang.

- Download Ruby-Mode(autoload 'ruby-mode "path-to-ruby-mode" "Ruby Mode." t)
(add-to-list 'auto-mode-alist '("\\.rb\\'" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
As in the example of:
(autoload 'ruby-mode "C:/Program Files/XEmacs/ruby-mode/ruby-mode" "Ruby Mode." t)
(add-to-list 'auto-mode-alist '("\\.rb\\'" . ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby" . ruby-mode))
- If all is done right, close and reopen XEmacs
- Then open a Ruby fileNote: you can use XEMacs Packages to install any mode you may want.

-----------------------------------
Naveg
Mon Feb 05, 2007 7:06 pm

RE:XEmacs - Adding the Emacs modes you love and adore
-----------------------------------
Seems very useful, although personally I've never caught the Emacs craze (or Vim for that matter). Maybe I'll try it out again one of these days.

-----------------------------------
abcdefghijklmnopqrstuvwxy
Tue Feb 06, 2007 1:19 am

RE:XEmacs - Adding the Emacs modes you love and adore
-----------------------------------
Thanks :D  Any chance you know how to set syntax highlighting as the default?  I have to manually set syntax highlighting on each time I open a .cpp :/

-----------------------------------
haskell
Tue Feb 06, 2007 6:26 am

RE:XEmacs - Adding the Emacs modes you love and adore
-----------------------------------
Once you add the lines to the init.el file, it should be automatic.

 Such as:
(autoload 'awk-mode "cc-mode" nil t)

-----------------------------------
abcdefghijklmnopqrstuvwxy
Tue Feb 06, 2007 11:12 am

RE:XEmacs - Adding the Emacs modes you love and adore
-----------------------------------
Okay that worked, thanks! 

I can't get slime working because of this line: 

(setq inferior-lisp-program "/usr/share/a2ps/sheets/clisp.ssh")

I don't have any idea where else common-lisp is though. . .  Any ideas?

EDIT: Oops nevermind, i found it in /usr/bin/

-----------------------------------
haskell
Fri Feb 09, 2007 5:04 pm

RE:XEmacs - Adding the Emacs modes you love and adore
-----------------------------------
;; Superior LISP Interaction Mode(SLIME)
(setq inferior-lisp-program "~/clisp-2.41/clisp.exe")
(add-to-list 'load-path "C:/emacs-21.3/modes/slime")
(require 'slime)
(slime-setup)

;; Cc-Mode
(autoload 'awkmode "cc-mode" nil t)

;; Clean-Mode
(setq load-path (cons "~/emacs-21.3/modes/clean-mode" load-path))
(setq auto-mode-alist
      (append auto-mode-alist
              '(("\\.icl$"  . clean-mode)
                ("\\.dcl$"  . clean-mode))))
(autoload 'clean-mode "clean-mode" t)

;; Haskell-Mode
(load "~/emacs-21.3/modes/haskell-mode-2.1/haskell-site-file")
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)

;; Python-Mode
(setq load-path (cons "~/emacs-21.3/modes/python-mode" load-path))
(setq auto-mode-alist
      (append auto-mode-alist
              '(("\\.py$"  . python-mode)
                ("\\.pyw$"  . python-mode))))
(autoload 'python-mode "python-mode" t)

;; Ruby-Mode
(setq load-path (cons "~/emacs-21.3/modes/ruby-mode" load-path))
(setq auto-mode-alist
      (append auto-mode-alist
              '(("\\.rb$"  . ruby-mode)
                ("\\.rbw$"  . ruby-mode))))
(autoload 'ruby-mode "ruby-mode" t)

;; O'Caml-Mode
(setq auto-mode-alist
          (cons '("\\.ml[iyl]?$" .  caml-mode) auto-mode-alist))

(setq load-path (cons "~/emacs-21.3/modes/ocaml-mode" load-path))

(autoload 'caml-mode "ocaml" (interactive) t)
(autoload 'camldebug "camldebug" (interactive))

;; Emacs IRC Client 
(add-to-list 'load-path "C:/emacs-21.3/modes/erc-5.1.2")
(require 'erc)

 An excerpt from the .emacs file. This is may or may not work in XEMacs, but it works perfectly in Emacs.
