Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 74 lines (60 sloc) 2.248 kb
cd6de7c Regular commit.
krick authored
1 ;;; kemacs-webdev.el --- Configuration for better webdevelopment
2 ;;
3 ;; Part of kEmacs
4
5 ;;; PHP
6 (require `php-mode)
7
8 ;; check basic syntax on the fly
9 (require 'flymake-php)
10 (add-hook 'php-mode-user-hook 'flymake-php-load)
11
4e68bf3 Regular commit.
krick authored
12 (defun wicked/php-mode-init ()
13 "Set some buffer-local variables."
14 (setq case-fold-search t)
15 (setq indent-tabs-mode nil)
16 (setq fill-column 78)
17 (setq c-basic-offset 2)
18 (c-set-offset 'arglist-cont 0)
19 (c-set-offset 'arglist-intro '+)
20 (c-set-offset 'case-label 2)
21 (c-set-offset 'arglist-close 0)
22 )
23 (add-hook 'php-mode-hook 'wicked/php-mode-init)
24
25
26 ;; (load (concat dotfiles-dir "vendor/nxhtml/autostart.el"))
27
cd6de7c Regular commit.
krick authored
28 ;;; PO
29 ;; Convinient editon of po-files (translation)
30 (autoload 'po-mode "po-mode")
31 (setq auto-mode-alist (cons '("\\.po[tx]?\\'\\|\\.po\\." . po-mode)
32 auto-mode-alist))
33
34 ;;; YAML
35 ;; Convenient editing of yaml-files
3e3ab82 add submodules as submodules and remove unneeded one
Константин authored
36 ;;(require 'yaml-mode)
37 ;;(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
cd6de7c Regular commit.
krick authored
38
39 ;;; Markdown
40 ;; convinient blogging
41 (autoload 'markdown-mode "markdown-mode.el"
42 "Major mode for editing Markdown files" t)
4e68bf3 Regular commit.
krick authored
43 ;; Switch on longlines-mode.
44 (add-hook 'markdown-mode-hook 'longlines-mode)
45
b63b6c6 radius file extension should be opened in html-mode
krick authored
46 (add-to-list 'auto-mode-alist '(".radius$" . html-mode))
9685b24 add .markdown extension to markdown mode
krick authored
47 (add-to-list 'auto-mode-alist '(".txt$" . markdown-mode))
1f3ca6e .md is a markdown file
krick authored
48 (add-to-list 'auto-mode-alist '(".md$" . markdown-mode))
9685b24 add .markdown extension to markdown mode
krick authored
49 (add-to-list 'auto-mode-alist '(".markdown$" . markdown-mode))
cd6de7c Regular commit.
krick authored
50
51 ;; The following is for proper handling russian text in preview in markdown mode
52 (defadvice markdown
53 (after decorate-xhtml activate)
54 "Add proper XHTML headers and footers to markdown output"
55 (save-excursion
56 (set-buffer "*markdown-output*")
4e68bf3 Regular commit.
krick authored
57 (copy-region-as-kill (point-min) (point-max))
cd6de7c Regular commit.
krick authored
58 (goto-char (point-min))
59 (insert "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"
60 "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n"
61 "\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\n"
62 "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n\n"
63 "<head>\n<title>\n</title>\n</head>\n\n"
64 "<body>\n\n")
65 (goto-char (point-max))
66 (insert "\n"
67 "</body>\n"
68 "</html>\n")))
69
70
71 (provide 'kemacs-webdev)
72 ;;; kemacs-webdev.el ends here
73
Something went wrong with that request. Please try again.