Skip to content

Commit

Permalink
Emacs: Change some key bindings and update README accordingly.
Browse files Browse the repository at this point in the history
Navigation among notes now uses `M-n`/`M-p` to (same as SLIME.)

Loading now uses `C-c C-L` in order to not interfere with standard
Haskell mode.  Once Scion can do all things that Haskell mode can do,
I'll switch it back to `C-c C-l`.
  • Loading branch information
nominolo committed Mar 8, 2009
1 parent 74ea7c4 commit 040869c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
27 changes: 19 additions & 8 deletions README.markdown
Expand Up @@ -98,14 +98,25 @@ the following to your `.emacs`:
Once you have a running and connected Scion server, you can use the
commands provided by scion-mode:

* `M-x scion-open-cabal-project` (`C-c C-o`) configures a .cabal
project and loads the meta-data from a .cabal file. Note that
this doesn't type check or load anything. If you change the
.cabal file of a project, call this function to update the session
with the new settings.

* `M-x scion-load-library` (`C-c C-l`) type checks all the files in
the library.
* `C-c C-o` (`scion-open-cabal-project`) configures a Cabal project
and loads the meta-data from a Cabal file. Note that this
does not type check or load anything. If you change the Cabal
file of a project, call this function to update the session with
the new settings.

* `C-c C-L` (`scion-load`) load the current file with Scion. If
the file is within a Cabal project this will prompt to use the
settings from one of the components in the package description
file. You can still choose to load only the current file using
the default settings.

If loading generates any errors or warnings, a buffer will appear and
list them all. Pressing `RET` on a note will jump to its source
location. Pressing `q` closes the buffer, and `C-c C-n`
(`scion-list-compiler-notes`) brings it back. Use `M-n`
(`scion-next-note-in-buffer`) and `M-p`
(`scion-previous-note-in-buffer`) to navigate within the notes of one
buffer.

There are a few more utilities:

Expand Down
7 changes: 4 additions & 3 deletions emacs/scion.el
Expand Up @@ -2025,9 +2025,10 @@ installed packages (However, not of the current project.)"
(define-key scion-mode-map "\C-cim" 'haskell-insert-module-name)

(define-key scion-mode-map "\C-c\C-o" 'scion-open-cabal-project)
(define-key scion-mode-map "\C-c\C-l" 'scion-load)
(define-key scion-mode-map "\C-c\C-n" 'scion-next-note-in-buffer)
(define-key scion-mode-map "\C-c\C-p" 'scion-previous-note-in-buffer)
(define-key scion-mode-map "\C-c\C-L" 'scion-load)
(define-key scion-mode-map "\M-n" 'scion-next-note-in-buffer)
(define-key scion-mode-map "\M-p" 'scion-previous-note-in-buffer)
(define-key scion-mode-map "\C-c\C-n" 'scion-list-compiler-notes)

(defun haskell-insert-module-header (module-name &optional
author
Expand Down

0 comments on commit 040869c

Please sign in to comment.