Improve narf|update-scratch-buffer-cwd
This commit is contained in:
parent
83c0909920
commit
8fa7dc7802
1 changed files with 4 additions and 3 deletions
|
@ -205,11 +205,12 @@ Examples:
|
||||||
(defun narf|enable-hard-wrap ()
|
(defun narf|enable-hard-wrap ()
|
||||||
(turn-on-auto-fill))
|
(turn-on-auto-fill))
|
||||||
|
|
||||||
(defun narf|update-scratch-buffer-cwd () ; see core-editor.el
|
(defun narf|update-scratch-buffer-cwd (&optional dir) ; see core-editor.el
|
||||||
"Make sure scratch buffer is always 'in a project.'"
|
"Make sure scratch buffer is always 'in a project.'"
|
||||||
(let ((dir (narf/project-root)))
|
(let ((dir (or dir (narf/project-root))))
|
||||||
(with-current-buffer (get-buffer-create "*scratch*")
|
(with-current-buffer (get-buffer-create "*scratch*")
|
||||||
(cd dir))))
|
(setq default-directory dir)
|
||||||
|
(setq header-line-format (concat " ∴ " dir)))))
|
||||||
|
|
||||||
|
|
||||||
;;;; Global Defuns ;;;;;;;;;;;;;;;;;;;;;
|
;;;; Global Defuns ;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue