Skip to content
Browse files

Add autoloads.

  • Loading branch information...
1 parent 061fcc6 commit 0a10122cc5900b1cfd5a900e185b807a60fe9a8f @skeeto committed Nov 16, 2012
Showing with 12 additions and 3 deletions.
  1. +4 −0 java-docs.el
  2. +8 −3 java-mode-plus.el
4 java-docs.el
@@ -49,6 +49,7 @@
(require 'cl)
(require 'ido)
(global-set-key "\C-hj" 'java-docs-lookup)
(defvar java-docs-enable-cache (featurep 'hashtable-print-readable)
@@ -221,6 +222,7 @@ hash plus version info."
"Query the user for a short class name."
(funcall java-docs-completing-function "Class: " java-docs-short-class-list))
(defun java-docs-lookup (name)
"Lookup based on class name."
(interactive (list (java-docs-completing-read)))
@@ -274,6 +276,7 @@ always be there."
(defun add-java-import ()
"Insert an import statement at import section at the top of the file."
@@ -292,6 +295,7 @@ always be there."
(insert "\n")
(call-interactively 'insert-java-import)))))
(defun sort-imports ()
"Sort the imports in the import section in proper order."
11 java-mode-plus.el
@@ -192,11 +192,11 @@
(defvar java-mode-plus-map (make-sparse-keymap)
"Keymap for the java-mode-plus minor mode.")
(define-minor-mode java-mode-plus
"Extensions to java-mode for further support with standard Java tools."
- nil
- " jm+"
- java-mode-plus-map)
+ :lighter " jm+"
+ :keymap 'java-mode-plus-map)
(defvar open-java-project-extensions '("xml" "java" "properties")
"File extensions to be opened when using `open-java-project'.")
@@ -207,6 +207,7 @@
(defvar java-package-roots '("src" "test")
"List of directories that tend to be at the root of packages.")
(defun ant-compile ()
"Traveling up the path, find build.xml file and run compile."
@@ -226,6 +227,7 @@
(not (member dir open-java-project-excludes)))
;; ID: 72dc0a9e-c41c-31f8-c8f5-d9db8482de1e
(defun open-java-project (dir)
"Open all java and xml source files and sub-directories below
the given directory."
@@ -243,6 +245,7 @@ the given directory."
;;; Helper functions to determine properties of the current source
(defun java-package ()
"Returns a guess of the package of the current Java source
file, based on the absolute filename. Package roots are matched
@@ -254,6 +257,7 @@ against `java-package-roots'."
(search-root '() (cdr (reverse (split-string (file-name-directory
buffer-file-name) "/"))))))
(defun java-class-name ()
"Determine the class name from the filename."
(file-name-sans-extension (file-name-nondirectory buffer-file-name)))
@@ -307,6 +311,7 @@ against `java-package-roots'."
(setq compilation-scroll-output t)
;; Enable the minor mode wherever java-mode is used.
(add-hook 'java-mode-hook 'java-mode-plus)
(provide 'java-mode-plus)

0 comments on commit 0a10122

Please sign in to comment.
Something went wrong with that request. Please try again.