adding files
This commit is contained in:
commit
36b9aa12d1
|
@ -0,0 +1 @@
|
|||
auto-save-list
|
|
@ -0,0 +1,17 @@
|
|||
;;; 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)
|
|
@ -0,0 +1,53 @@
|
|||
;; Generic Emacs stuff
|
||||
(add-to-list 'load-path "~/.emacs.d")
|
||||
;; Always use spaces instead of tabs, a tab is 4 spaces by default
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(setq-default tab-width 4)
|
||||
|
||||
;; Python!
|
||||
;; Prevent ropemacs from overriding emacs shortcuts
|
||||
;;(setq ropemacs-enable-shortcuts nil)
|
||||
;;(setq ropemacs-local-prefix "C-c C-p")
|
||||
;; Load of a bunch of stuff for pymacs : http://pymacs.progiciels-bpi.ca/pymacs.html#installation
|
||||
;;(autoload 'pymacs-apply "pymacs")
|
||||
;;(autoload 'pymacs-call "pymacs")
|
||||
;;(autoload 'pymacs-eval "pymacs" nil t)
|
||||
;;(autoload 'pymacs-exec "pymacs" nil t)
|
||||
;;(autoload 'pymacs-load "pymacs" nil t)
|
||||
;;(autoload 'pymacs-autoload "pymacs")
|
||||
;;(eval-after-load "pymacs"
|
||||
;; '(add-to-list 'pymacs-load-path YOUR-PYMACS-DIRECTORY"))
|
||||
;;(require 'pymacs)
|
||||
;; Load ropemacs
|
||||
;;(pymacs-load "ropemacs" "rope-")
|
||||
|
||||
;; PHP and Drupal-Modes
|
||||
(require 'whitespace)
|
||||
(autoload 'whitespace-mode "whitespace" "Toggle whitespace visualization." t)
|
||||
(autoload 'whitespace-toggle-options "whitespace" "Toggle local 'whitespace-mode' options." t)
|
||||
(add-to-list 'load-path "~/.emacs.d/")
|
||||
(require 'php-mode)
|
||||
(require 'drupal-mode)
|
||||
(add-to-list 'auto-mode-alist '("\\.\\(module\\|test\\|install\\|theme\\)$" . drupal-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.\\(php\\|inc\\)$" . php-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.info" . conf-windows-mode))
|
||||
(defun my-php-hook-function ()
|
||||
(set (make-local-variable 'compile-command) (format "phpcs --report=emacs --standard=PEAR %s" (buffer-file-name))))
|
||||
(add-hook 'php-mode-hook 'my-php-hook-function)
|
||||
(defun my-drupal-hook-function ()
|
||||
(set (make-local-variable 'compile-command) (format "phpcs --report=emacs --extensions=php,module,inc,install,test,profile,theme --standard=Drupal %s" (buffer-file-name))))
|
||||
(add-hook 'drupal-mode-hook 'my-drupal-hook-function)
|
||||
(setq whitespace-style '(trailing tabs tab-mark face))
|
||||
(defface extra-whitespace-face
|
||||
'((t (:background "pale yellow")))
|
||||
"Used for tabs and such.")
|
||||
(defvar my-extra-keywords
|
||||
'(("\t" . 'extra-whitespace-face)))
|
||||
;; Draw tabs with the same color as trailing whitespace
|
||||
(add-hook 'font-lock-mode-hook
|
||||
(lambda ()
|
||||
(font-lock-add-keywords
|
||||
nil
|
||||
'(("\t" 0 'trailing-whitespace prepend)))))
|
||||
(autoload 'js2-mode "js2-mode" nil t)
|
||||
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue