Commits

Anonymous committed 138827e

Prefer source-directory to source-root; fix find-func for 21.4

Comments (0)

Files changed (2)

+2006-07-10  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* find-func.el (find-function-C-source-directory):
+	Prefer source-directory to source-root, check that the
+	corresponding variables exist before using them--fixes an error on
+	21.4.
+	
 2006-07-10  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.73 released.
 ;; GNU and is here.
 
 (defvar find-function-C-source-directory
-  ;; XEmacs change ; source-directory -> source-root
-  (let ((dir (expand-file-name "src" source-root)))
-    (when (and (file-directory-p dir) (file-readable-p dir))
+  ;; XEmacs change ; check source-root too, which was available for a couple
+  ;; of years in 21.5.
+  (let (dir)
+    (when (and (setq dir (or (and (boundp 'source-directory) 
+				  (expand-file-name "src" source-directory))
+			     (and (boundp 'source-root) 
+				  (expand-file-name "src" source-root))))
+	       (file-directory-p dir) (file-readable-p dir))
       dir))
   "Directory where the C source files of XEmacs can be found.
 If nil, do not try to find the source code of functions and variables