svn: /pear/peardoc/trunk/en/chapters/ standards.xml

[email protected] (Christian Weiske)
Newsgroups php.pear.doc
Message-ID <[email protected]>
cweiske                                  Sun, 18 Oct 2009 09:57:42 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=289725

Log:
fix emacs file

Changed paths:
    U   pear/peardoc/trunk/en/chapters/standards.xml

Modified: pear/peardoc/trunk/en/chapters/standards.xml
===================================================================
--- pear/peardoc/trunk/en/chapters/standards.xml	2009-10-18 07:20:51 UTC (rev 289724)
+++ pear/peardoc/trunk/en/chapters/standards.xml	2009-10-18 09:57:42 UTC (rev 289725)
@@ -76,14 +76,13 @@
     mode hook that will set up Emacs (ensure that it is called when you
     are editing PHP files):
     <programlisting role="elisp"><![CDATA[
-(defun php-mode-hook ()
-  (setq tab-width 4
-        c-basic-offset 4
-        c-hanging-comment-ender-p nil
-        indent-tabs-mode
-  (not
-    (and (string-match "/\\(PEAR\\|pear\\)/" (buffer-file-name))
-      (string-match "\.php$" (buffer-file-name))))))
+(defun pear/php-mode-init()
+  "Set some buffer-local variables."
+  (setq case-fold-search t)
+  (c-set-offset 'arglist-intro '+)
+  (c-set-offset 'arglist-close '0)
+)
+(add-hook 'php-mode-hook 'pear/php-mode-init)
      ]]></programlisting>
    </para>
    <para>Here are Vim rules for the same thing:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.