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

Generic filtering callback support for popup-isearch w/example filter by docstring #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

terranpro
Copy link

I've found the docstring search case useful for searching for function argument types, keywords like deprecated, async, callback, and even elisp defun keywords like &rest and &key.

I thought that rather than just add docstring, generic filtering functionality should be exposed.

I've submitted this pull request as a potential fix for issue #39

Example use of this patch w/auto-complete:

(defun ac-isearch-doc ()
  (interactive)
  (when (ac-menu-live-p)
    (ac-cancel-show-menu-timer)
    (ac-show-menu)
    (if ac-use-quick-help
        (let ((popup-menu-show-quick-help-function
               (if (ac-quick-help-use-pos-tip-p)
                   'ac-pos-tip-show-quick-help
                 'popup-menu-show-quick-help)))
          (popup-isearch ac-menu
                         :callback 'ac-isearch-callback
                         :help-delay ac-quick-help-delay
             :filter 'popup-isearch-filter-list-by-doc))
      (popup-isearch ac-menu 
             :callback 'ac-isearch-callback
             :filter 'popup-isearch-filter-list-by-doc))))

@jcs090218
Copy link
Member

It seems like there are conflicts in this PR! Can you fix this for us before reviewing it? Thanks! ;)

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.

2 participants