Skip to content
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

Closed
wants to merge 6 commits into from

Conversation

thierryvolpiatto
Copy link
Member

  • 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-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
Copy link
Member

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
Copy link
Member

@xiongtx xiongtx Mar 9, 2017

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?

Copy link
Member Author

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.
@thierryvolpiatto thierryvolpiatto deleted the imenu_all_separate_sources branch March 9, 2017 05:44
@thierryvolpiatto
Copy link
Member Author

thierryvolpiatto commented Mar 9, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants