Handle editing and non-editing patterns separately as a whole

This is generally cleaner.

Use lists to hold both patterns for a buffer.  Rename functions and the
variable accordingly