Mercurial > emacs
comparison lisp/help-fns.el @ 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 | 1a289c2bc9d8 |
children | 6b4c01048db2 |
comparison
equal
deleted
inserted
replaced
98318:cbd67f04134f | 98319:16aabd7d9d9d |
---|---|
396 (setq file-name (find-lisp-object-file-name function def)) | 396 (setq file-name (find-lisp-object-file-name function def)) |
397 (when file-name | 397 (when file-name |
398 (princ " in `") | 398 (princ " in `") |
399 ;; We used to add .el to the file name, | 399 ;; We used to add .el to the file name, |
400 ;; but that's completely wrong when the user used load-file. | 400 ;; but that's completely wrong when the user used load-file. |
401 (princ (if (eq file-name 'C-source) "C source code" file-name)) | 401 (princ (if (eq file-name 'C-source) |
402 "C source code" | |
403 (file-name-nondirectory file-name))) | |
402 (princ "'") | 404 (princ "'") |
403 ;; Make a hyperlink to the library. | 405 ;; Make a hyperlink to the library. |
404 (with-current-buffer standard-output | 406 (with-current-buffer standard-output |
405 (save-excursion | 407 (save-excursion |
406 (re-search-backward "`\\([^`']+\\)'" nil t) | 408 (re-search-backward "`\\([^`']+\\)'" nil t) |
595 (setq file-name (find-lisp-object-file-name variable 'defvar)) | 597 (setq file-name (find-lisp-object-file-name variable 'defvar)) |
596 | 598 |
597 (if file-name | 599 (if file-name |
598 (progn | 600 (progn |
599 (princ " is a variable defined in `") | 601 (princ " is a variable defined in `") |
600 (princ (if (eq file-name 'C-source) "C source code" file-name)) | 602 (princ (if (eq file-name 'C-source) |
603 "C source code" | |
604 (file-name-nondirectory file-name))) | |
601 (princ "'.\n") | 605 (princ "'.\n") |
602 (with-current-buffer standard-output | 606 (with-current-buffer standard-output |
603 (save-excursion | 607 (save-excursion |
604 (re-search-backward "`\\([^`']+\\)'" nil t) | 608 (re-search-backward "`\\([^`']+\\)'" nil t) |
605 (help-xref-button 1 'help-variable-def | 609 (help-xref-button 1 'help-variable-def |