I'd like to suggest adding a way to filter the methods displayed in the
For example, at work I have to edit C files which have the function
prototypes defined at the top of the file and the implementations at the
This means that everything appears twice in the methods buffer, but
since I never want to jump to the prototypes, they're only wasting space
in the methods buffer.
Attached is a patch that implements a basic version of this. It defines
a buffer local variable ecb-taglist-filter which is a function that is
called in ecb-post-process-taglist.
This should return a list of only those tags that are to be shown.
Adding the following to .emacs will make ecb ignore function prototypes:
(defun filter (predicate sequence)
"Filter out those elements of SEQUENCE for which PREDICATE returns nil."
(if (if predicate (funcall predicate (car sequence)) (car sequence))
(setq res (append res (list (car sequence)))))
(setq sequence (cdr sequence)))
(defun rw-ecb-methods-filter (taglist)
(filter '(lambda (x) (not (semantic-tag-get-attribute x 'prototype)))
(add-hook 'c-mode-common-hook '(lambda () (setq ecb-taglist-filter
Different filter functions can be defined to filter out functions by
I'm not sure if this will break ecb in some way, but it seems to work OK