unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Vivien Kraus via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: 51869@debbugs.gnu.org
Subject: bug#51869: [PATCH] Add emacs-vala-mode
Date: Tue, 16 Nov 2021 19:48:32 +0000	[thread overview]
Message-ID: <87zgq3svut.fsf@planete-kraus.eu> (raw)
In-Reply-To: <8490cb54de7cc4b18ff7a66f36b0a226826ebbbb.camel@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1035 bytes --]


Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> Please avoid pulling home-page up, it's not meant to be used as
> git-reference url.
OK.

>> +               (emacs-substitute-sexps "vala-mode.el"
>> +                 (";; Support multiline strings" 'disabled.)
>> +                 ("(defcustom vala-multiline-strings nil"
>> +                  "This variable is ignored.")))))))
> This inserts mostly bogus into the file rather than killing the sexps
> as it should.  

The first substitution fully kills the whole sexp (and inserts a comment
that reads "Support for multiline strings disabled." if you don’t read
too closely ^^). It’s true that the second does not kill the defcustom
expansion, but since it’s part of the intended public API, I’m not so
sure we should remove it altogether. I think it’s clearer for the user
that way, because the two modifications are kind of documented in the
source.

Also, it’s shorter.

Anyway, Here are the two versions, you decide.

Vivien


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: With sexp substitution --]
[-- Type: text/x-patch, Size: 2233 bytes --]

From c0726be413991eab7b16ca0bebf42cc8eab616e1 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Mon, 15 Nov 2021 13:57:18 +0000
Subject: [PATCH] gnu: Add emacs-vala-mode.

* gnu/packages/emacs-xyz (emacs-vala-mode): New variable.
---
 gnu/packages/emacs-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 113471ae14..61d780c72b 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -29993,3 +29993,40 @@ (define-public emacs-global-tags
 wraps GNU Global calls and integration to editor using this API with
 project.el and xref.el.")
       (license license:gpl3+))))
+
+(define-public emacs-vala-mode
+  ;; Upstream has no tagged release.
+  (let ((commit "d696a8177e94c81ea557ad364a3b3dcc3abbc50f")
+        (revision "0"))
+    (package
+      (name "emacs-vala-mode")
+      (version (git-version "0.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/rrthomas/vala-mode")
+               (commit commit)))
+         (sha256
+          (base32 "0g5pdq757z9d8rk489n5ilhqipdc4i4sfkjwwrxyvgjlapjc04c0"))))
+      (build-system emacs-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'disable-multiline-support
+             (lambda* (#:key inputs #:allow-other-keys)
+               (make-file-writable "vala-mode.el")
+               (emacs-substitute-sexps "vala-mode.el"
+                 (";; Support multiline strings" 'disabled.)
+                 ("(defcustom vala-multiline-strings nil"
+                  "This variable is ignored.")))))))
+      (home-page "https://github.com/rrthomas/vala-mode")
+      (synopsis "Vala mode for Emacs")
+      (description
+       "This package provides a major mode for editing .vala and .vapi files
+in Emacs.  See @url{http://live.gnome.org/Vala} for details about Vala
+language.
+
+This mode was based on Dylan Moonfire's @samp{csharp-mode}.
+")
+      (license license:gpl2+))))
-- 
2.33.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: With a batch edit program --]
[-- Type: text/x-patch, Size: 2467 bytes --]

From f1d594081881e42a273dfd0d857f0af41615270d Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Mon, 15 Nov 2021 13:57:18 +0000
Subject: [PATCH] gnu: Add emacs-vala-mode.

* gnu/packages/emacs-xyz (emacs-vala-mode): New variable.
---
 gnu/packages/emacs-xyz.scm | 43 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 113471ae14..9be6a306e1 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -29993,3 +29993,46 @@ (define-public emacs-global-tags
 wraps GNU Global calls and integration to editor using this API with
 project.el and xref.el.")
       (license license:gpl3+))))
+
+(define-public emacs-vala-mode
+  ;; Upstream has no tagged release.
+  (let ((commit "d696a8177e94c81ea557ad364a3b3dcc3abbc50f")
+        (revision "0"))
+    (package
+      (name "emacs-vala-mode")
+      (version (git-version "0.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/rrthomas/vala-mode")
+               (commit commit)))
+         (sha256
+          (base32 "0g5pdq757z9d8rk489n5ilhqipdc4i4sfkjwwrxyvgjlapjc04c0"))))
+      (build-system emacs-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'disable-multiline-support
+             (lambda* (#:key inputs #:allow-other-keys)
+               (make-file-writable "vala-mode.el")
+               (emacs-batch-edit-file "vala-mode.el"
+                 '(progn
+                   (goto-char (point-min))
+                   (re-search-forward ";; Support multiline strings")
+                   (move-beginning-of-line 1)
+                   (kill-sexp)
+                   (re-search-forward "vala-multiline-strings")
+                   (backward-up-list)
+                   (kill-sexp)
+                   (basic-save-buffer))))))))
+      (home-page "https://github.com/rrthomas/vala-mode")
+      (synopsis "Vala mode for Emacs")
+      (description
+       "This package provides a major mode for editing .vala and .vapi files
+in Emacs.  See @url{http://live.gnome.org/Vala} for details about Vala
+language.
+
+This mode was based on Dylan Moonfire's @samp{csharp-mode}.
+")
+      (license license:gpl2+))))
-- 
2.33.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 658 bytes --]

  reply	other threads:[~2021-11-16 20:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 14:05 bug#51869: [PATCH] Add emacs-vala-mode Vivien Kraus via Bug reports for GNU Guix
2021-11-15 19:42 ` Liliana Marie Prikler
2021-11-15 20:48   ` Vivien Kraus via Bug reports for GNU Guix
2021-11-16 17:49     ` Liliana Marie Prikler
2021-11-16 18:12       ` Vivien Kraus via Bug reports for GNU Guix
2021-11-16 19:41         ` Liliana Marie Prikler
2021-11-16 19:48           ` Vivien Kraus via Bug reports for GNU Guix [this message]
2021-11-17 17:09             ` Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgq3svut.fsf@planete-kraus.eu \
    --to=bug-guix@gnu.org \
    --cc=51869@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    --cc=vivien@planete-kraus.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).