From 1019af89ceb1183ef647ed497e942287dfefe31a Mon Sep 17 00:00:00 2001 From: Heikki Junes Date: Fri, 1 Aug 2003 18:02:03 +0000 Subject: [PATCH] allow non-alpha characters only in menu keywords. --- ChangeLog | 4 ++++ lilypond-mode.el | 18 +++++++++++------- lilypond.words | 2 ++ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index f6c82621df..d754d98404 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,10 @@ * lilypond.words: give syntax definitions (LilyPond-insert-tag) for \notes, \relative, \score, \simultaneous, \transpose. + * lilypond-mode.el: allow non-alpha characters only in menu keywords. + + * lilypond.words: add useful `\context Staff =' and `\context Voice ='. + 2003-08-01 Mats Bengtsson * Documentation/topdocs/INSTALL.texi (Top): Documentation of the diff --git a/lilypond-mode.el b/lilypond-mode.el index c783787cfa..399055c946 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -101,6 +101,7 @@ Finds file lilypond-words from load-path." (setq currword (car co)) (if (> (length currword) 1) (if (and (string-equal "\\" (substring currword 0 1)) + (not (string-match "[^a-zA-Z]" (substring currword 1))) (string-equal (downcase currword) currword)) (add-to-list 'wordlist currword))) (if (string-equal "-" (car (setq co (cdr co)))) @@ -116,10 +117,12 @@ Finds file lilypond-words from load-path." (co (all-completions "" (LilyPond-add-dictionary-word ())))) (progn (while (> (length co) 0) - (if (> (length (car co)) 1) - (if (and (string-equal "\\" (substring (car co) 0 1)) - (not (string-equal (downcase (car co)) (car co)))) - (add-to-list 'wordlist (car co)))) + (setq currword (car co)) + (if (> (length currword) 1) + (if (and (string-equal "\\" (substring currword 0 1)) + (not (string-match "[^a-zA-Z]" (substring currword 1))) + (not (string-equal (downcase currword) currword))) + (add-to-list 'wordlist currword))) (if (string-equal "-" (car (setq co (cdr co)))) (while (and (> (length co) 0) (not (string-equal "-" (car (setq co (cdr co))))))))) @@ -131,9 +134,10 @@ Finds file lilypond-words from load-path." (co (all-completions "" (LilyPond-add-dictionary-word ())))) (progn (while (> (length co) 0) - (if (> (length (car co)) 0) - (if (not (string-match "[^a-zA-Z]" (car co))) - (add-to-list 'wordlist (car co)))) + (setq currword (car co)) + (if (> (length currword) 0) + (if (not (string-match "[^a-zA-Z]" currword)) + (add-to-list 'wordlist currword))) (if (string-equal "-" (car (setq co (cdr co)))) (while (and (> (length co) 0) (not (string-equal "-" (car (setq co (cdr co))))))))) diff --git a/lilypond.words b/lilypond.words index 29ec256142..a3437a05fb 100644 --- a/lilypond.words +++ b/lilypond.words @@ -66,6 +66,8 @@ Cluster \\consists \\consistsend \\context +\\context\ Staff\ = - % { _ } - +\\context\ Voice\ = - % { _ } - \\contrabasso \\cr \\cresc -- 2.39.2