Index: /trunk/source/cocoa-ide/cocoa-editor.lisp
===================================================================
--- /trunk/source/cocoa-ide/cocoa-editor.lisp	(revision 14247)
+++ /trunk/source/cocoa-ide/cocoa-editor.lisp	(revision 14248)
@@ -1807,6 +1807,12 @@
       pathname)))
 
-;;; If we get here, we've already checked that the selection represents
-;;; a valid pathname.
+(defun find-symbol-in-packages (string pkgs)
+  (setq string (string-upcase string))
+  (let (sym)
+    (dolist (p pkgs)
+      (when (setq sym (find-symbol string p))
+        (return)))
+    sym))
+
 (objc:defmethod (#/openSelection: :void) ((self hemlock-text-view) sender)
   (declare (ignore sender))
@@ -1815,5 +1821,6 @@
          (pathname (pathname-for-namestring-fragment
                     (lisp-string-from-nsstring selection))))
-    (ed pathname)))
+    (when (pathnamep pathname)
+      (ed pathname))))
 
 ;;; If we get here, we've already checked that the selection represents
@@ -1823,6 +1830,18 @@
   (let* ((text (#/string self))
          (selection (#/substringWithRange: text (#/selectedRange self)))
-         (symbol-name (string-upcase (lisp-string-from-nsstring selection))))
-    (inspect (find-symbol symbol-name))))
+         (symbol-name (string-upcase (lisp-string-from-nsstring selection)))
+         (buffer (hemlock-buffer self))
+         (package-name (hi::variable-value 'hemlock::current-package :buffer buffer)))
+    (inspect (find-symbol-in-packages symbol-name 
+                                      (cons package-name
+                                            (package-use-list package-name))))))
+
+(objc:defmethod (#/sourceForSelection: :void) ((self hemlock-text-view) sender)
+  (declare (ignore sender))
+  (let* ((text (#/string self))
+         (selection (#/substringWithRange: text (#/selectedRange self)))
+         (sym (find-symbol-in-packages (lisp-string-from-nsstring selection)
+                                       (list-all-packages))))
+    (ed sym)))
 
 ;;; If we don't override this, NSTextView will start adding Google/
@@ -1836,9 +1855,21 @@
          (menu (if (> (length s) 0)
                  (#/copy (#/menu self))
-                 (#/retain (#/menu self)))))
-    (when (find-symbol (string-upcase s))
+                 (#/retain (#/menu self))))
+         (buffer (hemlock-buffer self))
+         (package-name (hi::variable-value 'hemlock::current-package :buffer buffer)))
+    (when (find-symbol-in-packages (string-upcase s)
+                                   (cons package-name
+                                         (package-use-list package-name)))
       (let* ((title (#/stringByAppendingString: #@"Inspect " selection))
              (item (make-instance 'ns:ns-menu-item :with-title title
                      :action (@selector #/inspectSelection:)
+                     :key-equivalent #@"")))
+        (#/setTarget: item self)
+        (#/insertItem:atIndex: menu item 0)
+        (#/release item)))
+    (when (find-symbol-in-packages (string-upcase s) (list-all-packages))
+      (let* ((title (#/stringByAppendingString: #@"Source of " selection))
+             (item (make-instance 'ns:ns-menu-item :with-title title
+                     :action (@selector #/sourceForSelection:)
                      :key-equivalent #@"")))
         (#/setTarget: item self)
@@ -2609,4 +2640,8 @@
                   (pathname (hi::buffer-pathname buffer)))
              (not (null pathname))))
+          ((eql action (@selector #/openSelection:))
+           (let* ((text (#/string self))
+                  (selection (#/substringWithRange: text (#/selectedRange self))))
+             (pathname-for-namestring-fragment (lisp-string-from-nsstring selection))))
 	  (t (call-next-method item)))))
 
Index: unk/source/cocoa-ide/ide-contents/Resources/English.lproj/MainMenu.nib/classes.nib
===================================================================
--- /trunk/source/cocoa-ide/ide-contents/Resources/English.lproj/MainMenu.nib/classes.nib	(revision 14247)
+++ 	(revision )
@@ -1,83 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBClasses</key>
-	<array>
-		<dict>
-			<key>ACTIONS</key>
-			<dict>
-				<key>toggleConsole</key>
-				<string>id</string>
-				<key>toggleTypeout</key>
-				<string>id</string>
-			</dict>
-			<key>CLASS</key>
-			<string>NSApplication</string>
-			<key>LANGUAGE</key>
-			<string>ObjC</string>
-			<key>SUPERCLASS</key>
-			<string>NSResponder</string>
-		</dict>
-		<dict>
-			<key>ACTIONS</key>
-			<dict>
-				<key>backtrace</key>
-				<string>id</string>
-				<key>compileAndLoadBuffer</key>
-				<string>id</string>
-				<key>compileBuffer</key>
-				<string>id</string>
-				<key>compileFile</key>
-				<string>id</string>
-				<key>continue</key>
-				<string>id</string>
-				<key>evalAll</key>
-				<string>id</string>
-				<key>evalSelection</key>
-				<string>id</string>
-				<key>exitBreak</key>
-				<string>id</string>
-				<key>hyperSpecLookUp</key>
-				<string>id</string>
-				<key>inspect</key>
-				<string>id</string>
-				<key>interrupt</key>
-				<string>id</string>
-				<key>loadBuffer</key>
-				<string>id</string>
-				<key>loadFile</key>
-				<string>id</string>
-				<key>newListener</key>
-				<string>id</string>
-				<key>restarts</key>
-				<string>id</string>
-				<key>showAproposWindow</key>
-				<string>id</string>
-				<key>showListener</key>
-				<string>id</string>
-				<key>showNewInspector</key>
-				<string>id</string>
-				<key>showPreferences</key>
-				<string>id</string>
-				<key>showProcessesWindow</key>
-				<string>id</string>
-				<key>showSearchFiles</key>
-				<string>id</string>
-				<key>showXaproposWindow</key>
-				<string>id</string>
-				<key>updateCCL</key>
-				<string>id</string>
-			</dict>
-			<key>CLASS</key>
-			<string>FirstResponder</string>
-			<key>LANGUAGE</key>
-			<string>ObjC</string>
-			<key>SUPERCLASS</key>
-			<string>NSObject</string>
-		</dict>
-	</array>
-	<key>IBVersion</key>
-	<string>1</string>
-</dict>
-</plist>
Index: unk/source/cocoa-ide/ide-contents/Resources/English.lproj/MainMenu.nib/info.nib
===================================================================
--- /trunk/source/cocoa-ide/ide-contents/Resources/English.lproj/MainMenu.nib/info.nib	(revision 14247)
+++ 	(revision )
@@ -1,18 +1,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>IBFramework Version</key>
-	<string>677</string>
-	<key>IBOldestOS</key>
-	<integer>5</integer>
-	<key>IBOpenObjects</key>
-	<array>
-		<integer>29</integer>
-	</array>
-	<key>IBSystem Version</key>
-	<string>9J61</string>
-	<key>targetFramework</key>
-	<string>IBCocoaFramework</string>
-</dict>
-</plist>
