APPROVE COMMIT
NOTE: This patch has been committed.
2011-01-08 Aidan Kehoe <kehoea(a)parhasard.net>
* find-func.el (find-function-C-source):
Deal better with #'builtin-symbol-file returning full paths in
this function; check for readability of
find-function-C-source-directory.
Index: xemacs-packages/xemacs-devel/find-func.el
===================================================================
RCS file: /cvsroot/xemacs/XEmacs/packages/xemacs-packages/xemacs-devel/find-func.el,v
retrieving revision 1.13
diff -u -u -r1.13 find-func.el
--- xemacs-packages/xemacs-devel/find-func.el 22 Dec 2008 14:04:11 -0000 1.13
+++ xemacs-packages/xemacs-devel/find-func.el 8 Jan 2011 16:17:57 -0000
@@ -178,10 +178,15 @@
(defun find-function-C-source (fun-or-var file type)
"Find the source location where SUBR-OR-VAR is defined in FILE.
TYPE should be nil to find a function, or `defvar' to find a variable."
- (unless find-function-C-source-directory
+ (unless (and find-function-C-source-directory
+ (file-readable-p find-function-C-source-directory))
(setq find-function-C-source-directory
(read-directory-name "XEmacs C source dir: " nil nil t)))
(setq file (expand-file-name file find-function-C-source-directory))
+ (or (file-readable-p file)
+ (equal (file-name-directory file) find-function-C-source-directory)
+ (setq file (expand-file-name (file-name-nondirectory file)
+ find-function-C-source-directory)))
(unless (file-readable-p file)
(error "The C source file %s is not available"
(file-name-nondirectory file)))
--
“Apart from the nine-banded armadillo, man is the only natural host of
Mycobacterium leprae, although it can be grown in the footpads of mice.”
-- Kumar & Clark, Clinical Medicine, summarising improbable leprosy research
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches