Skip to content

Commit

Permalink
fixed most compilation errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sillykelvin committed Aug 25, 2013
1 parent 11c27ac commit fc0450a
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 12 deletions.
5 changes: 5 additions & 0 deletions op-enhance.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
;;; Code:

(require 'format-spec)
(require 'ox)
(require 'ht)
(require 'op-util)
(require 'op-vars)


(defun op/get-theme-dir (theme)
"Return the resource storage directory of THEME."
Expand Down
7 changes: 7 additions & 0 deletions op-export.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
;;; Code:

(require 'format-spec)
(require 'ox)
(require 'ht)
(require 'op-util)
(require 'op-vars)
(require 'op-git)
(require 'op-template)


(defun op/publish-changes (all-list change-plist pub-root-dir)
"This function is for:
Expand Down
26 changes: 16 additions & 10 deletions op-git.el
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@

;;; Code:

(require 'ox)
(require 'ht)
(require 'op-util)
(require 'op-vars)


(defun op/verify-git-repository (repo-dir)
"This function will verify whether REPO-DIR is a valid git repository.
TODO: may add branch/commit verification later."
Expand Down Expand Up @@ -54,9 +60,9 @@ instead of pointer HEAD."
(concat "git ls-tree -r --name-only "
(or branch "HEAD"))
t)))
(delq nil (mapcar '(lambda (line)
(when (string-suffix-p org-file-ext line t)
(expand-file-name line repo-dir)))
(delq nil (mapcar #'(lambda (line)
(when (string-suffix-p org-file-ext line t)
(expand-file-name line repo-dir)))
(split-string output "\n")))))

(defun op/git-branch-name (repo-dir)
Expand Down Expand Up @@ -130,13 +136,13 @@ only two types will work well: need to publish or need to delete.
base-commit " HEAD")
t))
upd-list del-list)
(mapc '(lambda (line)
(if (string-match "\\`[A|M]\t\\(.*\.org\\)\\'" line)
(setq upd-list (cons (concat repo-dir (match-string 1 line))
upd-list)))
(if (string-match "\\`D\t\\(.*\.org\\)\\'" line)
(setq del-list (cons (concat repo-dir (match-string 1 line))
del-list))))
(mapc #'(lambda (line)
(if (string-match "\\`[A|M]\t\\(.*\.org\\)\\'" line)
(setq upd-list (cons (concat repo-dir (match-string 1 line))
upd-list)))
(if (string-match "\\`D\t\\(.*\.org\\)\\'" line)
(setq del-list (cons (concat repo-dir (match-string 1 line))
del-list))))
(split-string output "\n"))
(list :update upd-list :delete del-list)))

Expand Down
6 changes: 6 additions & 0 deletions op-template.el
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@

;;; Code:

(require 'ox)
(require 'mustache)
(require 'op-util)
(require 'op-vars)
(require 'op-git)
(require 'op-export)


(defun op/get-cache-item (key)
"Get the item associated with KEY in `op/item-cache', if `op/item-cache' is
Expand Down
3 changes: 3 additions & 0 deletions op-util.el
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

;;; Code:

(require 'ht)


(defun compare-standard-date (date1 date2)
"Compare two standard ISO 8601 format dates, format is as below:
2012-08-17
Expand Down
4 changes: 4 additions & 0 deletions op-vars.el
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@

;;; Code:

(require 'ox)
(require 'ht)


(defgroup org-page nil
"Options for generating static pages using org-page."
:tag "Org static page generator" :group 'org)
Expand Down
3 changes: 1 addition & 2 deletions org-page.el
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@
;;; Code:

(require 'ox)
(require 'mustache)
(require 'ht)
(require 'op-util)
(require 'op-vars)
(require 'op-template)
(require 'op-git)
(require 'op-enhance)
(require 'op-export)
Expand Down

0 comments on commit fc0450a

Please sign in to comment.