]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-function-search-for-symbol): Ignore directories
authorRichard M. Stallman <rms@gnu.org>
Sat, 1 Aug 1998 19:15:12 +0000 (19:15 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 1 Aug 1998 19:15:12 +0000 (19:15 +0000)
when looking for a library file.

lisp/emacs-lisp/find-func.el

index 1b2a43495c28b8a8ef385fb6e8531ec3d98bc55f..aebd8e68f807999d7f6839ce79177f452ad098fa 100644 (file)
 ;;
 ;; The funniest thing about this is that I can't imagine why a package
 ;; so obviously useful as this hasn't been written before!!
-;;
-;; Put this file in your `load-path', byte-compile it and add the
-;; following code in your init file:
-;;
 ;; ;;; find-func
 ;; (find-function-setup-keys)
 ;;
@@ -115,7 +111,8 @@ If VARIABLE-P is nil, `find-function-regexp' is used, otherwise
   (if (string-match "\\.el\\(c\\)\\'" library)
       (setq library (substring library 0 (match-beginning 1))))
   (let* ((path find-function-source-path)
-        (filename (if (file-exists-p library)
+        (filename (if (and (file-exists-p library)
+                           (not (file-directory-p library)))
                       library
                     ;; use `file-name-sans-extension' here? (if it gets fixed)
                     (if (string-match "\\(\\.el\\)\\'" library)