You can clone with
(defmacro sacha/def-wordsearch (name docstring skip-syntax-function re-search-function)
`(defun ,name ()
(let ((cur (point)))
(let ((current-word (current-word)))
(message "Searching for word: %s" current-word)
(concat "\\_<" (regexp-quote current-word) "\\_>") nil t)
"Find the next occurrence of the current word."
"Find the previous occurrence of the current word."
(global-set-key '[M-up] 'sacha/search-word-backward)
(global-set-key '[M-down] 'sacha/search-word-forward)
Note: This also turns the body of both functions into a macro and introduces a call to message.