]> git.eshelyaron.com Git - emacs.git/commitdiff
(file-name-sans-extension): Avoid expanding DIRECTORY.
authorRichard M. Stallman <rms@gnu.org>
Sat, 27 Jul 2002 19:09:54 +0000 (19:09 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 27 Jul 2002 19:09:54 +0000 (19:09 +0000)
lisp/files.el

index ac1712229fd41019054e6ba1391886d3f605e19b..3fe0fa479ee8d5684eb992f48381b8d3d9a242c2 100644 (file)
@@ -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))))