unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* hooking jode to emacs
@ 2003-12-19 21:49 kgold
  2003-12-19 23:38 ` Kevin Rodgers
  0 siblings, 1 reply; 10+ messages in thread
From: kgold @ 2003-12-19 21:49 UTC (permalink / raw)


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)



-- 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-12-29 21:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-19 21:49 hooking jode to emacs kgold
2003-12-19 23:38 ` Kevin Rodgers
2003-12-22 14:47   ` kgold
2003-12-22 16:13     ` Kai Grossjohann
2003-12-22 19:40       ` kgold
2003-12-22 21:16         ` Kai Grossjohann
2003-12-23 17:59           ` Kevin Rodgers
2003-12-23 20:22             ` Kevin Rodgers
2003-12-25 16:28             ` Kai Grossjohann
2003-12-29 21:38               ` Kevin Rodgers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).