[slime-devel] Some remarks

Bill_Clementson at peoplesoft.com Bill_Clementson at peoplesoft.com
Tue Apr 20 19:25:43 UTC 2004


Edi Weitz <edi at agharta.de> writes:

> On Tue, 20 Apr 2004 12:41:51 -0600, Bill_Clementson at peoplesoft.com wrote:
>
> > The function appears to be in GNU Emacs 21.3.5 but not in 21.3.1
>
> Ah, OK. Is that a version from CVS? I actually wanted to try a CVS
> Emacs anyway because it looks like they made some improvements to
> lisp-mode after the 21.3 release.
>
> <nitpick>
>   But of course SLIME shouldn't use this function as long as it is
>   advertised as being usable on GNU Emacs 20... :)
> </nitpick>

Yes, 21.3.5 is a CVS version. The SLIME maintainers will need to decide
whether they want to add the read-directory-name function to slime or
re-write it in order to support earlier emacs versions. FWIW, the function
is in files.el - here's the source:

(defun read-directory-name (prompt &optional dir default-dirname mustmatch
initial)
  "Read directory name, prompting with PROMPT and completing in directory
DIR.
Value is not expanded---you must call `expand-file-name' yourself.
Default name to DEFAULT-DIRNAME if user enters a null string.
 (If DEFAULT-DIRNAME is omitted, the current buffer's directory is used,
  except that if INITIAL is specified, that combined with DIR is used.)
Fourth arg MUSTMATCH non-nil means require existing directory's name.
 Non-nil and non-t means also require confirmation after completion.
Fifth arg INITIAL specifies text to start with.
DIR defaults to current buffer's directory default."
  (unless dir
    (setq dir default-directory))
  (unless default-dirname
    (setq default-dirname
        (if initial (concat dir initial) default-directory)))
  (read-file-name prompt dir default-dirname mustmatch initial
              'file-directory-p))

Cheers,
Bill







More information about the slime-devel mailing list