diff mbox series

[bug#72924] gnu: emacs-lilypond-mode: Add emacs-lilypond-mode

Message ID CAFVS=zD2ksvRW9SsDRPhbf99A2zkGR3rqbi5BbwGHgfXmQK4tw@mail.gmail.com
State New
Headers show
Series [bug#72924] gnu: emacs-lilypond-mode: Add emacs-lilypond-mode | expand

Commit Message

Javier Olaechea Sept. 1, 2024, 4:24 a.m. UTC
Hi,

This adds emacs-lilypond-mode. The mode is distributed as part of lilypond,
so I'm using the same pattern that emacs-protobuf-mode and
emacs-erlang-mode uses. Reuse the parent package, changing only the
build-system and adding the emacs files to the load-path.

Additionally I've verified that I can use the package by including the
following in my emacs' init.el

(use-package lilypond-mode
  :mode ("\\.ly\\'" . LilyPond-mode))

Cheers
diff mbox series

Patch

From 1a2a8c5b6a2f95ddb99f9e2d9eec9cfd6ad6eb8e Mon Sep 17 00:00:00 2001
Message-ID: <1a2a8c5b6a2f95ddb99f9e2d9eec9cfd6ad6eb8e.1725162154.git.pirata@gmail.com>
From: Javier Olaechea <pirata@gmail.com>
Date: Sat, 31 Aug 2024 22:37:02 -0500
Subject: [PATCH] gnu: emacs-lilypond-mode: Add emacs-lilypond-mode.

* gnu/packages/music.scm (emacs-lilypond-mode): New variable.

Change-Id: Ifd6a3e35e9668f39a065de2ce7316775a8d99e39
---
 gnu/packages/music.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index bc2d7f62f1..bdf12054fe 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -1707,6 +1707,24 @@  (define-public lilypond
     ;; more than an hour of silence, so double the max silent time.
     (properties `((max-silent-time . 7200)))))
 
+(define-public emacs-lilypond-mode
+  (package
+    (name "emacs-lilypond-mode")
+    (version (package-version lilypond))
+    (source (package-source lilypond))
+    (build-system emacs-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'expand-load-path
+             'change-working-directory
+           (lambda _ (chdir "elisp") #t)))))
+    (home-page (package-home-page lilypond))
+    (synopsis "Major mode for editing GNU LilyPond music scores")
+    (description "This package provides an Emacs major mode for editing GNU
+LilyPond music scores.")
+    (license (package-license lilypond))))
+
 (define-public music21
   (package
     (name "music21")

base-commit: e05f0e9832326703fa90a02559f1a4b44e4401ad
-- 
2.45.2