From 6ee24f1e72319fb7d70e4cd5f8c15e9e955329a0 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 27 Jul 2002 19:09:54 +0000 Subject: [PATCH] (file-name-sans-extension): Avoid expanding DIRECTORY. --- lisp/files.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index ac1712229fd..3fe0fa479ee 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2468,8 +2468,9 @@ except that a leading `.', if any, doesn't count." (if (and (string-match "\\.[^.]*\\'" file) (not (eq 0 (match-beginning 0)))) (if (setq directory (file-name-directory filename)) - (expand-file-name (substring file 0 (match-beginning 0)) - directory) + ;; Don't use expand-file-name here; if DIRECTORY is relative, + ;; we don't want to expand it. + (concat directory (substring file 0 (match-beginning 0))) (substring file 0 (match-beginning 0))) filename)))) -- 2.39.2