/[emacs]/emacs/vms/make-mms-derivative.el
ViewVC logotype

Diff of /emacs/vms/make-mms-derivative.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by ttn, Mon Nov 24 18:04:06 2003 UTC revision 1.2 by ttn, Mon Nov 24 18:31:29 2003 UTC
# Line 32  Line 32 
32  ;; Emacs-specific methodology to DCL and TPU commands, so to alleviate  ;; Emacs-specific methodology to DCL and TPU commands, so to alleviate
33  ;; this pain, we provide `make-mms-derivative', which given a source  ;; this pain, we provide `make-mms-derivative', which given a source
34  ;; FILENAME (under `make-mms-derivative-root-dir'), inserts the file  ;; FILENAME (under `make-mms-derivative-root-dir'), inserts the file
35  ;; contents in a new buffer and loads FILENAME.2mms.  The elisp in the  ;; contents in a new buffer and loads FILENAME-2mms.  The elisp in the
36  ;; .2mms file can (do whatever -- it's emacs -- and) arrange to write  ;; -2mms file can (do whatever -- it's emacs -- and) arrange to write
37  ;; out the modified buffer after FILENAME.2mms loading by using:  ;; out the modified buffer after FILENAME-2mms loading by using:
38  ;;  ;;
39  ;;  (make-mms-derivative-data 'write-under-root RELATIVE-FILENAME)  ;;  (make-mms-derivative-data 'write-under-root RELATIVE-FILENAME)
40  ;;  ;;
41  ;; where RELATIVE-FILENAME is something like "src/descrip.mms_in_in".  ;; where RELATIVE-FILENAME is something like "src/descrip.mms_in_in".
42  ;; Over the long run, the convenience procedures provided (see source)  ;; Over the long run, the convenience procedures provided (see source)
43  ;; will be augmented by factoring maximally the .2mms files, squeezing  ;; will be augmented by factoring maximally the -2mms files, squeezing
44  ;; as much algorithm out of those nasty heuristics as possible.  What  ;; as much algorithm out of those nasty heuristics as possible.  What
45  ;; makes them nasty is not that they rely on the conventions of the  ;; makes them nasty is not that they rely on the conventions of the
46  ;; Emacs makefiles; that's no big deal.  What makes them nasty is that  ;; Emacs makefiles; that's no big deal.  What makes them nasty is that
# Line 100  Line 100 
100          (file (expand-file-name file)))          (file (expand-file-name file)))
101      (unless (string-match (concat "^" root) file)      (unless (string-match (concat "^" root) file)
102        (error "Not under root (%s)" root))        (error "Not under root (%s)" root))
103      (let ((edits-filename (concat file ".2mms")))      (let ((edits-filename (concat file "-2mms")))
104        (unless (file-exists-p edits-filename)        (unless (file-exists-p edits-filename)
105          (error "Could not find %s" edits-filename))          (error "Could not find %s" edits-filename))
106        (let* ((pre (+ (length root) (if (string= "/" (substring root -1)) 0 1)))        (let* ((pre (+ (length root) (if (string= "/" (substring root -1)) 0 1)))

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26