[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hooking jode to emacs
From: |
kgold |
Subject: |
hooking jode to emacs |
Date: |
19 Dec 2003 21:49:15 GMT |
I'd like to use jode to decompile when editing a class file. I found
the below elisp. However jode is a bit too smart, and adds .class
to the end of it's argument. So it tries to look for
filename.class.class
I need to pass the file name without the extension. It seems like
file-name-sans-extension is what I want, but I just don't know the
syntax. Could someone modify this elisp to do that?
; Use this once jad is downloaded
(defvar class-file-decompile-command "jode "
"The shell command run by `decompile-class-file'.")
(defun decompile-class-file (&optional file)
"Run `class-file-decompile-command' on FILE, but only if it's a .class file.
If FILE is nil, run it on `buffer-file-name'."
(interactive "fFile: ")
(or file (setq file buffer-file-name))
(and (equal (file-name-extension file) "class")
(shell-command (concat class-file-decompile-command " " file))))
(add-hook 'find-file-hooks 'decompile-class-file)
--
- hooking jode to emacs,
kgold <=
- Re: hooking jode to emacs, Kevin Rodgers, 2003/12/19
- Re: hooking jode to emacs, kgold, 2003/12/22
- Re: hooking jode to emacs, Kai Grossjohann, 2003/12/22
- Re: hooking jode to emacs, kgold, 2003/12/22
- Re: hooking jode to emacs, Kai Grossjohann, 2003/12/22
- Re: hooking jode to emacs, Kevin Rodgers, 2003/12/23
- Re: hooking jode to emacs, Kevin Rodgers, 2003/12/23
- Re: hooking jode to emacs, Kai Grossjohann, 2003/12/25
- Re: hooking jode to emacs, Kevin Rodgers, 2003/12/29