0

I have this minor mode set to work on all buffers:

;; John Mercouris centered point mode
;; Homepage: https://github.com/jmercouris/emacs-centered-point

(define-minor-mode centered-point-mode "Alaways center the cursor in the middle of the screen." :lighter "..." (cond (centered-point-mode (add-hook 'post-command-hook 'line-change)) (t (remove-hook 'post-command-hook 'line-change))))

(defun line-change () (when (eq (get-buffer-window) (selected-window)) (recenter)))

(provide 'centeredpoint)

(centered-point-mode t)

This is close to what I want. I wished this was a global mode working on all buffers, except for the SLIME's REPL buffer.

How can I insert this exception in my config files?

What should I change on:

(centered-point-mode t)
Drew
  • 77,472
  • 10
  • 114
  • 243
Pedro Delfino
  • 1,489
  • 3
  • 16

1 Answers1

2

Something like

(add-hook 'slime-repl-mode-hook (lambda () (centered-point-mode -1)))

which toggles the mode off in slime REPLs.

Fran Burstall
  • 3,855
  • 11
  • 18