News for hackers. Stuff that matters.
Re:The evolution of a structural code editor by kagevf on Tuesday January 07, 2025 @01:20PM (#42625516)
With built-in emacs functionality you can do:

1. Place the cursor on the left parenthesis of the form (same as you wrote)

2. C-M-Space to select the form.

3. M-( to surrond with parenthesis.

4. type "if flag" (same as you wrote for #3)

One extra step, but no need for a plugin.

Also, I added a simple "insert-quotes" that I think I mostly copy-pasted from the built-in "insert-parentheses":

  (defun insert-quotes (&optional arg)
    (interactive "P")
    (insert-pair arg ?\" ?\"))
So I can replace my #3 above to wrap something with quotes instead of parentheses.
Re:The evolution of a structural code editor by lispm on Tuesday January 07, 2025 @04:57PM (#42628120)
> So I can replace my #3 above to wrap something with quotes instead of parentheses.

That's M-" .

Re:The evolution of a structural code editor by kagevf on Tuesday January 07, 2025 @06:20PM (#42628932)
Interesting, I did not know that! But, the one I wrote mimics how insert-parentheses works, so I will probably stick to my version.