The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/3224
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Trivial change to add "mode:yaml" markers to configuration templates used by edit actions, so that emacs will use the correct mode.
From ac3847a13c19e828a70757ab9a5efc428b37568f Mon Sep 17 00:00:00 2001 From: Alberto Donato <alberto.don...@canonical.com> Date: Wed, 26 Apr 2017 10:54:58 +0200 Subject: [PATCH] Add yaml-mode marker in template for "lxc edit" actions. --- lxc/config.go | 4 +++- lxc/image.go | 6 ++++-- lxc/network.go | 4 +++- lxc/profile.go | 4 +++- lxc/storage.go | 8 ++++++-- 5 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lxc/config.go b/lxc/config.go index 7be59ac..d34e6bb 100644 --- a/lxc/config.go +++ b/lxc/config.go @@ -34,7 +34,9 @@ func (c *configCmd) flags() { } func (c *configCmd) configEditHelp() string { - return i18n.G( + return `### -*- mode:yaml -*- +### +` + i18n.G( `### This is a yaml representation of the configuration. ### Any line starting with a '# will be ignored. ### diff --git a/lxc/image.go b/lxc/image.go index 0b02bce..0f3d40b 100644 --- a/lxc/image.go +++ b/lxc/image.go @@ -49,8 +49,10 @@ func (c *imageCmd) showByDefault() bool { } func (c *imageCmd) imageEditHelp() string { - return i18n.G( - `### This is a yaml representation of the image properties. + return `### -*- mode:yaml -*- +### +` + i18n.G( + `### This is a yaml representation of the image properties. ### Any line starting with a '# will be ignored. ### ### Each property is represented by a single line: diff --git a/lxc/network.go b/lxc/network.go index 920a67e..b2c46f3 100644 --- a/lxc/network.go +++ b/lxc/network.go @@ -26,7 +26,9 @@ func (c *networkCmd) showByDefault() bool { } func (c *networkCmd) networkEditHelp() string { - return i18n.G( + return `### -*- mode:yaml -*- +### +` + i18n.G( `### This is a yaml representation of the network. ### Any line starting with a '# will be ignored. ### diff --git a/lxc/profile.go b/lxc/profile.go index 70221a4..75ce81b 100644 --- a/lxc/profile.go +++ b/lxc/profile.go @@ -25,7 +25,9 @@ func (c *profileCmd) showByDefault() bool { } func (c *profileCmd) profileEditHelp() string { - return i18n.G( + return `### -*- mode:yaml -*- +### +` + i18n.G( `### This is a yaml representation of the profile. ### Any line starting with a '# will be ignored. ### diff --git a/lxc/storage.go b/lxc/storage.go index 365ca5d..cdcefb1 100644 --- a/lxc/storage.go +++ b/lxc/storage.go @@ -27,7 +27,9 @@ func (c *storageCmd) showByDefault() bool { } func (c *storageCmd) storagePoolEditHelp() string { - return i18n.G( + return `### -*- mode:yaml -*- +### +` + i18n.G( `### This is a yaml representation of a storage pool. ### Any line starting with a '# will be ignored. ### @@ -44,7 +46,9 @@ func (c *storageCmd) storagePoolEditHelp() string { } func (c *storageCmd) storagePoolVolumeEditHelp() string { - return i18n.G( + return `### -*- mode:yaml -*- +### +` + i18n.G( `### This is a yaml representation of a storage volume. ### Any line starting with a '# will be ignored. ###
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel