Skip to content

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Jan 26, 2021
1 parent bf29fbc commit c4d42de
Showing 1 changed file with 66 additions and 64 deletions.
130 changes: 66 additions & 64 deletions origami-parsers.el
Original file line number Diff line number Diff line change
Expand Up @@ -43,74 +43,12 @@

(require 'origami-util)

(defvar origami-parser-summary-alist)

(declare-function origami-fold-root-node "ext:origami.el")
(declare-function origami-fold-children "ext:origami.el")
(declare-function origami-fold-shallow-merge "ext:origami.el")

(defcustom origami-parser-alist
`((actionscript-mode . origami-java-parser)
(bat-mode . origami-batch-parser)
(c-mode . origami-c-parser)
(c++-mode . origami-c++-parser)
(clojure-mode . origami-clj-parser)
(cperl-mode . origami-c-style-parser)
(csharp-mode . origami-csharp-parser)
(dart-mode . origami-c-style-parser)
(emacs-lisp-mode . origami-elisp-parser)
(go-mode . origami-go-parser)
(java-mode . origami-java-parser)
(javascript-mode . origami-js-parser)
(js-mode . origami-js-parser)
(js2-mode . origami-js-parser)
(js3-mode . origami-js-parser)
(kotlin-mode . origami-java-parser)
(lisp-mode . origami-elisp-parser)
(lisp-interaction-mode . origami-elisp-parser)
(lua-mode . origami-lua-parser)
(markdown-mode . origami-markdown-parser)
(objc-mode . origami-objc-parser)
(org-mode . origami-org-parser)
(perl-mode . origami-c-style-parser)
(php-mode . origami-java-parser)
(python-mode . origami-python-parser)
(rjsx-mode . origami-js-parser)
(rust-mode . origami-rust-parser)
(scala-mode . origami-scala-parser)
(sh-mode . origami-sh-parser)
(triple-braces . ,(origami-markers-parser "{{{" "}}}"))
(typescript-mode . origami-js-parser))
"alist mapping major-mode to parser function."
:type 'hook
:group 'origami)

(defcustom origami-parser-summary-alist
`((actionscript-mode . origami-javadoc-summary)
(bat-mode . origami-batch-summary)
(c-mode . origami-c-summary)
(c++-mode . origami-c-summary)
(csharp-mode . origami-csharp-vsdoc-summary)
(go-mode . origami-go-summary)
(java-mode . origami-javadoc-summary)
(javascript-mode . origami-javadoc-summary)
(js-mode . origami-javadoc-summary)
(js2-mode . origami-javadoc-summary)
(js3-mode . origami-javadoc-summary)
(kotlin-mode . origami-javadoc-summary)
(lua-mode . origami-lua-doc-summary)
(markdown-mode . origami-markdown-summary)
(objc-mode . origami-c-summary)
(org-mode . origami-org-summary)
(php-mode . origami-javadoc-summary)
(python-mode . origami-python-doc-summary)
(rjsx-mode . origami-javadoc-summary)
(rust-mode . origami-rust-doc-summary)
(scala-mode . origami-javadoc-summary)
(sh-mode . origami-javadoc-summary)
(typescript-mode . origami-javadoc-summary))
"Alist mapping major-mode to doc parser function."
:type 'hook
:group 'origami)

;;
;; (@* "Utility" )
;;
Expand Down Expand Up @@ -637,6 +575,42 @@ See function `origami-python-parser' description for argument CREATE."
(1- (line-beginning-position)))))))
(origami-build-pair-tree create "#[+]BEGIN_SRC" "#[+]END_SRC" positions))))

(defcustom origami-parser-alist
`((actionscript-mode . origami-java-parser)
(bat-mode . origami-batch-parser)
(c-mode . origami-c-parser)
(c++-mode . origami-c++-parser)
(clojure-mode . origami-clj-parser)
(cperl-mode . origami-c-style-parser)
(csharp-mode . origami-csharp-parser)
(dart-mode . origami-c-style-parser)
(emacs-lisp-mode . origami-elisp-parser)
(go-mode . origami-go-parser)
(java-mode . origami-java-parser)
(javascript-mode . origami-js-parser)
(js-mode . origami-js-parser)
(js2-mode . origami-js-parser)
(js3-mode . origami-js-parser)
(kotlin-mode . origami-java-parser)
(lisp-mode . origami-elisp-parser)
(lisp-interaction-mode . origami-elisp-parser)
(lua-mode . origami-lua-parser)
(markdown-mode . origami-markdown-parser)
(objc-mode . origami-objc-parser)
(org-mode . origami-org-parser)
(perl-mode . origami-c-style-parser)
(php-mode . origami-java-parser)
(python-mode . origami-python-parser)
(rjsx-mode . origami-js-parser)
(rust-mode . origami-rust-parser)
(scala-mode . origami-scala-parser)
(sh-mode . origami-sh-parser)
(triple-braces . ,(origami-markers-parser "{{{" "}}}"))
(typescript-mode . origami-js-parser))
"alist mapping major-mode to parser function."
:type 'hook
:group 'origami)

;;
;; (@* "Summary" )
;;
Expand Down Expand Up @@ -777,5 +751,33 @@ type of content by checking the word boundary's existence."
summary (propertize summary 'face 'origami-fold-replacement-face))))
summary))

(defcustom origami-parser-summary-alist
`((actionscript-mode . origami-javadoc-summary)
(bat-mode . origami-batch-summary)
(c-mode . origami-c-summary)
(c++-mode . origami-c-summary)
(csharp-mode . origami-csharp-vsdoc-summary)
(go-mode . origami-go-summary)
(java-mode . origami-javadoc-summary)
(javascript-mode . origami-javadoc-summary)
(js-mode . origami-javadoc-summary)
(js2-mode . origami-javadoc-summary)
(js3-mode . origami-javadoc-summary)
(kotlin-mode . origami-javadoc-summary)
(lua-mode . origami-lua-doc-summary)
(markdown-mode . origami-markdown-summary)
(objc-mode . origami-c-summary)
(org-mode . origami-org-summary)
(php-mode . origami-javadoc-summary)
(python-mode . origami-python-doc-summary)
(rjsx-mode . origami-javadoc-summary)
(rust-mode . origami-rust-doc-summary)
(scala-mode . origami-javadoc-summary)
(sh-mode . origami-javadoc-summary)
(typescript-mode . origami-javadoc-summary))
"Alist mapping major-mode to doc parser function."
:type 'hook
:group 'origami)

(provide 'origami-parsers)
;;; origami-parsers.el ends here

0 comments on commit c4d42de

Please sign in to comment.