Skip to content

Commit

Permalink
Remove some unused hippie-expand code
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Dec 17, 2015
1 parent 4c6a38e commit d010d30
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions lisp/init-lisp.el
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,6 @@
;; Hippie-expand
;; ----------------------------------------------------------------------------

(defun my/emacs-lisp-module-name ()
"Search the buffer for `provide' declaration."
(save-excursion
(goto-char (point-min))
(when (search-forward-regexp "^(provide '" nil t)
(symbol-name (symbol-at-point)))))

;; Credit to Chris Done for this one.
(defun my/try-complete-lisp-symbol-without-namespace (old)
"Hippie expand \"try\" function which expands \"-foo\" to \"modname-foo\" in elisp."
(unless old
(he-init-string (he-lisp-symbol-beg) (point))
(when (string-prefix-p "-" he-search-string)
(let ((mod-name (my/emacs-lisp-module-name)))
(when mod-name
(setq he-expand-list (list (concat mod-name he-search-string)))))))
(when he-expand-list
(he-substitute-string (car he-expand-list))
(setq he-expand-list nil)
t))

(defun set-up-hippie-expand-for-elisp ()
"Locally set `hippie-expand' completion functions for use with Emacs Lisp."
(make-local-variable 'hippie-expand-try-functions-list)
Expand Down

0 comments on commit d010d30

Please sign in to comment.