I stumbled this thread and at first, it seems glorious, but I simply cannot get it to work. So when I try it on any program e.g.:
#include <iostream>
bool helloWorld(int a,int b){
dox<tab>
std::cout << a << b << std::endl;
return true
}
int main(){
std::cout << helloWorld(123, 321) std::endl;
return 0;
}
even though I have semantic-, doxy- and yas-mode enabled, it returns:
function: main (start)
[yas] Error running #[128 \302\300\303\301""\207 [eval ((progn (unless
(and (fboundp (quote semantic-current-tag)) semantic-mode)
(error Semantic required to use dox snippet)) (let ((tag
(senator-next-tag))) (while (or (null tag) (not (semantic-tag-of-class-p
tag (quote function)))) (setq tag (senator-next-tag))) (let* ((name
(semantic-tag-name tag)) (attrs (semantic-tag-attributes tag))
(args (plist-get attrs :arguments)) (return-name (plist-get attrs :type))
(idx 1)) (if (listp return-name) (setq return-name (car return-name)))
(yas/expand-snippet (format /**
* @brief ${1:%s}
*
%s
%s*/
name (mapconcat (lambda (x) (format * @param %s ${%d:Description of %s} (car x)
(incf idx) (car x))) args
) (if (and return-name (not (string-equal void return-name)))
(format * @return ${%d:%s}
(incf idx) return-name) ))))))) apply append] 6
(fn &rest ARGS2)]: Symbol’s function definition is void: incf
I'm currently running ubuntu 16.04 and emacs25