From e8e8dbf923868c921357d227d8f8581978cfea65 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Wed, 24 Sep 2008 16:13:35 +0000 Subject: [PATCH] (describe-function-1, describe-variable): Print relative file name in help buffer. --- lisp/help-fns.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index d131ab3c53c..612b90ff62b 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -398,7 +398,9 @@ suitable file is found, return nil." (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 @@ it is displayed along with the global value." (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 -- 2.11.4.GIT