I have a emacs mode hook 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))))))
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
(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)))))))