[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



Dear sirs

My name is Dong Ki, Kim, postgraduate student of University of Technology,
Sydney, Australia.  Recently our department purchased Allegro lisp Version 4.1
with Allegro composer version 2.0 and when I try to use Allegro composer, some
errors occur.  Could you please kindly advise me of solutions for the
following problems:

Problem1]

Emacs reports that it encountered an error loading .emacs.

I have copied the sample .emacs file located in the distribution at
 /emacs/fi/examples/emacs.el into my $HOME directory.  
But I don't know how I have to modify this file to fit my environment.
Allegro has been installed on Sun model 3/50 system. Particularly,
I found errors from two expressions in this sample file.

One is "(load "fi/site-init")" and the other is "(mycl)".

If I delete these two expressions, no errors are displayed.

Also, How do I have to modify the following two parts?
and what do they mean ?
 
1)(defvar emacs-interface-directory-version-alist
  '(("-1.5.2" . "/net/ice/usr/emacs/lisp-interface/Dists/dist-1.5.2"))
  "*An alist of the command line switch and directory in which fi/site-init
   lives for that version.")

2) (setq fi:common-lisp-directory (expand-file-name "~cxh/lisp/"))
   (setq fi:common-lisp-image-name "/usr/local/cl-4.1")

For your reference, the .emacs file I modified is shown below.
Are they correct?

Problem2]
========

Emacs reports that it can't find a load file "fi/site-init"

The "fi" subdirectory exists in /usr/local/emacs/lisp and "site-init" file
also is in /usr/local/emacs/lisp/fi. I don't know why Emacs can't find
this file.

The directory for Allegro lisp is /babel/allegro and the contents are:
README          bm              clx             ops5            xcw
SUNOS-patches   build           emacs           share
bin             cl              lib             sunview

and emacs directory has the following subdirectories
README          fi              patch           patch-3.2

It seems to me that installation is correct.  But I don't know
how to fix these problems.

I have read carefully manual page 14-10 to 14-12.
I could not solve these problems .
Please give me some advice on this.

**************************************************************
;; Sample .emacs file
;;
;; $Header: emacs.el,v 1.3 91/09/11 15:22:47 layer Exp $

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The following code implements selection of a particular version of the
;; emacs-lisp interface on the command line of emacs.
;;
;; Edit EMACS-INTERFACE-DIRECTORY-VERSION-ALIST (below) appropriately, and
;; you will be able to start emacs as:
;;
;;   % emacs -1.5.2
;;
;; and run ACL 3.1 with the 1.5.2 version of the emacs-lisp interface.

(defvar emacs-interface-directory-version-alist
    '(("-1.5.2" . "/usr/local/emacs/lisp"))
 ;'(("-1.5.2" . "/net/ice/usr/emacs/lisp-interface/Dists/dist-1.5.2"))
  "*An alist of the command line switch and directory in which fi/site-init
lives for that version.")

(defun handle-command-line-argument (arg function)
  (if (member-equal arg command-line-args)
      (progn
        (setq command-switch-alist
          (cons (cons arg 'identity) command-switch-alist))
        (or (funcall function arg) t))))

(defun member-equal (item list)
  "same as common lisp (member item list :test #'equal)"
  (let ((ptr list)
        (done nil)
        (result '()))
    (while (not (or done (atom ptr)))
      (cond ((equal item (car ptr))
             (setq done t)
             (setq result ptr)))
      (setq ptr (cdr ptr)))
    result))

(defun eli-version-switch-handler (version)
  (let ((dir (cdr (assoc version emacs-interface-directory-version-alist))))
    (if (null dir) (error "No directory for version %s" version))
    (if (not (file-exists-p dir)) (error "%s doesn't exist" dir))
    (setq load-path (cons dir load-path))))

(cond
 ((handle-command-line-argument "-1.5.2" 'eli-version-switch-handler)
  ;; variables for 1.5.2...
  )
 (t
  ;; variables for default version
  ))


;; Load the Franz Emacs-Lisp Interface.
(load "fi/site-init")

(setq fi:common-lisp-buffer-name "*mycl*") ;; the default is "*common-lisp*"

(setq fi:common-lisp-directory (expand-file-name "/usr/local/emacs/lisp/"))
(setq fi:common-lisp-image-name "/usr/local/cl-4.1")


(setq fi:common-lisp-image-arguments nil)

(setq fi:common-lisp-host "sparky")

(defun run-common-lisp ()
  "This function starts up lisp with your defaults"
  (interactive)
  (fi:common-lisp fi:common-lisp-buffer-name
                  fi:common-lisp-directory
                  fi:common-lisp-image-name
                  fi:common-lisp-image-arguments
                  fi:common-lisp-host))

;; Set up a keybinding for mycl.
(setq ctlx-3-map (make-keymap))
(define-key ctl-x-map "3" ctlx-3-map)
(define-key ctlx-3-map "l" 'mycl)

;; If you don't want to do the above, then this binding go to the
;; *common-lisp* buffer, causing the image to be run the first time it is
;; typed.
(define-key global-map "\C-xl" 'fi:common-lisp)


;; Start up a lisp image.
(mycl)

(put 'eval-expression 'disabled nil)

**************** End of .emacs file **********************
Thank you very much.


Dong Ki, Kim

PS : my email address is dkkim@socs.uts.edu.au