how to add php mode hooks in emacs

pellhdzz

New Member
I have a emacs mode hook code\[code\](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))))))\[/code\]I need to ensure to call this function whenever i open a php file within emacs..i have installed php-mode for emacs as well as added this code in .emacs file but it seems not to be working.. can anyone tell me how to add such customization code for emacs?NOTE: I have recently migrated to emacs.. please be more descriptive while answering.. :)Updated code1\[code\](add-hook 'php-mode-hook '(lambda() (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)))))))\[/code\]
 
Back
Top