diff options
author | Arun Isaac | 2020-08-01 05:00:46 +0530 |
---|---|---|
committer | Arun Isaac | 2020-08-01 05:12:36 +0530 |
commit | 30e1efc4051a67e6e41561f45101c9077dc41e2e (patch) | |
tree | ccd9fa752618d47deb0efb83974104f174a5318c /ennum-html.el | |
parent | cb070712c9326a97c750c9ccb5958fa0fa53e41b (diff) | |
download | ennum-30e1efc4051a67e6e41561f45101c9077dc41e2e.tar.gz ennum-30e1efc4051a67e6e41561f45101c9077dc41e2e.tar.lz ennum-30e1efc4051a67e6e41561f45101c9077dc41e2e.zip |
Prefix ennum-html symbols with ennum-html-.
* ennum-html.el: Prefix all ennum-html symbols consistently with
ennum-html-.
Diffstat (limited to 'ennum-html.el')
-rw-r--r-- | ennum-html.el | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/ennum-html.el b/ennum-html.el index ee1b3d7..f091789 100644 --- a/ennum-html.el +++ b/ennum-html.el @@ -4,7 +4,7 @@ (require 'subr-x) (require 'xmlgen) -(defconst ennum--iso-639-1-alist +(defconst ennum-html--iso-639-1-alist '(("ab" . "аҧсуа бызшәа, аҧсшәа") ("aa" . "Afaraf") ("af" . "Afrikaans") @@ -238,10 +238,11 @@ (slug (ennum-post-slug translation))) (replace-regexp-in-string "<a " (format "<a hreflang=\"%s\" " lang) - (ennum-export-post slug - (map-elt ennum--iso-639-1-alist lang nil 'string=) - (org-export-backend-name - (plist-get info :back-end)))))) + (ennum-html-export-post + slug + (map-elt ennum-html--iso-639-1-alist lang nil 'string=) + (org-export-backend-name + (plist-get info :back-end)))))) translations ", "))) ;; Tags @@ -251,8 +252,9 @@ (lambda (tag) (replace-regexp-in-string "<a " "<a class=\"p-category\" " - (ennum-export-tag (ennum-add-tongue-suffix tag (plist-get info :language)) - tag (org-export-backend-name (plist-get info :back-end))))) + (ennum-html-export-tag + (ennum-add-tongue-suffix tag (plist-get info :language)) + tag (org-export-backend-name (plist-get info :back-end))))) tags ", "))) ;; Summary @@ -307,13 +309,13 @@ ;; Pass other link types to org-html-link (_ (org-html-link link desc info))))) -(defmacro ennum-follow (path) +(defmacro ennum-html-follow (path) `(ennum-with-current-directory (ennum-setting :working-directory) (find-file ,path))) ;; TODO: Pass title through org-export-data-with-backend or something ;; similar in order to export org syntax in title -(defun ennum-export-post (path desc backend) +(defun ennum-html-export-post (path desc backend) (pcase backend ((or 'ennum-html 'html) (let ((filename (concat (expand-file-name path (ennum-setting :posts-directory)) @@ -322,22 +324,22 @@ (expand-file-name* path (ennum-setting :posts-directory))) ,(or desc (ennum-post-title (ennum-read-post filename))))))))) -(defun ennum-follow-post (path) - (ennum-follow (expand-file-name (concat path ".org") - (ennum-setting :posts-directory)))) +(defun ennum-html-follow-post (path) + (ennum-html-follow (expand-file-name (concat path ".org") + (ennum-setting :posts-directory)))) (org-link-set-parameters "post" - :export 'ennum-export-post - :follow 'ennum-follow-post) + :export 'ennum-html-export-post + :follow 'ennum-html-follow-post) -(defun ennum-follow-image (path) - (ennum-follow (expand-file-name path (ennum-setting :images-directory)))) +(defun ennum-html-follow-image (path) + (ennum-html-follow (expand-file-name path (ennum-setting :images-directory)))) (org-link-set-parameters - "image" :follow 'ennum-follow-image) + "image" :follow 'ennum-html-follow-image) -(defun ennum-export-thumbnail (path desc backend) +(defun ennum-html-export-thumbnail (path desc backend) (pcase backend ((or 'ennum-html 'html) (xmlgen @@ -349,10 +351,10 @@ (org-link-set-parameters "thumbnail" - :export 'ennum-export-thumbnail - :follow 'ennum-follow-image) + :export 'ennum-html-export-thumbnail + :follow 'ennum-html-follow-image) -(defun ennum-export-static (path desc backend) +(defun ennum-html-export-static (path desc backend) (pcase backend ((or 'ennum-html 'html) (xmlgen @@ -361,12 +363,12 @@ ,desc))))) (org-link-set-parameters - "static" :export 'ennum-export-static) + "static" :export 'ennum-html-export-static) (org-link-set-parameters - "tangle" :export 'ennum-export-static) + "tangle" :export 'ennum-html-export-static) -(defun ennum-export-tag (tag desc backend) +(defun ennum-html-export-tag (tag desc backend) (pcase backend ((or 'ennum-html 'html) (xmlgen @@ -375,6 +377,6 @@ ,(or desc tag)))))) (org-link-set-parameters - "tag" :export 'ennum-export-tag) + "tag" :export 'ennum-html-export-tag) (provide 'ennum-html) |