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

thing-at-point 'sexp vs `symbol [WIP] #181

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ env:
- EVM_EMACS=emacs-24.5-travis
- EVM_EMACS=emacs-25.1-travis
- EVM_EMACS=emacs-25.2-travis
- EVM_EMACS=emacs-25.3-travis

script:
- rg --version
- ag --version
Expand Down
8 changes: 4 additions & 4 deletions dumb-jump.el
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ to keep looking for another root."
((or (string= (buffer-name) "*shell*")
(string= (buffer-name) "*eshell*"))
(dumb-jump-fetch-shell-results prompt))
((and (not prompt) (not (region-active-p)) (not (thing-at-point 'symbol)))
((and (not prompt) (not (region-active-p)) (not (thing-at-point 'sexp)))
(dumb-jump-issue-result "nosymbol"))
(t
(dumb-jump-fetch-file-results prompt))))
Expand Down Expand Up @@ -1412,8 +1412,8 @@ to keep looking for another root."
(if (region-active-p)
(buffer-substring-no-properties (region-beginning) (region-end))
(if (version< emacs-version "24.4")
(thing-at-point 'symbol)
(thing-at-point 'symbol t))))
(thing-at-point 'sexp)
(thing-at-point 'sexp t))))

(defun dumb-jump-get-lang-by-shell-contents (buffer)
"Return languages in BUFFER by checking if file extension is mentioned."
Expand All @@ -1432,7 +1432,7 @@ LANG is a string programming langage with CONFIG a property list
of project configuraiton."
(let* ((cur-line (if prompt 0 (dumb-jump-get-point-line)))
(look-for-start (when (not prompt)
(- (car (bounds-of-thing-at-point 'symbol))
(- (car (bounds-of-thing-at-point 'sexp))
(point-at-bol))))
(cur-line-num (line-number-at-pos))
(proj-config (dumb-jump-get-config proj-root))
Expand Down