;;;
-;;; emu-18: Emacs 19.* emulation module for Emacs 18.*
+;;; emu-18.el --- Emacs 19.* emulation module for Emacs 18.*
;;;
-;;; $Id: emu-18.el,v 3.0 1995/08/26 18:07:06 morioka Exp $
+;;; Copyright (C) 1995 Free Software Foundation, Inc.
+;;; Copyright (C) 1994,1995 MORIOKA Tomohiko
+;;;
+;;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;; Version:
+;;; $Id: emu-18.el,v 6.0 1995/09/21 00:06:48 morioka Exp $
+;;; Keywords: emulation, compatibility
+;;;
+;;; This file is part of tl and tm (Tools for MIME).
;;;
;; This function is imported from AUC TeX.
(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)
+ ))
+
+(defvar mouse-button-2 nil)
+
(provide 'emu-18)