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)

(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)



1 Answer 1


Something like

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

which toggles the mode off in slime REPLs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.