/[cmucl]/src/hemlock/main.lisp
ViewVC logotype

Diff of /src/hemlock/main.lisp

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

revision 1.8 by chiles, Fri Oct 4 17:18:47 1991 UTC revision 1.9 by ram, Thu Oct 17 16:12:27 1991 UTC
# Line 255  Line 255 
255             &key (init t)             &key (init t)
256                  (display (cdr (assoc :display ext:*environment-list*))))                  (display (cdr (assoc :display ext:*environment-list*))))
257    "Invokes the editor, Hemlock.  If X is supplied and is a symbol, the    "Invokes the editor, Hemlock.  If X is supplied and is a symbol, the
258     definition of X is put into a buffer, and that buffer is selected.  If X     definition of X is put into a buffer, and that buffer is selected.  If X is
259     is a pathname, the file specified by X is visited in a new buffer.  If X     a pathname, the file specified by X is visited in a new buffer.  If X is not
260     is not supplied or Nil, the editor is entered in the same state as when     supplied or Nil, the editor is entered in the same state as when last
261     last exited.  When :init is supplied as t (the default), the file     exited.  When :init is supplied as t (the default), the file
262     \"hemlock-init.fasl\" or \"hemlock-init.lisp\" is loaded from the home or     \"hemlock-init.lisp\", or \".hemlock-init.lisp\" is loaded from the home
263     default directory, but the Lisp command line switch -hinit can be used to     directory, but the Lisp command line switch -hinit can be used to specify a
264     specify a different name.  If the argument is non-nil and not t, then it     different name.  Any compiled version of the source is preferred when
265     should be a pathname that will be merged with the home or default directory.     choosing the file to load.  If the argument is non-nil and not t, then it
266     The display argument is not currently supported."     should be a pathname that will be merged with the home directory."
267    (when *in-the-editor* (error "You are already in the editor, you bogon!"))    (when *in-the-editor* (error "You are already in the editor, you bogon!"))
268    (let ((*in-the-editor* t)    (let ((*in-the-editor* t)
269          (display (unless *editor-has-been-entered*          (display (unless *editor-has-been-entered*
# Line 313  Line 313 
313    
314  (defun maybe-load-hemlock-init (init)  (defun maybe-load-hemlock-init (init)
315    (when init    (when init
316      (let* ((name (case init      (let* ((switch (find "hinit" *command-line-switches*
317                     ((t) (let ((switch (find "hinit" *command-line-switches*                           :test #'string-equal
318                                              :test #'string-equal                           :key #'cmd-switch-name))
319                                              :key #'cmd-switch-name)))             (spec-name
320                            (if switch              (if (not (eq init t))
321                                (or (cmd-switch-value switch)                  init
322                                    (car (cmd-switch-words switch))                  (and switch
323                                    "hemlock-init")                       (or (cmd-switch-value switch)
324                                "hemlock-init")))                           (car (cmd-switch-words switch)))))))
325                     (t (pathname init)))))        (if spec-name
326        (load (merge-pathnames name (user-homedir-pathname))            (load (merge-pathnames spec-name (user-homedir-pathname))
327              :if-does-not-exist nil))))                  :if-does-not-exist nil)
328              (or (load "home:hemlock-init" :if-does-not-exist nil)
329                  (load "home:.hemlock-init" :if-does-not-exist nil))))))
330    
331    
332  ;;;; SAVE-ALL-BUFFERS.  ;;;; SAVE-ALL-BUFFERS.

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.5