I'm very new to programming in Elisp so maybe the mistake is there but I'm completely stuck right now.
I wanted to make a small, simple Elisp function to remove the AUTOs from my Verilog files so I don't commit those lines to our git repository since the rest of my team doesn't use Emacs. I thought this would be a very simple task but for the life of me, I can't get flush-lines
to work properly.
The regular expression I'm trying to use is \/\*AUTO\w+\*/
. When I do M-x flush-lines RET \/\*AUTO\w+\*/ RET
this works. So I would think the regular expression works. But when I try to do it in either my .emacs or by doing M-: (flush-lines "\/\*AUTO\w+\*/" nil (buffer-size) t) RET
, it just outputs a nil
. I also tried (flush-lines "\/\*AUTO\w+\*/")
and (flush-lines "\/\*AUTO\w+\*/" nil (buffer-size))
and they both just output nil
and don't remove the matching lines. My point is set to the top of the buffer, so I don't understand what the issue is. I can't seem to find anywhere any resources that could point me in the right direction. The closest I found was this post from a couple years ago but it goes far beyond the simple task I'm trying to do, and I seem to be suffering from a different issue than that user was.