Mon, 01 Mar 2004 20:43:55 +0100, Nicolas a dit : 

 >> try #(top-repl)

 > there is a place for an emacs command that would launch that, with I/Os in a
 > buffer with ilisp-mode or so, which would enable symbol completion...


The following command definition should do it (requires ilisp):

(defun LilyPond-guile ()
  (interactive)
  (require 'ilisp)
  (guile "lilyguile" (LilyPond-command-expand (cadr (assoc "2Dvi" 
LilyPond-command-alist))
                                              (funcall 'LilyPond-master-file)))
  (comint-default-send (ilisp-process) "(define-module (*anonymous-ly-1*))")
  (comint-default-send (ilisp-process) "(set! %load-path (cons \"/usr/share/ilisp/\" 
%load-path))")
  (comint-default-send (ilisp-process) "(use-modules (guile-user) (guile-ilisp))")
  (comint-default-send (ilisp-process) "(newline)"))

and, for instance:

(eval-after-load "lilypond-mode"
  '(progn
     (define-key LilyPond-mode-map "\C-cg" 'LilyPond-guile)
     ;; ...
     ))

  ---- Buffer: toto.ly ----
  toto=\markup { hello \bold world }
  #(top-repl)
  -------------------------

`C-c g' starts lilypond into a *lilyguile* buffer

  ---- Bufer: *lilyguile* ----
  Starting lilypond /home/nicolas/toto.ly ...
  lilypond (GNU LilyPond) 2.1.29
  Exécution de usr...
  Maintenant en traitement: « /home/nicolas/toto.ly »
  Analyse...guile> #<directory (*anonymous-ly-1*) 40737e60>
  guile> guile> guile> 
  guile>
  guile> (display-markup toto)
  markup { "hello" \bold "world" }
  guile> 
  ----------------------------

where symbol completion, function signature messages, etc, work
well.

nicolas



_______________________________________________
Lilypond-devel mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to