[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: inhibit-message, "Beginning of buffer" / "End of buffer" messages
From: |
Michael Heerdegen |
Subject: |
Re: inhibit-message, "Beginning of buffer" / "End of buffer" messages |
Date: |
Thu, 24 Dec 2015 17:45:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
John Magolske <listmail@b79.net> writes:
> Hi,
>
> I'd like to suppress the "Beginning of buffer" / "End of buffer"
> messages that show up when the cursor in the minibuffer is moved all
> the way to the left & all the way to the right. It seems that setting
> "inhibit-message" might take care of this, but I'm having no luck with
These "messages" are actually errors, so `inhibit-message' has no effect
(and I think you would regret sooner or later when setting
`inhibit-message' globally to t).
AFAICT there is no user option to achieve what you want. I would try it
like this:
--8<---------------cut here---------------start------------->8---
(defun my-ignore-bet-end-of-buffer--around-ad (f &rest args)
(condition-case nil
(apply f args)
((beginning-of-buffer end-of-buffer))))
(advice-add 'left-char :around
#'my-ignore-bet-end-of-buffer--around-ad)
(advice-add 'right-char :around
#'my-ignore-bet-end-of-buffer--around-ad)
--8<---------------cut here---------------end--------------->8---
Regards,
Michael.