From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David PONCE Newsgroups: gmane.emacs.devel Subject: Re: On DOS/Windows, unnecessary load of tramp by `file-relative-name' Date: Thu, 24 Apr 2003 16:44:59 +0200 (CEST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <21449411.1051195499922.JavaMail.www@wwinf9802> Reply-To: david.ponce@wanadoo.fr NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1051195705 28864 80.91.224.249 (24 Apr 2003 14:48:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 24 Apr 2003 14:48:25 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Apr 24 16:48:23 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 198i1L-0007V2-00 for ; Thu, 24 Apr 2003 16:48:19 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 198i7c-00054v-00 for ; Thu, 24 Apr 2003 16:54:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 198hz8-0002Dv-0B for emacs-devel@quimby.gnus.org; Thu, 24 Apr 2003 10:46:02 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 198hyL-0001aw-00 for emacs-devel@gnu.org; Thu, 24 Apr 2003 10:45:13 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 198hyE-0001Jp-00 for emacs-devel@gnu.org; Thu, 24 Apr 2003 10:45:08 -0400 Original-Received: from smtp4.wanadoo.fr ([193.252.22.28] helo=mwinf0303.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 198hy9-0001B1-00 for emacs-devel@gnu.org; Thu, 24 Apr 2003 10:45:01 -0400 Original-Received: from wwinf9802 (wwinf9802 [172.22.150.29]) by mwinf0303.wanadoo.fr (SMTP Server) with ESMTP id E987350008EE; Thu, 24 Apr 2003 16:44:59 +0200 (CEST) Original-To: kai.grossjohann@gmx.net X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13429 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13429 Hi Kai, > Instead of using (eq (aref filename 0) ?/), how about using > (file-name-absolute-p filename)? Does that work? Yes that works! And that is a better solution ;-) Thanks! Here is a new patch: Index: lisp/files.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/files.el,v retrieving revision 1.653 diff -c -r1.653 files.el *** lisp/files.el 24 Apr 2003 01:58:40 -0000 1.653 --- lisp/files.el 24 Apr 2003 14:35:48 -0000 *************** *** 2909,2917 **** (string-match re directory) (substring directory 0 (match-end 0)))))))) filename ! (unless (eq (aref filename 0) ?/) (setq filename (concat "/" filename))) ! (unless (eq (aref directory 0) ?/) (setq directory (concat "/" directory))) (let ((ancestor ".") (filename-dir (file-name-as-directory filename))) --- 2909,2917 ---- (string-match re directory) (substring directory 0 (match-end 0)))))))) filename ! (unless (file-name-absolute-p filename) (setq filename (concat "/" filename))) ! (unless (file-name-absolute-p directory) (setq directory (concat "/" directory))) (let ((ancestor ".") (filename-dir (file-name-as-directory filename)))