Skip to content

Commit

Permalink
Merge pull request #1263 from vindarel/main
Browse files Browse the repository at this point in the history
add indent-current-buffer
  • Loading branch information
cxxxr authored Jan 19, 2024
2 parents 94a5f88 + 1f33a6f commit 327db82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/commands/buffer.lisp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(defpackage :lem-core/commands/buffer
(:use :cl :lem-core)
(:export :*read-only-function*
:indent-current-buffer
:toggle-read-only
:rename-buffer
:unmark-buffer))
Expand All @@ -11,6 +12,10 @@
(define-key *global-keymap* "C-x C-q" 'toggle-read-only)
(define-key *global-keymap* "M-~" 'unmark-buffer)

(define-command indent-current-buffer () ()
"Indent the current buffer."
(indent-buffer (current-buffer)))

(define-command toggle-read-only () ()
"Toggle the buffer read-only."
(setf (buffer-read-only-p (current-buffer))
Expand Down

0 comments on commit 327db82

Please sign in to comment.