Skip to content

Commit

Permalink
Make chordii buffers latin-1 by default.
Browse files Browse the repository at this point in the history
Update documentation.
  • Loading branch information
hading committed Mar 17, 2014
1 parent 8cf2c13 commit 95d75ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ extension for such files):
(setq auto-mode-alist (cons '("\\.pro$" . chordpro-mode) auto-mode-alist))
(autoload 'chordpro-mode "chordpro-mode")

Now when you visit a .pro file you should automatically get chordpro-mode.
Now when you visit a .pro file you should automatically get
chordpro-mode. The file will automatically be saved in latin-1
encoding (you can change this by setting the chordpro-file-encoding
variable in your .emacs, but you probably shouldn't as Chordii
currently expects latin-1 encoded files).

Some of the functions use dropdown-list.el, which can be installed
with package-list-packages in modern emacs. If you don't have this
Expand All @@ -39,7 +43,7 @@ installed they'll just do nothing.

### Keyboard ###

All of the keyboard commands use the Ctrl-c prefix.
Most of the keyboard commands use the Ctrl-c prefix.

* Ctrl-c i : Insert a chord at the point. You'll be prompted for the
chord name in the minibuffer. The brackets will automatically be
Expand Down
3 changes: 3 additions & 0 deletions chordpro-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
("\\({subtitle[^}]*}\\)" . font-lock-type-face)
("\\({title[^}]*}\\)" . font-lock-keyword-face)
("\\({[^}]*}\\)" . font-lock-variable-name-face))))

(defvar chordpro-file-encoding 'latin-1)

(define-derived-mode chordpro-mode text-mode "Chordpro"
"Major mode for editing Chordpro files.
Special commands:
\\{chordpro-mode-map}"
(setq font-lock-defaults chordpro-font-lock-defaults)
(setq buffer-file-coding-system chordpro-file-encoding)
(auto-fill-mode -1))

(define-key chordpro-mode-map "\C-ci" 'chordpro-insert-chord)
Expand Down

0 comments on commit 95d75ca

Please sign in to comment.