LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-12-2009, 05:04 PM   #1
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
Unhappy How to get Emacs PHP mode?


I'm running Debian Lenny i386 with emacs22-nox (I don't like X11 emacs). Does anyone know how I can get php-mode syntax coloring? I've got coloring for a bunch of other languages, but 'M-x php-mode' does nothing.

Tutorials on-line usually say install the 'php-mode' package, but I can't find it, or a similarly named one, in the repos. This is what is currently installed on my system:

i emacs-goodies-el - Miscellaneous add-ons for Emacs
i emacs22-common-non-dfsg - GNU Emacs shared, architecture independent
i emacs22-el - GNU Emacs LISP (.el) files
i emacs22-nox - The GNU Emacs editor (without X support)
 
Old 05-13-2009, 05:56 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
I've got the php-mode-1.5.0 package manually installed on FC10.

All I did was unbzip2ing it in

/home/myuser/php-mode-1.5.0

then I edited my .emacs to contain

Code:
(add-to-list 'load-path "~/php-mode-1.5.0")
(load "php-mode")
.
.
.
(add-hook 'php-mode-hook 'hs-minor-mode)
Now, when I open a .php file in emacs, it is syntax colored...

If you want the package, mail me at lq at polard dot com and I'll send it to you.

Hope this helps!
 
Old 05-13-2009, 09:54 AM   #3
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Code:
alucard@karrde:~$ apt-cache search php mode emacs
html-helper-mode - A popular HTML editing mode for emacs
jed - editor for programmers (textmode version)
php-elisp - Emacs support for php files
xjed - editor for programmers (x11 version)
I'm guessing it's the third one.
 
Old 07-14-2009, 02:47 PM   #4
racy_rick
LQ Newbie
 
Registered: Jul 2009
Posts: 1

Rep: Reputation: 0
Got php-mode to work!

I am using Debian, here is what I installed to get php-mode on emacs:

apt-get install php-elisp


Now, even without a .emacs file setup the php syntax coloring is correct.

racy_Rick
rick@racy.com



Quote:
Originally Posted by CoderMan View Post
I'm running Debian Lenny i386 with emacs22-nox (I don't like X11 emacs). Does anyone know how I can get php-mode syntax coloring? I've got coloring for a bunch of other languages, but 'M-x php-mode' does nothing.

Tutorials on-line usually say install the 'php-mode' package, but I can't find it, or a similarly named one, in the repos. This is what is currently installed on my system:

i emacs-goodies-el - Miscellaneous add-ons for Emacs
i emacs22-common-non-dfsg - GNU Emacs shared, architecture independent
i emacs22-el - GNU Emacs LISP (.el) files
i emacs22-nox - The GNU Emacs editor (without X support)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Emacs: sgml mode lackluster Programming 4 04-23-2006 08:50 PM
Emacs matlab-mode pasovic Linux - Software 0 02-26-2006 08:48 AM
emacs problem in shell mode bujecas Slackware 1 10-25-2004 04:37 AM
emacs-21.2 php-mode.el howto ? cicisbeo Linux - Software 1 01-12-2004 08:26 PM
Disabling cc-mode Emacs amannuc Linux - Software 0 10-21-2003 12:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration