changeset 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 41f343ea4196
children 101b5b0fa2b5
files lisp/files.el
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
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))))