Skip to content

Commit

Permalink
Using tituomin's idea, default to thing-at-point identifier.
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeto committed Jun 19, 2013
1 parent 4934dfb commit 9eccde4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions javadoc-lookup.el
Expand Up @@ -182,8 +182,11 @@ always be there."
(unless (jdl/core-indexed-p)
(ignore-errors ; Provide *something* useful, if needed
(jdl/web "http://docs.oracle.com/javase/7/docs/api/")))
(funcall javadoc-lookup-completing-read-function "Class: "
(jdl/get-class-list)))
(let ((default (thing-at-point 'symbol))
(classes (jdl/get-class-list)))
(funcall javadoc-lookup-completing-read-function "Class: "
classes nil nil nil nil
(and default (find default classes :test #'string-match)))))

;;;###autoload
(defun javadoc-lookup (name)
Expand Down

0 comments on commit 9eccde4

Please sign in to comment.