Defining Macros

Where Does Emacs Get Its Name?

The ability to define and use macros is a key feature of Emacs, whose name comes from the words Editor MACroS. Initially Emacs began as a set of macros, written by Guy Steele, for the TECO editor on a PDP-10. Richard M. Stallman, founder of the GNU Project and President of the Free Software Foundation, developed these initial macros into the Emacs utility.

One of the main things that computers are much better at than humans is trivial, repetitive work. Emacs has macros that help you to do such tasks. A macro is a facility that enables you to record a sequence of keystrokes for later playback.

How to record a macro

1.
To start recording, enter Ctrl+x.
2.
Make the keystrokes that you wish to record. ...

Get Practical UNIX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.