Annotation of 43BSDReno/contrib/emacs-18.55/dist-1.3/fi/dot.clinit, revision 1.1

1.1     ! root        1: ;;                             -[Fri Nov 18 19:00:37 1988 by layer]-
        !             2: ;; Sample .clinit.cl file
        !             3: ;;
        !             4: ;; $Header: dot.clinit.cl,v 1.1 88/11/18 19:00:54 layer Exp $
        !             5: 
        !             6: (format t "; Loading home clinit...~%")
        !             7: 
        !             8: (defparameter *emacs-library*
        !             9:   (let ((emacs-lib (si:getenv "EMACSLIBRARY")))
        !            10:     (if emacs-lib (format nil "~a/lisp/fi/" emacs-lib))))
        !            11: 
        !            12: (and *emacs-library*
        !            13:      (find "+ipc" (system:command-line-arguments) :test #'string=)
        !            14:      (load (merge-pathnames "clinit.cl" *emacs-library*))
        !            15:      (load-and-start-ipc-package :unix-domain nil))
        !            16: 
        !            17: ;; The following emulates the C shell cd, pushd, popd, pwd, and dirs,
        !            18: ;; and allows Emacs to track directory changes:
        !            19: 
        !            20: (defvar *directory-stack*
        !            21:   (list (namestring
        !            22:         (setq *default-pathname-defaults* (current-directory)))))
        !            23: 
        !            24: (tpl:alias ("pushd" :string) (&optional dir)
        !            25:   (if* (string= "" dir)
        !            26:      then (let ((old-top (pop *directory-stack*))
        !            27:                (new-top (pop *directory-stack*)))
        !            28:            (push old-top *directory-stack*)
        !            29:            (push (chdir new-top) *directory-stack*))
        !            30:      else (push (chdir dir) *directory-stack*))
        !            31:   (format t "~a~%" *directory-stack*))
        !            32: 
        !            33: (tpl:alias "popd" ()
        !            34:   (if (> (length *directory-stack*) 1)
        !            35:       (pop *directory-stack*)
        !            36:     (format t "nothing to pop into~%"))
        !            37:   (chdir (car *directory-stack*))
        !            38:   (format t "~a~%" *directory-stack*))
        !            39: 
        !            40: (tpl:alias "dirs" ()
        !            41:   (format t "~a~%" *directory-stack*))
        !            42: 
        !            43: (tpl:alias ("cd" :string) (dir)
        !            44:   (setf (car *directory-stack*)
        !            45:     (apply #'chdir
        !            46:           (if (string= "" dir) nil (list dir))))
        !            47:   (format t "~a~%" *directory-stack*))
        !            48: 
        !            49: (tpl:alias "pwd" ()
        !            50:   (format t "process cwd = ~a~%*default-pathname-defaults* = ~a~%"
        !            51:          (namestring (current-directory))
        !            52:          (namestring (truename *default-pathname-defaults*))))

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.