Skip to content

Commit

Permalink
export with-current-buffer and with-buffer-point, close #1152
Browse files Browse the repository at this point in the history
  • Loading branch information
kchanqvq committed Nov 6, 2023
1 parent ab6475c commit 6706736
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/base/buffer.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -390,3 +390,7 @@ Options that can be specified by arguments are ignored if `temporary` is NIL and

(defmacro with-buffer-point ((buffer point) &body body)
`(call-with-buffer-point ,buffer ,point (lambda () ,@body)))

(defmacro with-current-buffer (buffer-or-name &body body)
`(let ((*current-buffer* (get-buffer ,buffer-or-name)))
,@body))
4 changes: 3 additions & 1 deletion src/base/package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@
:buffer-disable-undo-boundary
:buffer-value
:buffer-unbound
:clear-buffer-variables)
:clear-buffer-variables
:with-buffer-point
:with-current-buffer)
;; buffer-insert.lisp
(:export
:*inhibit-read-only*
Expand Down

0 comments on commit 6706736

Please sign in to comment.