天天看点

emacs php mode,Emacs的PHP模式

试试这个:

(defun my-build-tab-stop-list (width)

(let ((num-tab-stops (/ 80 width))

(counter 1)

(ls nil))

(while (<= counter num-tab-stops)

(setq ls (cons (* width counter) ls))

(setq counter (1+ counter)))

(nreverse ls)))

(add-hook 'c-mode-common-hook

#'(lambda ()

;; You an remove this, if you don't want fixed tab-stop-widths

(set (make-local-variable 'tab-stop-list)

(my-build-tab-stop-list tab-width))

(setq c-basic-offset tab-width)

(c-set-offset 'defun-block-intro tab-width)

(c-set-offset 'arglist-intro tab-width)

(c-set-offset 'arglist-close 0)

(c-set-offset 'defun-close 0)

(setq abbrev-mode nil)))