0

I would like to know, what function the combination C-u C-SPC calls, but when I am trying C-h k, the input just stops at C-u.

2
  • 1
    When you type C-u C-SPC, you first invoke universal-argument, then set-mark-command. That's all.
    – shynur
    Commented Jan 1 at 13:43
  • 1
    IOW, you do C-h k C-SPC to find what command is called by that key (set-mark-command in this case) and then do C-h f set-mark-command to see what the command does with a prefix argument (the C-u part).
    – NickD
    Commented Jan 1 at 15:31

1 Answer 1

2

Did you read what it tells you about C-u? It says something like this:

Begin a numeric argument for the following command.

Yadda yadda yadda, blah blah…

And what do you suppose the following command is? It’s whatever is bound to the key combo you type next. In your case, that is whatever C-SPC is bound to. Use C-h k to find out what command that is:

set-mark-command is an interactive and byte-compiled function defined
in simple.el.gz.

Signature
(set-mark-command ARG)

Documentation
Set the mark where point is, and activate it; or jump to the mark.

Setting the mark also alters the region, which is the text
between point and mark; this is the closest equivalent in
Emacs to what some editors call the "selection".

With no prefix argument, set the mark at point, and push the
old mark position on local mark ring.  Also push the new mark on
global mark ring, if the previous mark was set in another buffer.

When Transient Mark Mode is off, immediately repeating this
command activates transient-mark-mode temporarily.

With prefix argument (e.g., C-u C-SPC), jump to the mark, and set the mark from
position popped off the local mark ring (this does not affect the global
mark ring).  Use C-x C-@ to jump to a mark popped off the global
mark ring (see pop-global-mark).

If set-mark-command-repeat-pop is non-nil, repeating
the C-SPC command with no prefix argument pops the next position
off the local (or global) mark ring and jumps there.

With C-u C-u as prefix
argument, unconditionally set mark where point is, even if
set-mark-command-repeat-pop is non-nil.

Novice Emacs Lisp programmers often try to use the mark for the wrong
purposes.  See the documentation of set-mark for more information.

This one is pretty long and complicated, but if you look closely you can see what it does when there is a prefix argument. If you keep reading, you can even find out what it does when you give two prefix arguments.

Not the answer you're looking for? Browse other questions tagged or ask your own question.