1

I learnt that C-u default is to repeat 4 times.

For example: C-u t is input tttt

However, when I type C-u M-x, it prompts a function list

enter image description here

What does invoking C-u mean here?

  • 2
    It's the "prefix argument", an interactive function (a.k.a. command, something that you usually run by pressing M-x) can use this argument to change its behavior. It is useful for commands that would normally be bound to some key and would not ask for your input interactively after being called. However, it is entirely within the purview of the author of the command how to interpret the argument. Often times its the number of repetitions of the command, but it could be something else entirely. – wvxvw Jan 2 at 7:12
  • 1
    ty, could you please transmit the comment to answer. @wvxvw – user10726006 Jan 2 at 8:16
  • Presumably, you must have some package installed that alters the behaviour of M-x. Normally, M-x runs the command execute-extended-command, which does nothing but run the named command. If you give it a prefix with C-u, that information is merely passed to the executed command. execute-extended-command itself doesn't do anything else with it. – Harald Hanche-Olsen Jan 2 at 9:43
  • ty, very clear. @HaraldHanche-Olsen – user10726006 Jan 2 at 10:07
  • so C-x is internal command, M-x is extended command? @HaraldHanche-Olsen – user10726006 Jan 2 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.