cthiede Geschrieben 13. Oktober 2006 Geschrieben 13. Oktober 2006 hi! Ich bin zwar der Meinung dieses Thema gestern abend schon einmal erstellt zu haben, aber es scheint nicht angekommen zu sein. Vielleicht hab ichs auch nur nicht abgeschickt. naja - egal. Ich habe mich so an den emacs gewöhnt, dass ich ihn nun auch für die php-Programmierung verwenden möchte. Nun möchte ich meinem emacs über lisp php beibringen, so dass entsprechend gehighlitghted und eingerückt wird. Dazu gibt es folgende website: http://www.blindschleiche.de/Artikel/Emacs/20000416-emacsphp.php3 cc-mode und hm--html-mode habe ich erfolgreich installiert. nur bei php dateien funktioniert das nicht. nun noch meine .emacs-datei: (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(case-fold-search t) '(cua-mode t nil (cua-base)) '(current-language-environment "German") '(default-input-method "german-postfix") '(global-font-lock-mode t nil (font-lock)) '(show-paren-mode t nil (paren)) '(transient-mark-mode t)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) (global-set-key [f11] 'hm--html-mode) (global-set-key [f12] 'c++-mode) (autoload 'hm--html-mode "hm--html-mode" "HTML major mode." t) (autoload 'hm--html-minor-mode "hm--html-mode" "HTML minor mode." t) (or (assoc "\\.html$" auto-mode-alist) (setq auto-mode-alist (cons '("\\.html$" . hm--html-mode) auto-mode-alist))) (autoload 'tmpl-expand-templates-in-buffer "tmpl-minor-mode" "Expand all templates in the current buffer." t) (autoload 'tmpl-expand-templates-in-region "tmpl-minor-mode" "Expands the templates in the region from BEGIN to END. If BEGIN and END are nil, then the current region is used." t) (autoload 'tmpl-insert-template-file-from-fixed-dirs "tmpl-minor-mode" "Inserts a template FILE and expands it, if `tmpl-automatic-expand' is t. This command tries to read the template file from a list of predefined directories (look at `tmpl-template-dir-list') and it filters the contents of these directories with the regular expression `tmpl-filter-regexp' (look also at this variable). The command uses a history variable, which could be changed with the variable `tmpl-history-variable-name'. The user of the command is able to change interactively to another directory by entering at first the string \"Change the directory\". This may be too difficult for the user. Therefore another command called `tmpl-insert-template-file' exist, which doesn't use fixed directories and filters." t) (autoload 'tmpl-insert-template-file "tmpl-minor-mode" "Inserts a template FILE and expand it, if `tmpl-automatic-expand' is t. Look also at `tmpl-template-dir-list', to specify a default template directory. You should also take a look at `tmpl-insert-template-file-from-fixed-dirs', which has additional advantages (and disadvantages :-). ATTENTION: The interface of this function has changed. The old function had the argument list (&optional TEMPLATE-DIR AUTOMATIC-EXPAND). The variables `tmpl-template-dir-list' and `tmpl-automatic-expand' must now be used instead of the args TEMPLATE-DIR and AUTOMATIC-EXPAND." t) (autoload 'html-view-start-mosaic "html-view" "Start Xmosaic." t) (autoload 'html-view-view-buffer "html-view" "View the current buffer in Xmosaic." t) (autoload 'html-view-view-file "html-view" "View a file in Xmosaic." t) (autoload 'html-view-goto-url "html-view" "Goto url in Xmosaic." t) (autoload 'html-view-get-display "html-view" "Get the display for Xmosaic (i.e. hostxy:0.0)." t) (add-hook 'html-mode-hook 'hm--html-minor-mode) (autoload 'awk-mode "cc-mode" nil t) ww ;; PHP (require 'cc-mode) (autoload 'hm--html-mode "hm--html-mode" "HTML major mode." t) (autoload 'hm--html-minor-mode "hm--html-mode" "HTML minor mode." t) (or (assoc "\\.html$" auto-mode-alist) (setq auto-mode-alist (cons '("\\.html$" . hm--html-mode) auto-mode-alist))) (or (assoc "\\.tmpl$" auto-mode-alist) (setq auto-mode-alist (cons '("\\.tmpl$" . hm--html-mode) auto-mode-alist))) (require 'two-mode-mode) (or (assoc "\\.php3$" auto-mode-alist) (setq auto-mode-alist (cons '("\\.php3$" . two-mode-mode) auto-mode-alist))) (or (assoc "\\.php$" auto-mode-alist) (setq auto-mode-alist (cons '("\\.php$" . two-mode-mode) auto-mode-alist))) (or (assoc "\\.phtml$" auto-mode-alist) (setq auto-mode-alist (cons '("\\.phtml$" . two-mode-mode) auto-mode-alist))) (add-hook 'hm--html-mode-hook (function (lambda () (setq font-lock-mode t) (auto-fill-mode)))) habe ich irgendetwas vergessen? Ich hoffe, dass es schon mal jemand geschafft hat. Vielen Dank für eure Hilfe Zitieren
cthiede Geschrieben 15. Oktober 2006 Autor Geschrieben 15. Oktober 2006 Scheinbar hat das Problem noch keiner gelöst, oder? Zitieren
Empfohlene Beiträge
Dein Kommentar
Du kannst jetzt schreiben und Dich später registrieren. Wenn Du ein Konto hast, melde Dich jetzt an, um unter Deinem Benutzernamen zu schreiben.