emacs-helm/helm — pull request #777 by tuhdo (2014-12-24 06:26:41+00:00)
Title: Fix a bug in helm-semantic

Currently, helm-semantic-source inserts tag candidates in its own
buffer. This causes a problem: semantic-format-tag-summarize adds
pointer information with characters like * and &, specific to C and C++
modes. However, since the function is called in helm buffer created
by (helm-candidate-buffer 'global), it is in fundamental-mode and cannot
insert tag string correctly. Pointer information with characters * and &
is stripped. To reproduce this bug:

- Create an empty C or C++ file and insert only this line:

const char**** filename;

Then, run helm-semantic. The candidate is displayed as:

const char filename;

This change fixes this problem by setting the Helm buffer to the actual
major mode of the current code buffer. The function
helm-semantic-get-candidates because it calls
helm-semantic--fetch-candidates again, after being called once the
initform in helm-source-semantic.