changeset 98319:16aabd7d9d9d

(describe-function-1, describe-variable): Print relative file name in help buffer.
author Martin Rudalics <rudalics@gmx.at>
date Wed, 24 Sep 2008 16:13:35 +0000
parents cbd67f04134f
children 738bf2e7b7f5
files lisp/help-fns.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help-fns.el	Wed Sep 24 02:11:10 2008 +0000
+++ b/lisp/help-fns.el	Wed Sep 24 16:13:35 2008 +0000
@@ -398,7 +398,9 @@
 	(princ " in `")
 	;; We used to add .el to the file name,
 	;; but that's completely wrong when the user used load-file.
-	(princ (if (eq file-name 'C-source) "C source code" file-name))
+	(princ (if (eq file-name 'C-source)
+		   "C source code"
+		 (file-name-nondirectory file-name)))
 	(princ "'")
 	;; Make a hyperlink to the library.
 	(with-current-buffer standard-output
@@ -597,7 +599,9 @@
 	      (if file-name
 		  (progn
 		    (princ " is a variable defined in `")
-		    (princ (if (eq file-name 'C-source) "C source code" file-name))
+		    (princ (if (eq file-name 'C-source)
+			       "C source code"
+			     (file-name-nondirectory file-name)))
 		    (princ "'.\n")
 		    (with-current-buffer standard-output
 		      (save-excursion