add way to open scratch buffer on right with a prompt on major mode to use
This commit is contained in:
parent
1a2bb74a1a
commit
2963e3c323
|
@ -62,6 +62,27 @@
|
|||
)
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; open text-mode scratch in right side window
|
||||
(defun kmn/scratch-prompt-on-right (&optional dir_path)
|
||||
(defvar parameters
|
||||
'(window-parameters . ((no-other-window . t)
|
||||
(no-delete-other-windows . t))))
|
||||
|
||||
(setq fit-window-to-buffer-horizontally t)
|
||||
(setq window-resize-pixelwise t)
|
||||
|
||||
"Display `default-directory' in side window on left, hiding details."
|
||||
(interactive)
|
||||
(let ((buffer (scratch (let ((current-prefix-arg t)) (scratch--buffer-querymode)))))
|
||||
(display-buffer-in-side-window
|
||||
buffer `((side . right) (slot . -1)
|
||||
(window-width . fit-window-to-buffer)
|
||||
, parameters)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; quick reference notes as a pop up window
|
||||
(defun kmn/popwin-quick-ref ()
|
||||
|
|
Reference in a new issue