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

Make our after-save-hook be local #1

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 1 addition & 3 deletions eclim-problems.el
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
(= (assoc-default 'line p) line)))
eclim--problems-list)
(error "No problem on this line")))))))

(defun eclim-problems-open-current ()
(interactive)
(let* ((p (eclim--problems-get-current-problem)))
Expand Down Expand Up @@ -440,6 +440,4 @@ is convenient as it lets the user navigate between errors using
(col (assoc-default 'column problem)))
(insert (format "%s:%s:%s: %s: %s\n" filename line col (upcase type) description)))))

(add-hook 'after-save-hook #'eclim--problems-update-maybe)

(provide 'eclim-problems)
17 changes: 6 additions & 11 deletions eclim.el
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,13 @@ FILENAME is given, return that file's project name instead."
nil
" Eclim"
eclim-mode-map
(if eclim-mode
(progn
(when (and (featurep 'yasnippet) eclim-use-yasnippet)
(yas/load-directory eclim--snippet-directory)))
(when eclim-mode
(when (and (featurep 'yasnippet) eclim-use-yasnippet)
(yas/load-directory eclim--snippet-directory))
(kill-local-variable 'eclim--project-dir)
(kill-local-variable 'eclim--project-name)))
(kill-local-variable 'eclim--project-name)
(add-hook 'after-save-hook 'eclim--problems-update-maybe nil 't)
(add-hook 'after-save-hook 'eclim--after-save-hook nil 't)))

(defcustom eclim-accepted-file-regexps
'("\\.java" "\\.js" "\\.xml" "\\.rb" "\\.php")
Expand Down Expand Up @@ -521,12 +522,6 @@ the use of eclim to java and ant files."
(not-modified)
(set-visited-file-modtime)))

;; (setq revert-buffer-function 'revert-buffer-keep-history)

(setq revert-buffer-function nil)

(add-hook 'after-save-hook 'eclim--after-save-hook)

(define-globalized-minor-mode global-eclim-mode eclim-mode
(lambda ()
(if (and buffer-file-name
Expand Down