Skip to content

Commit

Permalink
Merge pull request #73 from bbbscarter/master
Browse files Browse the repository at this point in the history
Fix for issue with justl-pop-to-buffer-on-display
  • Loading branch information
psibi authored Dec 12, 2024
2 parents 16b6ed5 + b375349 commit 1c3d055
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Changelog.org
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
- Justl buffer names are changed to include filename too. This is made
in preparation for supporting just modules.
- Add ~justl-pop-to-buffer-on-display~. When on, input focus moves to the justl
buffer when it is displayed (the previous behavior). Otherwise the buffer is
displayed without selecting it. (defaults to on).
output buffer when it is displayed (the previous behavior). Otherwise the
output buffer is displayed without selecting it. (defaults to on).
- Better defgroup integration.

* 0.14
Expand Down
9 changes: 3 additions & 6 deletions justl.el
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ package to be installed."
:group 'justl)

(defcustom justl-pop-to-buffer-on-display t
"If non-nil, selects the justl buffer when it is displayed.
If nil, displays the buffer without selecting it."
"If non-nil, selects the justl output buffer when it is displayed.
If nil, displays the output buffer without selecting it."
:type 'boolean
:group 'justl
:safe 'booleanp)
Expand All @@ -153,10 +153,7 @@ If nil, displays the buffer without selecting it."
"Utility function to pop to buffer or create it.
NAME is the buffer name."
(let ((buf (get-buffer-create name)))
(if justl-pop-to-buffer-on-display
(pop-to-buffer-same-window buf)
(display-buffer buf display-buffer--same-window-action))))
(pop-to-buffer-same-window (get-buffer-create name)))

(defconst justl--process-buffer "*just-process*"
"Just process buffer name.")
Expand Down

0 comments on commit 1c3d055

Please sign in to comment.