Function: reset-cdabbrev-window

reset-cdabbrev-window is a byte-compiled function defined in completion.el.gz.

Signature

(reset-cdabbrev-window &optional INITIALIZEP)

Documentation

Reset the cdabbrev search to search for abbrev-string.

Source Code

;; Defined in /usr/src/emacs/lisp/completion.el.gz
(defun reset-cdabbrev-window (&optional initializep)
  "Reset the cdabbrev search to search for abbrev-string."
  ;; Set the window
  (cond (initializep
	 (setq cdabbrev-current-window (selected-window)))
	((eq cdabbrev-current-window t)
	 ;; Everything has failed
	 (setq cdabbrev-current-window nil))
	(cdabbrev-current-window
	 (setq cdabbrev-current-window (next-window cdabbrev-current-window))
	 (if (eq cdabbrev-current-window (selected-window))
	     ;; No more windows, try other buffer.
	     (setq cdabbrev-current-window t))))
  (if cdabbrev-current-window
      (save-excursion
	(set-cdabbrev-buffer)
	(setq cdabbrev-current-point (point)
	      cdabbrev-start-point cdabbrev-current-point
	      cdabbrev-stop-point
	      (if completion-search-distance
		  (max (point-min)
		       (- cdabbrev-start-point completion-search-distance))
		  (point-min))
	      cdabbrev-wrapped-p nil))))