Hi I'm new to emacs on the mac and i mistakenly pressed a couple of wrong buttons that caused some lines of text to highlight pink (see below).
Is there a way i can get rid of this highlighting? What exactly is it?

This is almost certainly caused by the dreaded "Secondary Selection." You likely did this by performing the command M-Drag-mouse-1 (i.e. accidentally holding down alt while selecting text with the mouse).
One of the highlights (if you'll excuse the pun) of reading the Emacs manual was figuring out exactly what this was and (more importantly) how to get rid of it: M-mouse-1 anywhere in any frame will clear the secondary selection overlay. Alternatively, this post points out that running the function (delete-overlay mouse-secondary-overlay) will also clear the highlight.
For me it looks like you have hit Ctrl+SPC. Thist stands for set-mark-command. Try pressing Ctrl+G.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With