Permalink
Browse files

Implemented a skeleton hyde-markdown mode and use that for all work t…

…he the posts buffers
  • Loading branch information...
1 parent 5d4986d commit 0062e3f0a9379f4b7abefbeb0bedd085026ac731 @nibrahim nibrahim committed Nov 10, 2010
Showing with 9 additions and 3 deletions.
  1. +6 −2 hyde-md.el
  2. +3 −1 hyde.el
View
@@ -21,8 +21,12 @@
(defun hyde-markdown-post-save ()
"Functions called after saving to update the hyde buffers"
(interactive)
- (message "Hello, we're done!"))
+ (message "Hello")
+ nil)
+
(define-derived-mode hyde-markdown-mode markdown-mode "Hyde-markdown"
"Markdown mode with a few extra bindings for convenience"
- (add-hook 'write-file-functions 'hyde-markdown-post-save))
+ (add-hook 'write-contents-functions 'hyde-markdown-post-save nil t))
+
+(provide 'hyde-md)
View
@@ -20,6 +20,7 @@
;; Requirements
(require 'hyde-git)
+(require 'hyde-md)
;; Constants for internal use
(defconst hyde/hyde-version "0.1"
@@ -143,7 +144,8 @@ user"
1
(split-string (strip-string (thing-at-point 'line)) " : "))))
(find-file
- (strip-string (concat hyde-home "/" hyde-posts-dir "/" post-file-name)))))
+ (strip-string (concat hyde-home "/" hyde-posts-dir "/" post-file-name)))
+ (hyde-markdown-mode)))
;; Keymaps
(defvar hyde-mode-map

0 comments on commit 0062e3f

Please sign in to comment.