Skip to content

Instantly share code, notes, and snippets.

@DanielDe
Created May 11, 2024 17:29
Show Gist options
  • Save DanielDe/afe396b5645cbbceae370ce3b6da27e4 to your computer and use it in GitHub Desktop.
Save DanielDe/afe396b5645cbbceae370ce3b6da27e4 to your computer and use it in GitHub Desktop.
Basic Elisp syntax
;; Defines a function named `foo`.
(defun foo ()
(interactive) ;; Makes the function show up in `M-x`.
(bar) ;; Calls a function named `bar`.
(baz 1)) ;; Calls a function named `baz` with an argument of `1`.
;; Binds the `foo` function to a global hotkey.
(global-set-key (kbd "C-c p") 'foo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment