New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
helm-imenu-in-all-buffers in separate sources (#1705). #1707
Conversation
* helm-imenu.el (helm-imenu-in-all-buffers-separate-sources): New user var. (helm-imenu-collect-sources-from-all-buffers): New fn. (helm-imenu-in-all-buffers): Use it.
* helm-imenu.el (helm-imenu-collect-sources-from-all-buffers): Do it.
#1705). * helm-imenu.el (helm-imenu-in-all-buffers): Do it.
helm-imenu.el
Outdated
(cl-loop with cur-buf = (current-buffer) | ||
for b in lst | ||
for count from 1 | ||
when (and (with-current-buffer b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use with-current-buffer
outside the and
to avoid repetition.
(helm :sources 'helm-source-imenu-all | ||
helm-imenu-execute-action-at-once-if-one) | ||
(helm--maybe-use-default-as-input | ||
(not (null (memq 'helm-source-imenu-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is (not (null...
necessary? Isn't the generalized boolean from memq
sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
memq
is not returning a boolean so it is cleaner to return a boolean, though yes it would work also of course with a list instead of t
.
* helm-imenu.el (helm-imenu-candidates-in-all-buffers): Take now one optional arg. (helm-imenu-in-all-buffers): Use it.
* helm-imenu.el (helm-imenu-map): Do it.
* helm.el (helm-map): Do it.
Tianxiang Xiong <notifications@github.com> writes:
We can use with-current-buffer outside the and to avoid repetition.
Yes ;-) done.
Thanks.
…--
Thierry
|
(helm-imenu-collect-sources-from-all-buffers): New fn.
(helm-imenu-in-all-buffers): Use it.