From: Reini U. <ru...@x-...> - 2001-08-28 19:27:12
|
Steve Wainstead schrieb: > (setq load-path (append load-path (list "~swain/.elisp"))) > (load-library "php-mode-099") > > (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)) > (string-match "\.phtml$" (buffer-file-name)))))) > ;; end file > > I'm using php-mode-099 from Sourceforge (http://php-mode.sourceforge.net). > I was previously using a php-mode from a guy at the ACM. There is a > php-mode-pear-hook in php-mode-099 but my Emacs knowledge is not good > enough to figure out how to run it... since php mode simply inherits all these settings from c-mode it must be something wrong there. aah, my php-mode.el is the old one from Fred Yankowski <fc...@ac...> $Id: php-mode.el,v 1.24 2000/12/08 17:44:17 fred Exp $ this works fine with mmm-mode. the new one crashes on my old beta xemacs.... I stopped fixing things with GNU emacs. stallman made me sick, in xemacs everything is fixed immediately. though speedbar never really worked fine on xemacs. re hooks: I load a number of hooks like this: ;;; fontify these automatically (mapcar '(lambda (hook) (add-hook hook 'turn-on-font-lock)) '(emacs-lisp-mode-hook dired-mode-hook lisp-mode-hook html-mode-hook hm--ht--html-mode-hook cperl-mode-hook perl-mode-hook autolisp-mode-hook c-mode-hook php-mode-hook sql-mode-hook)) for a single mode, like this: (add-hook 'text-mode-hook 'flyspell-mode) and (add-hook 'php-mode-hook 'my-php-mode-hook-func) ; wrong is wrong. it should be: (add-hook 'php-mode-hook 'php-mode) but if it has the same name (like php-mode-hook for php-mode) it is loaded automatically. it only should be defined, before you load the library. in the meantime I have to wait until my xemacs bug is fixed. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |