Fanael / edit-indirect

Edit regions in separate buffers
99 stars 23 forks source link

feat: allow to set major mode directly #21

Closed Fuco1 closed 2 years ago

Fanael commented 2 years ago

I'm afraid this change is not entirely correct: it will change the major mode of the edit-indirect buffer even if edit-indirect-region is called with a region that already has an active edit-indirect buffer, not just when a buffer is created. Or is this the intended, if potentially confusing, behavior?

At any rate, I'm not sure integrating this functionality into this package is necessary; does it do anything that binding edit-indirect-guess-mode-function or simply calling the major mode on the buffer returned from edit-indirect-region doesn't do? Is there some motivation behind it that I'm missing?

Fuco1 commented 2 years ago

I felt lazy with the re-binding since then you would potentially need to handle the scope (like buffer-local variables). But I guess I can simply set the mode on the returned buffer. :D Honestly I didn't even think of that.

I'll close.