diff options
Diffstat (limited to 'common/.config')
-rw-r--r-- | common/.config/emacs/init.el.org | 56 |
1 files changed, 30 insertions, 26 deletions
diff --git a/common/.config/emacs/init.el.org b/common/.config/emacs/init.el.org index 3066ba7..34a6f7e 100644 --- a/common/.config/emacs/init.el.org +++ b/common/.config/emacs/init.el.org @@ -312,32 +312,30 @@ Install a better PDF viewer than =DocView=. Install and configure =eat= as a terminal emulator in Emacs with =eshell= as a shell. #+begin_src emacs-lisp - (require 'eshell) - :init ;; Overwrite a default function that makes the prompt editable for some reason - (defun eshell-emit-prompt () - "Emit a prompt if eshell is being used interactively." - (when (boundp 'ansi-color-context-region) - (setq ansi-color-context-region nil)) - (run-hooks 'eshell-before-prompt-hook) - (if (not eshell-prompt-function) - (set-marker eshell-last-output-end (point)) - (let ((prompt (funcall eshell-prompt-function))) - (add-text-properties - 0 (length prompt) - (if eshell-highlight-prompt - '( read-only t - field prompt - font-lock-face eshell-prompt - front-sticky (read-only field font-lock-face) - rear-nonsticky (read-only field font-lock-face)) - '( read-only t - field prompt - front-sticky (read-only field font-lock-face) - rear-nonsticky (read-only field font-lock-face))) - prompt) - (eshell-interactive-filter nil prompt))) - (run-hooks 'eshell-after-prompt-hook)) + (eval-after-load "em-prompt" '(defun eshell-emit-prompt () + "Emit a prompt if eshell is being used interactively." + (when (boundp 'ansi-color-context-region) + (setq ansi-color-context-region nil)) + (run-hooks 'eshell-before-prompt-hook) + (if (not eshell-prompt-function) + (set-marker eshell-last-output-end (point)) + (let ((prompt (funcall eshell-prompt-function))) + (add-text-properties + 0 (length prompt) + (if eshell-highlight-prompt + '( read-only t + field prompt + font-lock-face eshell-prompt + front-sticky (read-only field font-lock-face) + rear-nonsticky (read-only field font-lock-face)) + '( read-only t + field prompt + front-sticky (read-only field font-lock-face) + rear-nonsticky (read-only field font-lock-face))) + prompt) + (eshell-interactive-filter nil prompt))) + (run-hooks 'eshell-after-prompt-hook))) (use-package eat :init @@ -530,7 +528,13 @@ Configure =emms= as a music player. emms-browser-thumbnail-small-size 64 emms-browser-thumbnail-medium-size 128 emms-browser-thumbnail-large-size 256) - (emms-librefm-scrobbler-enable)) + :hook + (emms-browser-mode . (lambda () + (if (not emms-librefm-scrobbler-session-id) + (emms-librefm-scrobbler-enable)))) + (emms-playlist-mode . (lambda () + (if (not emms-librefm-scrobbler-session-id) + (emms-librefm-scrobbler-enable))))) #+end_src * Languages |