<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>php-mode &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/php-mode/</link>
	<description>Feed of posts on WordPress.com tagged "php-mode"</description>
	<pubDate>Sat, 05 Dec 2009 03:12:40 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Emacs + php-mode in windows]]></title>
<link>http://prajwalaa.wordpress.com/2009/11/19/emacs-php-mode-in-windows/</link>
<pubDate>Thu, 19 Nov 2009 17:28:46 +0000</pubDate>
<dc:creator>Prajwala</dc:creator>
<guid>http://prajwalaa.wordpress.com/2009/11/19/emacs-php-mode-in-windows/</guid>
<description><![CDATA[My development machine is having Ubuntu and I love to use Emacs than any other editor. Recently I ne]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div style="line-height:1.4em;font-family:georgia;font-size:16px;">My development machine is having Ubuntu and I love to use Emacs than any other editor. Recently I need to work on windows.  I wrote a blog post about how to make<a href="http://prajwalaa.wordpress.com/2009/11/06/linux-like-development-environment-in-windows/" target="_blank"> Linux like environment in windows</a>. I wanted to use Emacs in windows. To install Emacs in windows I followed the instructions as it is from <a href="http://www.claremontmckenna.edu/math/alee/emacs/emacs.html" target="_blank">http://www.claremontmckenna.edu/math/alee/emacs/emacs.html</a></div>
<div style="line-height:1.4em;font-family:georgia;font-size:16px;"></div>
<div style="line-height:1.4em;font-family:georgia;font-size:16px;">
<p>I want to work on PHP, so I need a php-mode for Emacs, otherwise it will be very difficult. I tried a lot to install php-mode in windows as specified at <a href="http://prajwalaa.wordpress.com/2009/03/19/using-emacs-to-edit-php-files/" target="_blank">http://prajwalaa.wordpress.com/2009/03/19/using-emacs-to-edit-php-files/</a> but I was getting &#8220;<strong>error: `c-lang-defconst&#8217; must be used in a file</strong>&#8221; error message. Finally after searching for long time I figured out how to enable php-mode.</p>
<p>I downloaded php-mode and extracted and placed in my C:\emacs directory. And added following lines in my C:\emacs\.emacs.d\init.el file</p>
<p><code><br />
(add-to-list 'load-path "C:\emacs\php-mode")<br />
;;(load 'php-mode)<br />
(autoload 'php-mode "php-mode" "Major mode for editing php code." t)<br />
(defun clean-php-mode ()<br />
(interactive)<br />
(php-mode)<br />
(setq c-basic-offset 2) ; 2 tabs indenting<br />
(setq indent-tabs-mode nil)<br />
(setq fill-column 78)<br />
(c-set-offset 'case-label '+)<br />
(c-set-offset 'arglist-close 'c-lineup-arglist-operators))<br />
(c-set-offset 'arglist-intro '+) ; for FAPI arrays and DBTNG<br />
(c-set-offset 'arglist-cont-nonempty 'c-lineup-math) ; for DBTNG fields and values<br />
(add-to-list 'auto-mode-alist '("\\.php$" . php-mode))<br />
(add-to-list 'auto-mode-alist '("\\.inc$" . php-mode))<br />
</code></p>
<p>After adding above lines and save. I restarted emacs. Then Php-mode is working fine. Hope this will help others to install Emacs and enable php-mode.</p>
</div>
</div>]]></content:encoded>
</item>

</channel>
</rss>
