diff lisp/files.el @ 46710:0d10dffe0423

(file-name-sans-extension): Avoid expanding DIRECTORY.
author Richard M. Stallman <rms@gnu.org>
date Sat, 27 Jul 2002 19:09:54 +0000
parents 9bb3ef1e53cd
children b00b63ab095b
line wrap: on
line diff
--- a/lisp/files.el	Sat Jul 27 19:09:08 2002 +0000
+++ b/lisp/files.el	Sat Jul 27 19:09:54 2002 +0000
@@ -2468,8 +2468,9 @@
       (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))))