Function: make-hippie-expand-function
make-hippie-expand-function is an autoloaded and byte-compiled
function defined in hippie-exp.el.gz.
Signature
(make-hippie-expand-function TRY-LIST &optional VERBOSE)
Documentation
Construct a function similar to hippie-expand.
Make it use the expansion functions in TRY-LIST. An optional second argument VERBOSE non-nil makes the function verbose.
Probably introduced at or before Emacs version 20.3.
Source Code
;; Defined in /usr/src/emacs/lisp/hippie-exp.el.gz
;; For the real hippie-expand enthusiast: A macro that makes it
;; possible to use many functions like hippie-expand, but with
;; different try-functions-lists.
;; Usage is for example:
;; (fset 'my-complete-file (make-hippie-expand-function
;; '(try-complete-file-name-partially
;; try-complete-file-name)))
;; (fset 'my-complete-line (make-hippie-expand-function
;; '(try-expand-line
;; try-expand-line-all-buffers)))
;;
;;;###autoload
(defun make-hippie-expand-function (try-list &optional verbose)
"Construct a function similar to `hippie-expand'.
Make it use the expansion functions in TRY-LIST. An optional second
argument VERBOSE non-nil makes the function verbose."
(lambda (arg)
(:documentation
(concat
"Try to expand text before point, using the following functions: \n"
(mapconcat #'prin1-to-string try-list ", ")))
(interactive "P")
(let ((hippie-expand-try-functions-list try-list)
(hippie-expand-verbose verbose))
(hippie-expand arg))))