Function: try-expand-whole-kill
try-expand-whole-kill is a byte-compiled function defined in
hippie-exp.el.gz.
Signature
(try-expand-whole-kill OLD)
Documentation
Try to complete text with something from the kill ring.
The argument OLD has to be nil the first call of this function, and t for subsequent calls (for further possible completions of the same string). It returns t if a new completion is found, nil otherwise.
Source Code
;; Defined in /usr/src/emacs/lisp/hippie-exp.el.gz
(defun try-expand-whole-kill (old)
"Try to complete text with something from the kill ring.
The argument OLD has to be nil the first call of this function, and t
for subsequent calls (for further possible completions of the same
string). It returns t if a new completion is found, nil otherwise."
(let ((expansion ()))
(if (not old)
(progn
(he-init-string (he-kill-beg) (point))
(if (not (he-string-member he-search-string he-tried-table))
(setq he-tried-table (cons he-search-string he-tried-table)))
(setq he-expand-list
(if (not (equal he-search-string ""))
kill-ring))
(setq he-search-loc2 ())))
(if (not (equal he-search-string ""))
(setq expansion (he-whole-kill-search he-search-string)))
(if (not expansion)
(progn
(if old (he-reset-string))
())
(progn
(he-substitute-string expansion)
t))))