** help-follow-symbol now signals 'user-error' if point (or the
position pointed to by the argument POS) is not in a symbol.
+---
+*** next-buffer and previous-buffer now signal 'user-error' if there
+is no buffer to switch to.
+
\f
* Lisp Changes in Emacs 27.1
(user-error "Window is strongly dedicated to its buffer"))
(t
(dotimes (_ (or arg 1))
- (switch-to-next-buffer)))))
+ (unless (switch-to-next-buffer)
+ (user-error "No next buffer"))))))
(defun previous-buffer (&optional arg)
"In selected window switch to ARGth previous buffer.
(user-error "Window is strongly dedicated to its buffer"))
(t
(dotimes (_ (or arg 1))
- (switch-to-prev-buffer)))))
+ (unless (switch-to-prev-buffer)
+ (user-error "No previous buffer"))))))
(defun delete-windows-on (&optional buffer-or-name frame)
"Delete all windows showing BUFFER-OR-NAME.