From aab11f2c19d13cefb2833d582b1368bf02a912e7 Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 9 Mar 1998 07:22:33 +0000 Subject: [PATCH] tm 6.78.1. --- Makefile | 2 +- emu-18.el | 41 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4c5c3a0..ead46b4 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ TLDIR19 = $(HOME)/lib/emacs19/lisp FILES = tl/README.eng tl/Makefile tl/Makefile.bc tl/loadpath \ tl/*.el tl/doc/*.texi -TARFILE = tl-6.6.tar +TARFILE = tl-6.6.1.tar nemacs: diff --git a/emu-18.el b/emu-18.el index 9d20e8d..e9ea96b 100644 --- a/emu-18.el +++ b/emu-18.el @@ -1,7 +1,7 @@ ;;; ;;; emu-18: Emacs 19.* emulation module for Emacs 18.* ;;; -;;; $Id: emu-18.el,v 3.0 1995/08/26 18:07:06 morioka Exp $ +;;; $Id: emu-18.el,v 4.0 1995/09/05 16:44:57 morioka Exp $ ;;; ;; This function is imported from AUC TeX. @@ -55,4 +55,43 @@ Associates the function with the current load file, if any. (fset SYM (symbol-function NEWDEF)) NEWDEF) +(defun make-directory-internal (dirname) + "Create a directory. One argument, a file name string. +\[emu-18 Emacs 19 emulating function]" + (if (file-exists-p dirname) + (error "Creating directory: %s is already exist" dirname) + (if (not (= (call-process "mkdir" nil nil nil dirname) 0)) + (error "Creating directory: no such file or directory, %s" dirname) + ))) + +(defun make-directory (dir &optional parents) + "Create the directory DIR and any nonexistent parent dirs. +The second (optional) argument PARENTS says whether +to create parent directories if they don't exist. +\[emu-18 Emacs 19 emulating function]" + (let ((len (length dir)) + (p 0) p1 path) + (catch 'tag + (while (and (< p len) (string-match "[^/]*/?" dir p)) + (setq p1 (match-end 0)) + (if (= p1 len) + (throw 'tag nil) + ) + (setq path (substring dir 0 p1)) + (if (not (file-directory-p path)) + (cond ((file-exists-p path) + (error "Creating directory: %s is not directory" path) + ) + ((null parents) + (error "Creating directory: %s is not exist" path) + ) + (t + (make-directory-internal path) + )) + ) + (setq p p1) + )) + (make-directory-internal dir) + )) + (provide 'emu-18) -- 1.7.10.4