C-g runs the command keyboard-quit (found in global-map), which is an interactive compiled Lisp function in ‘simple.el’.
It is bound to C-g.
:around advice: ‘ad-Advice-keyboard-quit’
Signal a ‘quit’ condition. During execution of Lisp code, this character causes a quit directly. At top-level, as an editor command, this simply beeps.