summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorThien-Thi Nguyen <ttn@gnuvola.org>2003-11-28 08:59:09 +0000
committerThien-Thi Nguyen <ttn@gnuvola.org>2003-11-28 08:59:09 +0000
commitfdd401446906c15b45767ee1adf94821075c9dce (patch)
treea60da9a9990c9939bd46f870c7609d7e23e7f6ce /vms
parentd9cbee570fd2a7074b10f71314db2fcb62ecd785 (diff)
downloademacs-fdd401446906c15b45767ee1adf94821075c9dce.tar.gz
(make-mms-derivative-root-dir): Update.
(make-mms-derivative): Avoid unixisms for tree membership validation and buffer naming: use `file-relative-name'.
Diffstat (limited to 'vms')
-rw-r--r--vms/make-mms-derivative.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/vms/make-mms-derivative.el b/vms/make-mms-derivative.el
index 1ad2af4e388..666ca4ae657 100644
--- a/vms/make-mms-derivative.el
+++ b/vms/make-mms-derivative.el
@@ -55,7 +55,7 @@
;;; Code:
-(defvar make-mms-derivative-root-dir "~/build/GNU/emacs"
+(defvar make-mms-derivative-root-dir "AXPA:[TTN.EMACS.EMACS212_3]"
"Source tree root directory.")
(defvar make-mms-derivative-data nil
@@ -111,14 +111,14 @@
(interactive "fSource File: ")
(let ((root (expand-file-name make-mms-derivative-root-dir))
(file (expand-file-name file)))
- (unless (string-match (concat "^" root) file)
+ (when (file-name-absolute-p (file-relative-name file root))
(error "Not under root (%s)" root))
(let ((edits-filename (concat file "-2mms")))
(unless (file-exists-p edits-filename)
(error "Could not find %s" edits-filename))
- (let* ((pre (+ (length root) (if (string= "/" (substring root -1)) 0 1)))
- (buf (get-buffer-create (format "*mms-derivative: %s"
- (substring file pre)))))
+ (let ((buf (get-buffer-create
+ (format "*mms-derivative: %s"
+ (file-relative-name file root)))))
(message "Munging ...")
(switch-to-buffer buf)
(erase-buffer)