From: Lars Hansen <larsh@math.ku.dk>
Subject: Patch to file-relative-name
Date: Mon, 31 Mar 2003 00:12:08 +0200 [thread overview]
Message-ID: <3E876BB8.4060009@math.ku.dk> (raw)
After the separate-trees parameter has been removed from my version of
file-relative-name, there is a superfluous "and". This is removed in the
patch below. Furthermore, the docstring is made a little more precise.
D:\cvs\emacs\lisp>diff -c files.el new-files.el
diff -c files.el new-files.el
*** files.el Sun Mar 30 23:58:18 2003
--- new-files.el Mon Mar 31 00:00:56 2003
***************
*** 2826,2832 ****
This function returns a relative file name which is equivalent to FILENAME
when used with that default directory as the default.
If FILENAME and DIRECTORY lie on different machines or on different drives
! \(DOS/Windows), it returns FILENAME in expanded form."
(save-match-data
(setq directory
(file-name-as-directory (expand-file-name (or directory
--- 2826,2832 ----
This function returns a relative file name which is equivalent to FILENAME
when used with that default directory as the default.
If FILENAME and DIRECTORY lie on different machines or on different drives
! on a DOS/Windows machine, it returns FILENAME on expanded form."
(save-match-data
(setq directory
(file-name-as-directory (expand-file-name (or directory
***************
*** 2836,2843 ****
(hd (find-file-name-handler directory 'file-local-copy)))
(when (and hf (not (get hf 'file-remote-p))) (setq hf nil))
(when (and hd (not (get hd 'file-remote-p))) (setq hd nil))
! (if (and
! ;; Conditions for separate trees
(or
;; Test for different drives on DOS/Windows
(and
--- 2836,2842 ----
(hd (find-file-name-handler directory 'file-local-copy)))
(when (and hf (not (get hf 'file-remote-p))) (setq hf nil))
(when (and hd (not (get hd 'file-remote-p))) (setq hd nil))
! (if ;; Conditions for separate trees
(or
;; Test for different drives on DOS/Windows
(and
***************
*** 2857,2863 ****
(substring filename 0 (match-end 0)))
(and
(string-match re directory)
! (substring directory 0 (match-end 0)))))))))
filename
(unless (eq (aref filename 0) ?/)
(setq filename (concat "/" filename)))
--- 2856,2862 ----
(substring filename 0 (match-end 0)))
(and
(string-match re directory)
! (substring directory 0 (match-end 0))))))))
filename
(unless (eq (aref filename 0) ?/)
(setq filename (concat "/" filename)))
reply other threads:[~2003-03-30 22:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E876BB8.4060009@math.ku.dk \
--to=larsh@math.ku.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.