Browse Source

indentation

remotes/bexa/master
Romain Goffe 13 years ago
parent
commit
506ac723e9
  1. 8
      songs/Le_Donjon_de_Naheulbeuk/A_l_aventure_compagnons.sg
  2. 2
      songs/M/La_seine.sg
  3. 12
      songs/Renaud/Mistral_Gagnant.sg
  4. 18
      songs/The_Rolling_Stones/Angie.sg
  5. 9
      utils/emacs-format-file.el

8
songs/Le_Donjon_de_Naheulbeuk/A_l_aventure_compagnons.sg

@ -79,8 +79,8 @@
\endsong
\beginscripture{Encyclopédie Naheulbeuk}
Voici le texte de la deuxième chanson Naheulbeuk. POC fit les paroles %
et l'arrangement, la mélodie principale provient d'un collectage de %
musique ancienne réalisé par le groupe Clannad et qui a servi pour la %
chanson {\og}Lish young buy-a-broo{\fg}.%
Voici le texte de la deuxième chanson Naheulbeuk. POC fit les paroles %
et l'arrangement, la mélodie principale provient d'un collectage de %
musique ancienne réalisé par le groupe Clannad et qui a servi pour la %
chanson {\og}Lish young buy-a-broo{\fg}.%
\endscripture

2
songs/M/La_seine.sg

@ -13,7 +13,7 @@
\lilypond{La_seine_rythm}
\beginverse*
{\nolyrics \Intro : \lilypond{La_seine_riff1} | \[Am] | \[F] | \[C] \[E] | \[Am] |}
\musicnote{\nolyrics \Intro : \lilypond{La_seine_riff1} | \[Am] | \[F] | \[C] \[E] | \[Am] |}
\endverse
\beginverse

12
songs/Renaud/Mistral_Gagnant.sg

@ -11,9 +11,9 @@
\gtab{G}{320003}
\gtab{F#}{2:022100}
\beginverse*
\musicnote{ intro : \nolyrics { \[Bm] \[Em] \[F\#] \[Bm] \[Bm] \[A] \[G] }}
\endverse
\beginverse*
\musicnote{ intro : \nolyrics { \[Bm] \[Em] \[F\#] \[Bm] \[Bm] \[A] \[G] }}
\endverse
\beginverse
Ah\dots m'as\[Bm]seoir sur un banc
@ -72,9 +72,9 @@
Et les mistrals gagnants
\endverse
\beginverse*
\musicnote{\nolyrics { \[Bm] \[Em] \[F\#] \[Bm] \[Bm] \[A] \[G] }}
\endverse
\beginverse*
\musicnote{\nolyrics { \[Bm] \[Em] \[F\#] \[Bm] \[Bm] \[A] \[G] }}
\endverse
\beginverse
Ah\dots m'asseoir sur un banc

18
songs/The_Rolling_Stones/Angie.sg

@ -18,9 +18,9 @@
\gtab{Em7}{010000}
\gtab{Dm}{XX0231}
\beginverse*
\musicnote{ intro:\nolyrics{ | \[Am] | \[E7*] | \[G4] | \[F4] \[F] | \[C4] \[C] |\[G4/B] \[Am] | }}
\endverse
\beginverse*
\musicnote{ intro:\nolyrics{ | \[Am] | \[E7*] | \[G4] | \[F4] \[F] | \[C4] \[C] |\[G4/B] \[Am] | }}
\endverse
\beginverse
\[Am]Angie, \[E7]Angie
@ -46,9 +46,9 @@
Where will it lead us from here?
\endverse
\beginverse*
\musicnote{\nolyrics{| \[Am] | \[E7] | \[G] | \[F] | \[Em7] | \[Am] | }}
\endverse
\beginverse*
\musicnote{\nolyrics{| \[Am] | \[E7] | \[G] | \[F] | \[Em7] | \[Am] | }}
\endverse
\beginverse
Oh Angie don't you weep
@ -58,9 +58,9 @@
Ain't it time we said goodbye?
\endverse
\beginverse*
\musicnote{\nolyrics{| \[Am] | \[E7] | \[G] | \[F] | \[Em7] | \[Am] | }}
\endverse
\beginverse*
\musicnote{\nolyrics{| \[Am] | \[E7] | \[G] | \[F] | \[Em7] | \[Am] | }}
\endverse
\beginverse
With no loving in our souls

9
utils/emacs-format-file.el

@ -11,7 +11,7 @@
(if (bobp)
(indent-line-to 0) ; First line is always non-indented
(let ((not-indented t) cur-indent)
(if (looking-at "^[ \t]*\\(\\\\end\\(song\\|verse\\|chorus\\)\\)") ; If the line we are looking at is the end of a block, then decrease the indentation
(if (looking-at "^[ \t]*\\(\\\\end\\)") ; If the line we are looking at is the end of a block, then decrease the indentation
(progn
(save-excursion
(forward-line -1)
@ -21,11 +21,11 @@
(save-excursion
(while not-indented ; Iterate backwards until we find an indentation hint
(forward-line -1)
(if (looking-at "^[ \t]*\\(\\\\end\\(song\\|verse\\|chorus\\)\\)") ; This hint indicates that we need to indent at the level of the END_ token
(if (looking-at "^[ \t]*\\(\\\\end\\)") ; This hint indicates that we need to indent at the level of the END_ token
(progn
(setq cur-indent (current-indentation))
(setq not-indented nil))
(if (looking-at "^[ \t]*\\(\\\\begin\\(song\\|verse\\|chorus\\)\\)") ; This hint indicates that we need to indent an extra level
(if (looking-at "^[ \t]*\\(\\\\begin\\)") ; This hint indicates that we need to indent an extra level
(progn
(setq cur-indent (+ (current-indentation) 2)) ; Do the actual indenting
(setq not-indented nil))
@ -33,8 +33,7 @@
(setq not-indented nil)))))))
(if cur-indent
(indent-line-to cur-indent)
(indent-line-to 0)))) ; If we didn't see an indentation hint, then allow no indentation
)
(indent-line-to 0))))) ; If we didn't see an indentation hint, then allow no indentation
(defun emacs-format-function ()
"Format the whole buffer."

Loading…
Cancel
Save