<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>mizzy.org: puppet-mode.el &#12398;&#12497;&#12483;&#12481;</title>
    <link>http://blog.mizzy.org/articles/2007/08/30/emacs-puppet-mode-patch</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>puppet-mode.el &#12398;&#12497;&#12483;&#12481;</title>
      <description>&lt;p&gt;Puppet &#12391;&#21516;&#12376;&#12479;&#12452;&#12503;&#12398;&#12522;&#12477;&#12540;&#12473;&#12434;&#22823;&#37327;&#12395;&#35352;&#36848;&#12377;&#12427;&#26178;&#12395;&#12399;&#12289;&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;package { sudo:
  ensure =&amp;gt; latest
}

package { ntp:
  ensure =&amp;gt; latest
}

package { ssh:
  ensure =&amp;gt; latest
}
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;&#12394;&#12435;&#12390;&#26360;&#12367;&#12398;&#12399;&#12384;&#12427;&#12356;&#12398;&#12391;&#12289;&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;package {
  sudo:
    ensure =&amp;gt; latest;
  ntp:
    ensure =&amp;gt; latest;
  ssh:
    ensure =&amp;gt; latest;
}
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;&#12392;&#26360;&#12365;&#12383;&#12356;&#12398;&#12391;&#12377;&#12364;&#12289;Emacs + &lt;a href="https://reductivelabs.com/svn/puppet/trunk/ext/emacs/puppet-mode.el"&gt;puppet-mode.el&lt;/a&gt; &#12391;&#12399;&#12289;&#24460;&#32773;&#12415;&#12383;&#12356;&#12394;&#26360;&#12365;&#26041;&#12384;&#12392;&#12289;&#12452;&#12531;&#12487;&#12531;&#12488;&#12364;&#24847;&#22259;&#12375;&#12383;&#36890;&#12426;&#12395;&#12394;&#12425;&#12394;&#12367;&#12390;&#12289;&#12452;&#12521;&#12387;&#12392;&#12365;&#12390;&#12497;&#12483;&#12481;&#26360;&#12356;&#12383;&#12290;&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;=== puppet-mode.el
==================================================================
--- puppet-mode.el      (revision 1800)
+++ puppet-mode.el      (local)
@@ -106,7 +106,9 @@
                  (progn
                     (setq cur-indent (- (current-indentation) 2))
                    (setq not-indented nil))
-               (setq cur-indent (- (current-indentation) 2))))
+               (setq cur-indent (- (current-indentation) 2)))
+              (if (looking-at "^.*;")
+                  (setq cur-indent (- cur-indent 2))))
            (if (&amp;lt; cur-indent 0)     ; We can't indent past the left margin
                (setq cur-indent 0)))
        (save-excursion
@@ -125,6 +127,18 @@
                    (setq cur-indent (+ (current-indentation) 2))
                    (setq not-indented nil))
                (if (bobp)
+                   (setq not-indented nil)))
+             (if (looking-at "^.*:\s*$")
+                 (progn
+                   (setq cur-indent (+ (current-indentation) 2))
+                   (setq not-indented nil))
+               (if (bobp)
+                   (setq not-indented nil)))
+             (if (looking-at "^.*;")
+                 (progn
+                    (setq cur-indent (- (current-indentation) 2))
+                   (setq not-indented nil))
+               (if (bobp)
                    (setq not-indented nil)))))))
       (if cur-indent
          (indent-line-to cur-indent) 
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;&#20182;&#12395;&#12418;&#12452;&#12531;&#12487;&#12531;&#12488;&#12414;&#12431;&#12426;&#12398;&#21205;&#20316;&#12391;&#24494;&#22937;&#12394;&#12392;&#12371;&#12429;&#12399;&#12354;&#12427;&#12369;&#12393;&#12289;&#12385;&#12423;&#12387;&#12392;&#12399;&#12414;&#12375;&#12395;&#12394;&#12387;&#12383;&#12290;&#12452;&#12531;&#12487;&#12531;&#12488;&#12414;&#12431;&#12426;&#12398;&#20966;&#29702;&#12391;&#21442;&#32771;&#12395;&#12394;&#12427; emacs-lisp &#12387;&#12390;&#20309;&#12363;&#12394;&#12356;&#12363;&#12394;&#65311;&lt;/p&gt;</description>
      <pubDate>Thu, 30 Aug 2007 00:30:00 +0900</pubDate>
      <guid isPermaLink="false">urn:uuid:4a06fb57-930d-4957-8776-214364d70650</guid>
      <author>Gosuke Miyashita</author>
      <link>http://blog.mizzy.org/articles/2007/08/30/emacs-puppet-mode-patch</link>
      <category>linux</category>
    </item>
  </channel>
</rss>
