Skip to content

Commit

Permalink
Explain the hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
espenhw committed Mar 4, 2009
1 parent f6ba0db commit e1a14cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main/lisp/malabar-groovy.el
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ pop to the Groovy console buffer."

(defun malabar-groovy--init-eval-buffer ()
(when (assq 'comint-output-filter-functions (buffer-local-variables))
;; HACK
;; HACK: There is no reliable way to remove a closure from this
;; list; just clear it, but only if it is already buffer-local
(setq comint-output-filter-functions nil))
(add-hook 'comint-output-filter-functions
(malabar-groovy--watch-for-prompt 'malabar-groovy--eval-callback
Expand Down
6 changes: 4 additions & 2 deletions src/main/lisp/malabar-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
(require 'semantic-find)
(require 'semantic-wisent)

;; HACK
;; HACK: we don't want to load the old Java parser, so trick Emacs
;; into thinking it's already loaded
(provide 'wisent-java-wy)
(require 'wisent-java)

Expand Down Expand Up @@ -76,7 +77,8 @@

(define-derived-mode malabar-mode java-mode "malabar"
"A new, better, Java mode."
;; HACK
;; HACK: Since we're not loading the old java parser the installer
;; function isn't defined; give it a dummy definition
(flet ((wisent-java-wy--install-parser () nil))
(wisent-java-default-setup))
(add-hook 'semantic-init-hooks #'malabar-semantic-setup)
Expand Down

0 comments on commit e1a14cc

Please sign in to comment.