.emacs-my
changeset 961 d8f1ed2f2f9c
parent 960 272a40dfdbcd
child 962 5d94d3736bbe
--- a/.emacs-my	Tue Oct 16 13:27:28 2012 +0300
+++ b/.emacs-my	Tue Oct 16 13:33:33 2012 +0300
@@ -958,9 +958,10 @@
 
 (defun netbeans-find-command ()
   "Search for NetBeans executable."
-  (executable-find "netbeans")
-  "/opt/netbeans-7.2/bin/netbeans")
-(defvar netbeans-command (find-netbeans-command)
+  (or
+   (executable-find "netbeans")
+   "/opt/netbeans*/bin/netbeans")
+(defvar netbeans-command (netbeans-find-command)
   "Command to run NetBeans.")
 (defun netbeans-open-file (file &optional line)
   "Open FILE on LINE in NetBeans."
@@ -970,7 +971,9 @@
 (defun netbeans-open-this-buffer ()
   "Open file for burrent buffer in NetBeans."
   (interactive)
-  (netbeans-open-file (buffer-file-name) (line-number-at-pos)))
+  (if (file-regular-p (buffer-file-name))
+      (netbeans-open-file (buffer-file-name) (line-number-at-pos))
+    (message "Current buffer wasnt' associated with a real file"))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (message "calendar")