--- /dev/null
+\version "2.15.17"
+
+\pointAndClickTypes #'note-event
+
+\relative c' {
+ c2\f( f)
+}
\ No newline at end of file
extern string output_name_global;
extern bool be_safe_global;
extern bool do_internal_type_checking_global;
-extern bool point_and_click_global;
extern string lilypond_datadir;
extern bool use_object_keys;
extern bool strict_infinity_checking;
/* Run in safe mode? */
bool be_safe_global = false;
-/* Provide URI links to the original file */
-bool point_and_click_global = true;
-
/* Scheme code to execute before parsing, after .scm init.
This is where -e arguments are appended to. */
string init_scheme_code_global;
profile_property_accesses = valbool;
val = val_scm_bool;
}
- else if (varstr == "point-and-click")
- {
- point_and_click_global = valbool;
- val = val_scm_bool;
- }
else if (varstr == "protected-scheme-parsing")
{
parse_protect_global = valbool;
(ly:set-option 'point-and-click #f)
(make-music 'SequentialMusic 'void #t))
+pointAndClickTypes =
+#(define-void-function (parser location types) (list-or-symbol?)
+ (_i "Set a type or list of types (such as @code{#'note-event}) for which point-and-click info is generated.")
+ (ly:set-option 'point-and-click types))
%% predefined fretboards
(if (ly:get-option 'point-and-click)
(let* ((cause (ly:grob-property grob 'cause))
(music-origin (if (ly:stream-event? cause)
- (ly:event-property cause 'origin))))
- (if (ly:input-location? music-origin)
+ (ly:event-property cause 'origin)))
+ (point-and-click (ly:get-option 'point-and-click)))
+ (if (and
+ (ly:input-location? music-origin)
+ (cond ((boolean? point-and-click) point-and-click)
+ ((symbol? point-and-click)
+ (ly:in-event-class? cause point-and-click))
+ (else (any (lambda (t)
+ (ly:in-event-class? cause t))
+ point-and-click))))
(let* ((location (ly:input-file-line-char-column music-origin))
(raw-file (car location))
(file (if (is-absolute? raw-file)