Skip to content

Commit

Permalink
set autoload cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
mopemope committed Sep 7, 2016
1 parent c7b688c commit 63d85dc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
5 changes: 2 additions & 3 deletions company-meghanada.el
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,12 @@
:group 'company-meghanada
:type 'boolean)

;;;###autoload
(defun meghanada-company-enable ()
(company-mode t)
(make-local-variable 'company-backends)
(push #'company-meghanada company-backends)
(company-mode t)

(set (make-local-variable 'company-idle-delay) 0)
;; https://github.com/joaotavora/yasnippet/issues/708#issuecomment-222517433
(yas-minor-mode t)
(make-local-variable 'yas-minor-mode-map))

Expand Down
8 changes: 1 addition & 7 deletions flycheck-meghanada.el
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,8 @@
(flycheck-buffer-saved-p))))

;;;###autoload
;; (defun flycheck-meghanda-setup ()
;; "Setup Flycheck Meghanada.
;; Add `meghanada' to `flycheck-checkers'."
;; (interactive)
;; (add-to-list 'flycheck-checkers 'meghanada))

(defun meghanada-flycheck-enable ()
"Setup Flycheck meghanada. add `meghanada' to `flycheck-checkers'."
"Setup flycheck meghanada-mode. add `meghanada' to `flycheck-checkers'."
(add-to-list 'flycheck-checkers 'meghanada))

(provide 'flycheck-meghanada)
Expand Down
14 changes: 11 additions & 3 deletions meghanada.el
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
(defvar meghanada--server-buffer "*meghanada-server-log*")
(defvar meghanada--server-pending nil)

;;;###autoload
(defun meghanada-install-server ()
"Install meghanada-server's jar file from bintray ."
(interactive)
Expand Down Expand Up @@ -200,11 +201,13 @@
(funcall meghanada--server-pending)
(setq meghanada--server-pending nil))))))))

;;;###autoload
(defun meghanada-server-start ()
"TODO: FIX DOC ."
(interactive)
(meghanada--get-server-process-create))

;;;###autoload
(defun meghanada-server-kill ()
"TODO: FIX DOC ."
(interactive)
Expand Down Expand Up @@ -505,16 +508,19 @@
;; meghanada client api
;;

;;;###autoload
(defun meghanada-client-direct-connect ()
"TODO: FIX DOC ."
(interactive)
(meghanada--get-client-process-create))

;;;###autoload
(defun meghanada-client-connect ()
"TODO: FIX DOC ."
(interactive)
(meghanada--start-server-and-client))

;;;###autoload
(defun meghanada-client-disconnect ()
"TODO: FIX DOC ."
(interactive)
Expand Down Expand Up @@ -823,18 +829,20 @@

(defvar meghanada-mode-map
(let ((map (make-sparse-keymap)))
;; TODO default keymap
map)
"Keymap of Meghanada interactive commands.")

;;;###autoload
(define-derived-mode meghanada-mode java-mode "Meghanada"
"A new, better, Java mode."
(define-derived-mode meghanada-mode java-mode "MEGHANADA"
"Major mode for java delopment."
(when meghanada-use-company
(meghanada-company-enable))
(meghanada-company-enable))
(when meghanada-use-flycheck
(meghanada-flycheck-enable))
(meghanada-client-connect))


(remove-hook 'java-mode-hook 'wisent-java-default-setup)

(provide 'meghanada)
Expand Down

0 comments on commit 63d85dc

Please sign in to comment.