Function: ebrowse-electric-position-looper

ebrowse-electric-position-looper is a byte-compiled function defined in ebrowse.el.gz.

Signature

(ebrowse-electric-position-looper STATE CONDITION)

Documentation

Prevent moving point on invalid lines.

Called from Electric-command-loop. See there for the meaning of STATE and CONDITION.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ebrowse.el.gz
(defun ebrowse-electric-position-looper (state condition)
  "Prevent moving point on invalid lines.
Called from `Electric-command-loop'.  See there for the meaning
of STATE and CONDITION."
  (cond ((and condition
	      (not (memq (car condition) '(buffer-read-only
					   end-of-buffer
					   beginning-of-buffer))))
	 (signal (car condition) (cdr 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)))))