15 lines
644 B
Bash
Executable File
15 lines
644 B
Bash
Executable File
#!/bin/bash
|
|
# Launch Emacs in terminal mode with portfolio tracker
|
|
|
|
EMACS_NO_DESKTOP=1 emacs -nw --eval "(progn
|
|
(when (fboundp 'portfolio-tracker)
|
|
;; Quit Emacs when portfolio tracker buffer is killed
|
|
(add-hook 'tabulated-list-mode-hook
|
|
(lambda ()
|
|
(when (string-match-p \"\\*Portfolio Tracker\\*\" (buffer-name))
|
|
(add-hook 'kill-buffer-hook
|
|
(lambda ()
|
|
(when (string-match-p \"\\*Portfolio Tracker\\*\" (buffer-name))
|
|
(kill-emacs)))
|
|
nil t))))
|
|
(portfolio-tracker)))" |