From 29c8384ab74826c7aae9d9fada1ee257099c750c Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 18 Jul 2002 23:59:11 +0000 Subject: [PATCH] (urg, fukking emacs) --- ChangeLog | 9 +++++- Documentation/user/refman.itely | 41 +++++++++++++++++++---- lily/translator-def.cc | 2 +- lilypond-mode.el | 2 +- ly/generate-documentation.ly | 2 +- scm/ascii-script.scm | 1 + scm/backend-documentation-lib.scm | 2 -- scm/documentation-lib.scm | 26 +++++++++++++-- scm/engraver-documentation-lib.scm | 52 +++++++++++++++++++++++++++++- scm/generate-documentation.scm | 42 ++++++++++++------------ scm/grob-description.scm | 3 +- scm/grob-property-description.scm | 2 +- 12 files changed, 146 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6f85760a0..a179ab4132 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-07-19 Han-Wen + + * scm/engraver-documentation-lib.scm + (document-property-operation): add properties to context + documentation. + + * scm/documentation-lib.scm (pad-string-to): align info menus. + 2002-07-18 Jan Nieuwenhuizen * debian/GNUmakefile: Remove lilypond.links. @@ -55,7 +63,6 @@ * stepmake/stepmake/c-vars.make (ALL_CFLAGS): Include CFLAGS. - 2002-07-17 Han-Wen * GNUmakefile.in: distribute lexer-gcc-3.1.sh as well diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 68d6a808f8..91d0b0e3ea 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -1655,6 +1655,34 @@ put them up: Other symbols can be added using the syntax @var{note}@code{-\}@var{name}. Again, they can be forced up or down using @code{^} and @code{_}. + +@cindex accent +@cindex marcato +@cindex staccatissimo +@cindex fermata +@cindex stopped +@cindex staccato +@cindex tenuto +@cindex upbow +@cindex downbow +@cindex foot marks +@cindex organ pedal marks +@cindex turn +@cindex open +@cindex flageolet +@cindex reverseturn +@cindex trill +@cindex prall +@cindex mordent +@cindex prallprall +@cindex prallmordent +@cindex prall, up +@cindex prall, down +@cindex mordent +@cindex thumb marking +@cindex segno +@cindex coda + @lilypond[] \score { < @@ -1798,13 +1826,14 @@ staffs, using this grace timing. @end lilypond -The syntax is as follows. -@example - \grace @var{musicexpr} -@end example - Unbeamed eighth notes and shorter by default have a slash through the -stem. +stem. This can be controlled with grob property @code{flag-style} of +@internalsref{Stem}. The change in formatting is accomplished by +inserting @code{\startGraceMusic} before handling the grace notes, and +@code{\stopGraceMusic} after finishing the grace notes. You can add to +these definitions to globally change grace note formatting. The +standard definitions are in @file{ly/grace-init.ly}. + @lilypond[fragment,verbatim] \relative c'' \context Voice { diff --git a/lily/translator-def.cc b/lily/translator-def.cc index 79c4087bdb..e4b8a239cd 100644 --- a/lily/translator-def.cc +++ b/lily/translator-def.cc @@ -304,7 +304,7 @@ Translator_def::default_child_context_name () } SCM -Translator_def::to_alist ()const +Translator_def::to_alist () const { SCM l = SCM_EOL; diff --git a/lilypond-mode.el b/lilypond-mode.el index 5f194c5946..fdcc28df9f 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -16,7 +16,7 @@ ;;; Add this to your ~/.emacs or ~/.emacs.el ;;; (load-library "lilypond-mode.el") ;;; (setq auto-mode-alist -;;; (append '(("\\.ly$" . LilyPond-mode) auto-mode-alist))) +;;; (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist)) ;;; (load-library "lilypond-font-lock") diff --git a/ly/generate-documentation.ly b/ly/generate-documentation.ly index 0b1c94f534..504183d87a 100644 --- a/ly/generate-documentation.ly +++ b/ly/generate-documentation.ly @@ -3,4 +3,4 @@ % % Running LilyPond on this file generates the documentation % -#(eval-string (ly-gulp-file "generate-documentation.scm")) +#(load-from-path "generate-documentation.scm") diff --git a/scm/ascii-script.scm b/scm/ascii-script.scm index 760b6096be..53c3aeedd1 100644 --- a/scm/ascii-script.scm +++ b/scm/ascii-script.scm @@ -9,6 +9,7 @@ (debug-enable 'backtrace) + (define (tex-encoded-fontswitch name-mag) (let* ((iname-mag (car name-mag)) (ename-mag (cdr name-mag))) diff --git a/scm/backend-documentation-lib.scm b/scm/backend-documentation-lib.scm index 3ed112e9d6..1fa2f47d56 100644 --- a/scm/backend-documentation-lib.scm +++ b/scm/backend-documentation-lib.scm @@ -127,8 +127,6 @@ (if (not (defined? 'standalone)) (begin -; (debug-enable 'backtrace) - (load "standalone.scm") (define (number-pair? x) diff --git a/scm/documentation-lib.scm b/scm/documentation-lib.scm index 3a27cbbc77..0ea2a97946 100644 --- a/scm/documentation-lib.scm +++ b/scm/documentation-lib.scm @@ -82,10 +82,25 @@ Add a ref if REF is set "\n@end table\n")) (define (texi-menu items-alist) + (let + ( + (maxwid (apply max (map (lambda (x) (string-length (car x))) + items-alist))) + ) + + + (string-append "\n@menu" (apply string-append - (map (lambda (x) (string-append "\n* " (car x) ":: " (cdr x))) + (map (lambda (x) + (string-append + (pad-string-to + (string-append "\n* " (car x) ":: ") + (+ maxwid 8) + ) + (cdr x)) + ) items-alist)) "\n@end menu\n" ;; Menus don't appear in html, so we make a list ourselves @@ -94,7 +109,7 @@ Add a ref if REF is set (description-list->texi (map (lambda (x) (cons (ref-ify (car x)) (cdr x))) items-alist)) "\n@end ifhtml\n" - "\n@end ignore\n")) + "\n@end ignore\n"))) (define (texi-node-menu name items-alist) @@ -103,7 +118,14 @@ Add a ref if REF is set (texi-section 1 name #f) (texi-menu items-alist))) + +(define (pad-string-to str wid) + (string-append str (make-string (max (- wid (string-length str)) 0) #\ )) + ) + (define (texi-file-head name file-name top items-alist) + + (string-append "\\input texinfo @c -*-texinfo-*-" "\n@setfilename " file-name ".info" diff --git a/scm/engraver-documentation-lib.scm b/scm/engraver-documentation-lib.scm index 8e554f4efb..9484bf11d7 100644 --- a/scm/engraver-documentation-lib.scm +++ b/scm/engraver-documentation-lib.scm @@ -104,6 +104,46 @@ ) )) +(define (document-property-operation op) + (let + ((tag (car op)) + (body (cdr op)) + (sym (cadr op)) + ) + + (cond + ((equal? tag 'push) + (string-append + "@item " + (if (null? (cddr body)) + "Revert " + "Set " + ) + "grob-property " + (symbol->string (cadr body)) + " in " (symbol->string sym) + (if (not (null? (cddr body))) + (string-append " to " (scm->texi (cadr (cdr body)))) + ) + "\n" + ) + + ) + ((equal? (object-property sym 'is-grob?) #t) "") + ((equal? (car op) 'assign) + (string-append + "@item Set translator property " + (symbol->string (car body)) + " to " + (scm->texi (cadr body)) + "\n" + ) + ) + ) + )) + + + (define (context-doc-string context-desc) (let* ( @@ -117,6 +157,7 @@ (cdr (assoc 'consists context-desc)) (cdr (assoc 'end-consists context-desc)) )) + (props (cdr (assoc 'property-ops context-desc))) (grobs (context-grobs context-desc)) (grob-refs (map (lambda (x) (ref-ify x)) grobs)) ) @@ -126,9 +167,18 @@ "\n\nThis context creates the following grobs: \n\n" (human-listify (uniq-list (sort grob-refs string attachment to determine the attachment (see above). If procedure returns #t, attachment is used. Otherwise, the next procedure is tried.") -(grob-property-description 'flag-style string? "turn stroke through stem on/off.") +(grob-property-description 'flag-style string? "set to \"grace\" to turn stroke through stem on.") (grob-property-description 'flag-width-function procedure? "Procedure that computes the width of a half-beam (a non-connecting beam.).") (grob-property-description 'flexa-width number? "width of a flexa shape in a ligature grob.") (grob-property-description 'font-family symbol? "partial font -- 2.39.2