emacs php modu kanca nasıl ekleneceğini

0 Cevap php

Ben bir emacs modu kanca kodu var

(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?

NOT: Geçenlerde emacs göç etmiş .. cevaplarken daha açıklayıcı olun lütfen .. :)

Güncelleme kodu1

(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)))))))

0 Cevap