Skip to content

Boruch-Baum/emacs-keypress-multi-event

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

keypress-multi-event

keypress-multi-eventhttps://melpa.org/packages/keypress-multi-event-badge.svghttps://stable.melpa.org/packages/keypress-multi-event-badge.svg

This package for emacs provides a method to define multiple functions to be performed for the same keypress. You can use this as a convenience feature to toggle among several functions. It was originally written as the back-end for package `home-end’, allowing those two keys to smartly cycle between moving POINT to the beginning/end of a line, the beginning/end of the window, the beginning/end of the buffer, and back to POINT.

Create a function which calls `keypress-multi-event’ with a list of the functions to be associated with the keypress, and bind that keypress to that function. By default, subsequent keypresses cycle through the list, but you can change that behavior by optionally adding an index into the list as a second argument, or you could also directly manipulate the underlying buffer-local variable `keypress-multi-event–state’. Both methods are illustrated in package `home-end’.

Dependencies

None.

Installation

Option 1: From within emacs, via MELPA

Option 2: From your distribution’s package manager

  • Debian has expressed an interest in providing a debian package for this repository, along with that of my related `home-end` repo. Stay tuned.
  • If you know of other distributions that make a similar decision, please let me know.

Option 3: Manual install

  • Download the `.el` file to somewhere on your emacs `load-path`.
  • `load`, `require`, `use-package`, or evaluate the file contents, as you desire.

Some other Emacs software by this author

About

emacs: perform different actions when repeating a key

Resources

License

Stars

Watchers

Forks

Packages

No packages published