[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Emacs-mode
From: |
Heikki Johannes Junes |
Subject: |
[PATCH] Emacs-mode |
Date: |
Tue, 16 Apr 2002 12:25:08 +0300 (EET DST) |
>Well, I hope that the emacs mode will end up being able to fully cope
>with multi line comments and multiline scheme.
>When the mode is invoked (when a file is read or with M-x LilyPond-mode)
>then all multi-line schemes and multi-line comments are correctly
>parsed. But if you edit any of those - or create a new one - then the
>colouring gets wrong.
Yes. This is problem of Emacs. In manual:
"GNU Emacs Lisp Reference Manual (For Emacs version 20.3)" (elisp.ps)
at the end of "Search-based Fontification"-section (22.5.2) they give a
warning about this matter:
"While 'font-lock-fontify-buffer' handles 'multi-line' patterns
correctly, updating the buffer does not, since it considers text
one line at a time."
>As I said before this can be fixed (correctly recoloured) with M-x
>LilyPond-mode - and until the bug is permanently fixed I would suggest
>to add a simple hotkey which does this (a shortcut to M-x LilyPond-mode,
>that is).
>
>-Rune
How about "C-c f"-hotkey? The patch is below.
Index: VERSION
===================================================================
RCS file: /home/lilypond/lilypond/VERSION,v
retrieving revision 1.384
diff -p -u -r1.384 VERSION
--- VERSION 15 Apr 2002 09:11:57 -0000 1.384
+++ VERSION 16 Apr 2002 09:16:55 -0000
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=5
PATCH_LEVEL=52
-MY_PATCH_LEVEL=hjj3
+MY_PATCH_LEVEL=hjj4
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
Index: ChangeLog
===================================================================
RCS file: /home/lilypond/lilypond/ChangeLog,v
retrieving revision 1.83
diff -p -u -r1.83 ChangeLog
--- ChangeLog 15 Apr 2002 09:11:57 -0000 1.83
+++ ChangeLog 16 Apr 2002 09:16:58 -0000
@@ -1,3 +1,7 @@
+2002-04-16 Heikki Junes <address@hidden>
+
+ * lilypond-mode.el: "C-c f" does font-lock-fontify-buffer.
+
2002-04-15 Heikki Junes <address@hidden>
* lilypond-font-lock.el: Handle scheme-slurs up to seventh level.
Index: lilypond-mode.el
===================================================================
RCS file: /home/lilypond/lilypond/lilypond-mode.el,v
retrieving revision 1.33
diff -p -u -r1.33 lilypond-mode.el
--- lilypond-mode.el 13 Apr 2002 11:26:14 -0000 1.33
+++ lilypond-mode.el 16 Apr 2002 09:16:59 -0000
@@ -509,6 +509,7 @@ command."
(define-key LilyPond-mode-map "\C-c\C-v" 'LilyPond-command-view)
(define-key LilyPond-mode-map "\C-c\C-p" 'LilyPond-command-viewps)
(define-key LilyPond-mode-map "\C-c\C-m" 'LilyPond-command-next-midi)
+ (define-key LilyPond-mode-map "\C-cf" 'font-lock-fontify-buffer)
(define-key LilyPond-mode-map "\C-cn" 'LilyPond-insert-tag-notes)
(define-key LilyPond-mode-map "\C-cs" 'LilyPond-insert-tag-score)
(define-key LilyPond-mode-map "\C-c:" 'LilyPond-un-comment-region)
@@ -604,6 +605,7 @@ command."
'(("Miscellaneous"
["Uncomment Region" LilyPond-un-comment-region t]
["Comment Region" comment-region t]
+ ["Refontify buffer" comment-region t]
))
))
--
Heikki Junes
- [PATCH] Emacs-mode,
Heikki Johannes Junes <=
- Re: [PATCH] Emacs-mode, Rune Zedeler, 2002/04/16
- Re: [PATCH] Emacs-mode, Heikki Johannes Junes, 2002/04/16
- Re: [PATCH] Emacs-mode, Chris Jackson, 2002/04/16
- Re: [PATCH] Emacs-mode, Rune Zedeler, 2002/04/16
- Re: [PATCH] Emacs-mode, Chris Jackson, 2002/04/16
- Re: [PATCH] Emacs-mode, Heikki Johannes Junes, 2002/04/16
- Re: [PATCH] Emacs-mode, Rune Zedeler, 2002/04/19
- Re: [PATCH] Emacs-mode, Heikki Johannes Junes, 2002/04/21