nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] Should we rename and untypedef nano's structs?


From: Devin Hussey
Subject: [Nano-devel] Should we rename and untypedef nano's structs?
Date: Sun, 19 Aug 2018 10:30:06 -0400

nano's struct types are weird, and the typedefs are inconsistent with
the snake case and themselves. Some of them are extremely confusing.

filestruct is a useless typedef that saves a single space, and doesn't
represent a file itself, rather a line/node.
openfilestruct is the actual filestruct.
sc is shortcut, but it doesn't look like it.
subnfunc... what the hell does subn mean? It is supposed to be for
menu shortcuts.
colortype is for syntax definitions, and the name implies a primitive
instead of a rather large struct.

So my ideas:

filestruct -> struct node, struct line
openfilestruct -> struct file, struct open_file, struct buffer
sc -> struct kbd_shortcut, struct shortcut
subnfunc -> struct menu_shortcut
colortype -> struct syntax_rule, struct syntax_def, struct syntax_color
regexlisttype -> struct regex_list
syntaxtype -> struct syntax_family, struct syntax_lang[uage], struct
syntax_class
partition -> struct visible_nodes, something, idk
poshiststruct -> struct position_hist[ory]
undo -> struct undo, struct undo_step
undo_group -> struct undo_group

We could keep the typedef structs in, but I find it doesn't help in snake case.

Additionally, fileage should be renamed, it also doesn't make sense.

Do you have any thoughts about this?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]