Hi, I’m new to emacs and trying to get my way through the cc-mode for editing c/c++ files in the manual, it says to activate h cc-mode using the ``c-mode`` symbol and use ``C-M-a`` keybinding to move to beginning of the function, but when I do it, it says ``M-a undefined`` in the mini-buffer. How do I fix it. I have tried look in the manual and net but could get any lead…

1 point

C-M-a means “hold control and meta at the same time and then press a”.

C-h k (hold control, press h, let go of h and control, press k) followed by key presses will tell you what emacs saw and what function it will run.

permalink
report
reply
1 point

yea bruv did that but getting the message, ``M-ā is undefined``. Do I require to make changes to my init file?

permalink
report
parent
reply
1 point

What OS, keyboard layout, and Emacs version?

permalink
report
parent
reply
1 point

I had a similar issue on my windows work computer. In the keyboard layout “C-M-e” was translated into ‘€’ . I simply rebound ‘€’ to be forward-defun as I don’t type that ever, and if I for some reason wanted to I guess I could do “C-q €”

permalink
report
parent
reply
1 point

M-a undefined
M-ā is undefined

which is it?

If it’s the latter, it sounds like your Ctrl key is acting like a Compose key of some kind, such that C-a produces ā. That sounds super-weird to me (I wouldn’t expect any OS to take over the Ctrl modifier in this way), but it would be happening outside of Emacs and anything is possible.

If it’s the former then it seems that the Ctrl key hasn’t registered, which would also be a problem which is external to Emacs.

permalink
report
reply

Emacs

!emacs@communick.news

Create post

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

  • Windows
  • Mac OS X
  • GNU/Linux and BSD (Just get it from your distribution’s package manager)

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for “emacs” and “vi” link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

Community stats

  • 18

    Monthly active users

  • 562

    Posts

  • 2.4K

    Comments