Skip to content

Commit

Permalink
Jumping to functions without specified module, assume it's current mo…
Browse files Browse the repository at this point in the history
…dule

When jumping to a function without fully qualified module name use current modules name.
  • Loading branch information
x4lldux committed Jan 16, 2015
1 parent 46a07b2 commit 7a02c70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion alchemist-goto.el
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@

(defun alchemist-goto--open-definition (expr)
(let* ((module (alchemist-goto--extract-module expr))
(module (if module module "AlchemistGoto"))
(module (if module module (save-excursion
(re-search-backward "defmodule\s+\\(.*?\\),?\s+")
(match-string 1))))
(function (alchemist-goto--extract-function expr))
(function (if function function "\"\""))
(file (alchemist-goto--get-module-source module function)))
Expand Down

0 comments on commit 7a02c70

Please sign in to comment.