Function: ebrowse-electric-list-looper
ebrowse-electric-list-looper is a byte-compiled function defined in
ebrowse.el.gz.
Signature
(ebrowse-electric-list-looper STATE CONDITION)
Documentation
Prevent cursor from moving beyond the buffer end.
Don't let it move into the title lines.
See Electric-command-loop for a description of STATE and CONDITION.
Aliases
ebrowse-electric-position-looper
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/ebrowse.el.gz
(defun ebrowse-electric-list-looper (state condition)
"Prevent cursor from moving beyond the buffer end.
Don't let it move into the title lines.
See `Electric-command-loop' for a description of STATE and CONDITION."
;; NOTE: This code looks very much like `electric-buffer-menu-looper'.
(cond ((and condition
(not (or (error-has-type-p condition 'buffer-read-only)
(error-has-type-p condition 'end-of-buffer)
(error-has-type-p condition 'beginning-of-buffer))))
(signal condition))
((< (point) (car state))
(goto-char (point-min))
(forward-line 2))
((> (point) (cdr state))
(goto-char (point-max))
(forward-line -1)
(if (pos-visible-in-window-p (point-max))
(recenter -1)))))