17 lines
626 B
EmacsLisp
17 lines
626 B
EmacsLisp
;;; drupal-mode.el --- major mode for Drupal coding
|
|
|
|
;;;###autoload
|
|
(define-derived-mode drupal-mode php-mode "Drupal"
|
|
"Major mode for Drupal coding.\n\n\\{drupal-mode-map}"
|
|
(setq c-basic-offset 2)
|
|
(setq indent-tabs-mode nil)
|
|
(setq fill-column 78)
|
|
(setq show-trailing-whitespace t)
|
|
(add-hook 'before-save-hook 'delete-trailing-whitespace)
|
|
(c-set-offset 'case-label '+)
|
|
(c-set-offset 'arglist-close 0)
|
|
(c-set-offset 'arglist-intro '+) ; for FAPI arrays and DBTNG
|
|
(c-set-offset 'arglist-cont-nonempty 'c-lineup-math) ; for DBTNG fields and values
|
|
(run-mode-hooks 'drupal-mode-hook)
|
|
)
|
|
(provide 'drupal-mode) |