else:
focus.call("doc:set:view-default", "textfill,whitespace,autospell")
focus.call("doc:set:fill-width", "72")
+
+ focus.call("doc:set:fill:start-re",
+ "^([^a-zA-Z0-9\\n]*$| *-| *- *\\[[ X]]| *#+| *\\*+| *[0-9]*\\.)"
+ )
+ focus.call("doc:set:fill:end-re",
+ "^([^a-zA-Z0-9\\n]*$| *-| *- *\\[[ X]]| *#+| *\\*+| *[0-9]*\\.)"
+ )
+
return edlib.Efallthrough
editor.call("global-set-command", "doc:appeared-config", config_appeared)
mark = mark.dup()
m = mark.dup()
re = focus.call("doc:get-attr", mark, "fill:start-re", ret='str')
+ if not re:
+ re = focus['fill:start-re']
if not re:
re = "^[^a-zA-Z0-9\n]*$"
focus.call("doc:EOL", -100, m)
m = mark.dup()
focus.call("doc:EOL", 100, m)
re = focus.call("doc:get-attr", mark, "fill:end-re", ret='str')
+ if not re:
+ re = focus['fill:end-re']
if not re:
re = "^[^a-zA-Z0-9\n]*$"
try:
# only one line, so prefix is all spaces but based on first line
prefix = focus.call("doc:get-attr", "fill:default-prefix",
m, ret='str')
+ if not prefix:
+ prefix = focus['fill:default-prefix']
if not prefix:
prefix = ""
# When a single line is being wrapped, all of these
# other lines.
repeating_prefix = focus.call("doc:get-attr", "fill:repeating-prefix",
m, ret='str')
+ if not repeating_prefix:
+ repeating_prefix = focus['fill:repeating-prefix']
if not repeating_prefix:
repeating_prefix=''
repeating_prefix += ' \t'