Function: he-whole-kill-search
he-whole-kill-search is a byte-compiled function defined in
hippie-exp.el.gz.
Signature
(he-whole-kill-search STR)
Source Code
;; Defined in /usr/src/emacs/lisp/hippie-exp.el.gz
(defun he-whole-kill-search (str)
(let ((case-fold-search ())
(result ())
(str (regexp-quote str))
(killstr (car he-expand-list))
(pos -1))
(while (and (not result)
he-expand-list)
(if (not he-search-loc2)
(while (setq pos (string-match str killstr (1+ pos)))
(setq he-search-loc2 (cons pos he-search-loc2))))
(while (and (not result)
he-search-loc2)
(setq pos (car he-search-loc2))
(setq he-search-loc2 (cdr he-search-loc2))
(save-excursion
(goto-char he-string-beg)
(if (and (>= (- (point) pos) (point-min)) ; avoid some string GC
(eq (char-after (- (point) pos)) (aref killstr 0))
(search-backward (substring killstr 0 pos)
(- (point) pos) t))
(progn
(setq result (substring killstr pos))
(set-text-properties 0 (length result) () result))))
(if (and result
(he-string-member result he-tried-table))
(setq result nil))) ; ignore if already in table
(if (and (not result)
he-expand-list)
(progn
(setq he-expand-list (cdr he-expand-list))
(setq killstr (car he-expand-list))
(setq pos -1))))
result))