From 63e3a3e53f9794790b9e132eb1100427097aa6f1 Mon Sep 17 00:00:00 2001 From: Caleb Maclennan Date: Thu, 28 Jul 2022 11:01:00 +0300 Subject: [PATCH] chore(classes): Drop unused return code handled by Penlight constructor --- classes/base.lua | 1 - classes/bible.lua | 1 - classes/book.lua | 1 - classes/diglot.lua | 1 - classes/docbook.lua | 1 - classes/jbook.lua | 1 - classes/jplain.lua | 1 - classes/letter.lua | 1 - classes/markdown.lua | 1 - classes/pecha.lua | 1 - classes/plain.lua | 1 - classes/tplain.lua | 3 ++- classes/triglot.lua | 1 - 13 files changed, 2 insertions(+), 13 deletions(-) diff --git a/classes/base.lua b/classes/base.lua index 2016a4635..c51df53e9 100644 --- a/classes/base.lua +++ b/classes/base.lua @@ -63,7 +63,6 @@ function class:_init (options) end end) end) - return self end function class:_post_init () diff --git a/classes/bible.lua b/classes/bible.lua index e9112542a..0e572d9e1 100644 --- a/classes/bible.lua +++ b/classes/bible.lua @@ -187,7 +187,6 @@ function class:_init(options) self_:singleColumnMaster() end end) - return self end function class:endPage () diff --git a/classes/book.lua b/classes/book.lua index 2e2105115..3380f5eaf 100644 --- a/classes/book.lua +++ b/classes/book.lua @@ -48,7 +48,6 @@ function class:_init (options) stealFrom = { "content" } }) if not SILE.scratch.headers then SILE.scratch.headers = {} end - return self end function class:endPage () diff --git a/classes/diglot.lua b/classes/diglot.lua index 3f134bd57..ee63d5afe 100644 --- a/classes/diglot.lua +++ b/classes/diglot.lua @@ -13,7 +13,6 @@ function class:_init (options) self:declareFrame("b", { left = "52%pw", right = "100%pw-left(a)", top = "top(a)", bottom = "bottom(a)" }) self:declareFrame("folio",{ left = "left(a)", right = "right(b)", top = "bottom(a)+3%ph", bottom = "bottom(a)+8%ph" }) self:loadPackage("parallel", { frames = { left = "a", right = "b" } }) - return self end return class diff --git a/classes/docbook.lua b/classes/docbook.lua index 966e59a73..937d7a4a9 100644 --- a/classes/docbook.lua +++ b/classes/docbook.lua @@ -19,7 +19,6 @@ function class:_init (options) self:loadPackage("rules") self:loadPackage("verbatim") self:loadPackage("footnotes") - return self end function class.push (t, val) diff --git a/classes/jbook.lua b/classes/jbook.lua index 840de1c50..7cd2e5f53 100644 --- a/classes/jbook.lua +++ b/classes/jbook.lua @@ -8,7 +8,6 @@ function class:_init (options) SILE.languageSupport.loadLanguage("ja") SILE.settings:set("document.language", "ja", true) SILE.settings:set("font.family", "Noto Sans CJK JP", true) - return self end class.declareOptions = tbook.declareOptions diff --git a/classes/jplain.lua b/classes/jplain.lua index b9f2e5e86..b5350ef60 100644 --- a/classes/jplain.lua +++ b/classes/jplain.lua @@ -9,7 +9,6 @@ function class:_init (options) SILE.languageSupport.loadLanguage("ja") SILE.settings:set("document.language", "ja", true) SILE.settings:set("font.family", "Noto Sans CJK JP", true) - return self end return class diff --git a/classes/letter.lua b/classes/letter.lua index 0cbba7e9e..d812da98e 100644 --- a/classes/letter.lua +++ b/classes/letter.lua @@ -20,7 +20,6 @@ function class:_init (options) recipient = "", salutation = "" } - return self end function class:registerCommands () diff --git a/classes/markdown.lua b/classes/markdown.lua index 534ad884d..e2a997e73 100644 --- a/classes/markdown.lua +++ b/classes/markdown.lua @@ -26,7 +26,6 @@ function class:_init (options) book._init(self, options) self:loadPackage("url") self:loadPackage("image") - return self end function class:registerCommands () diff --git a/classes/pecha.lua b/classes/pecha.lua index 53ca17820..8138650e6 100644 --- a/classes/pecha.lua +++ b/classes/pecha.lua @@ -45,7 +45,6 @@ function class:_init(options) SILE.settings:set("typesetter.parfillskip", SILE.nodefactory.glue()) SILE.settings:set("document.parindent", SILE.nodefactory.glue()) end) - return self end function class:endPage() diff --git a/classes/plain.lua b/classes/plain.lua index 423aa567a..d27ad3652 100644 --- a/classes/plain.lua +++ b/classes/plain.lua @@ -35,7 +35,6 @@ function class:_init (options) base._init(self, options) self:loadPackage("bidi") self:loadPackage("folio") - return self end function class:declareOptions () diff --git a/classes/tplain.lua b/classes/tplain.lua index 727baecf2..55f30de72 100644 --- a/classes/tplain.lua +++ b/classes/tplain.lua @@ -13,6 +13,8 @@ class.defaultFrameset.content = { linecount = 30 } +-- The classes tplain and tbook inherit from plain and book respectively but also +-- have this bit in common; this makes it accessable function class:_t_common () self:loadPackage("font-fallback") self:loadPackage("hanmenkyoshi") @@ -28,7 +30,6 @@ end function class:_init (options) plain._init(self, options) class._t_common(self) - return self end function class:declareOptions () diff --git a/classes/triglot.lua b/classes/triglot.lua index d045c4076..eb4204c74 100644 --- a/classes/triglot.lua +++ b/classes/triglot.lua @@ -16,7 +16,6 @@ function class:_init (options) self:loadPackage("parallel", { frames = { left = "a", middle = "b", right= "c" } }) SILE.settings:set("linebreak.tolerance", 5000) SILE.settings:set("document.parindent", SILE.nodefactory.glue()) - return self end return class