>>18262
>>18254
I might have badly expressed myself. Look at the webm (i think its dark because HDR is turned on, sorry), it shows the function displayed in my question at work.
1. I press F5
2. The function checks the major mode I'm in
3. It displays compiling options that fit the major mode in the minibuffer, which I've set up beforehand in the function
4. After I select one compiling option it:
- Spawns an eshell window (ideally i'd reuse one if it already exists but i was having issues with it)
- Executes the command inside the eshell (for example: in the case of a C program and the option I've selected in the minibuffer, make run)
- Switches back to the previous window once the program exits
NOTE: I'd like to expand the "compiling options" later with more things to pick, so ideally I wouldn't attach the command I want to run directly to which major mode I'm currently in at the time.
Is there a better way to make a function that does that in a simpler way?
>code is pretty terrible
Yes, I know. It does work like I wanted it to, but like I said, I needed to tard wrang deepseek to get there because I'm not experienced enough to do it alone.
>code review
Message too long. Click
here
to view full text.