branch: externals/perl-doc commit 1882031ee64485b4da8c067930fcf0890cbaf410 Author: Harald Jörg <h...@posteo.de> Commit: Harald Jörg <h...@posteo.de>
* Bugfix: perl-doc.el (perl-doc-file): Make sure that "~" is expanded, and switch to the directory where the file is located. --- perl-doc.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/perl-doc.el b/perl-doc.el index 253160665a..9d80afb76c 100644 --- a/perl-doc.el +++ b/perl-doc.el @@ -411,8 +411,9 @@ Does better formatting than man pages, including hyperlinks." This is the same as running `perl-doc' with FILE as an argument, but provides file-name completion." (interactive "f") - (perl-doc file) - ) + (let ((absolute-path (expand-file-name file))) + (setq-local default-directory (file-name-directory absolute-path)) + (perl-doc absolute-path))) ;; Make elint-current-buffer happy (defvar text-scale-mode-amount) ; in face-remap.el, which we require