diff options
Diffstat (limited to 'lisp/cedet/cedet-idutils.el')
-rw-r--r-- | lisp/cedet/cedet-idutils.el | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lisp/cedet/cedet-idutils.el b/lisp/cedet/cedet-idutils.el index 562749dda00..7abf3c3320b 100644 --- a/lisp/cedet/cedet-idutils.el +++ b/lisp/cedet/cedet-idutils.el @@ -43,6 +43,11 @@ :type 'string :group 'cedet) +(defcustom cedet-idutils-make-command "mkid" + "Command name for the ID Utils executable for creating token databases." + :type 'string + :group 'cedet) + (defun cedet-idutils-search (searchtext texttype type scope) "Perform a search with ID Utils, return the created buffer. SEARCHTEXT is text to find. @@ -104,6 +109,20 @@ Return the created buffer with with program output." flags) b)) +(defun cedet-idutils-mkid-call (flags) + "Call ID Utils mkid with the list of FLAGS. +Return the created buffer with with program output." + (let ((b (get-buffer-create "*CEDET mkid*")) + (cd default-directory) + ) + (with-current-buffer b + (setq default-directory cd) + (erase-buffer)) + (apply 'call-process cedet-idutils-make-command + nil b nil + flags) + b)) + ;;; UTIL CALLS ;; (defun cedet-idutils-expand-filename (filename) @@ -171,6 +190,12 @@ return nil." (message "ID Utils %s - Good enough for CEDET." rev)) t))))) +(defun cedet-idutils-create/update-database (&optional dir) + "Create an IDUtils database in DIR. +IDUtils must start from scratch when updating a database." + (interactive "DDirectory: ") + (let ((default-directory dir)) + (cedet-idutils-mkid-call nil))) (provide 'cedet-idutils) |