开发者

Emacs php-mode: Removing duplicate <?php in header-line of php files

I use emacs php-mode.el and开发者_运维问答 php-electric.el. I want to get rid of the duplicate <?php overlay that shows up at the top of any php file.

The extra <?php is not actually in the file, but is a semi transparent visual overlay that emacs is adding. I've done some research, and I think changing this might involve the emacs lisp header-line-format variable. But I can't find that anywhere in php-mode.

Also can't find any posts about people removing the extra <?php. Thanks for any help!


Figured it out. Adding (header-line-format 0) to my php-mode hook in my .emacs does the trick. So all together it looks like:

(autoload 'php-mode "php-mode" "Major mode for editing php scripts." t)
(setq auto-mode-alist  (cons '(".php$" . php-mode) auto-mode-alist))
(require 'php-mode)
(load-file "~/.emacs.d/emacs_includes/plugins/php-mode/php-electric.el")
(add-hook 'php-mode-hook
          '(lambda ()
             (define-abbrev php-mode-abbrev-table "ex" "extends")
             (define-key php-mode-map '[M-S-up] 'flymake-goto-prev-error)
             (define-key php-mode-map '[M-S-down] 'flymake-goto-next-error)
             (require 'php-electric)
             (php-electric-mode t)
             (tabbar-local-mode 1)
             (header-line-format 0)
             (semantic-show-unmatched-syntax-mode 0)
             ))
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜