/[emacs]/emacs/lisp/files.el
ViewVC logotype

Diff of /emacs/lisp/files.el

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

revision 1.576 by rost, Wed May 22 23:29:23 2002 UTC revision 1.577 by kfstorm, Tue May 28 09:08:42 2002 UTC
# Line 469  However, on some systems, the function i Line 469  However, on some systems, the function i
469  that really does change some file names to canonicalize certain  that really does change some file names to canonicalize certain
470  patterns and to guarantee valid names."  patterns and to guarantee valid names."
471    filename)    filename)
472    
473    (defun read-directory-name (prompt &optional dir default-dirname mustmatch initial)
474      "Read directory name, prompting with PROMPT and completing in directory DIR.
475    Value is not expanded---you must call `expand-file-name' yourself.
476    Default name to DEFAULT-DIRNAME if user enters a null string.
477     (If DEFAULT-DIRNAME is omitted, the current buffer's directory is used,
478      except that if INITIAL is specified, that combined with DIR is used.)
479    Fourth arg MUSTMATCH non-nil means require existing directory's name.
480     Non-nil and non-t means also require confirmation after completion.
481    Fifth arg INITIAL specifies text to start with.
482    DIR defaults to current buffer's directory default."
483      (unless dir
484        (setq dir default-directory))
485      (unless default-dirname
486        (setq default-dirname
487              (if initial (concat dir initial) default-directory)))
488      (read-file-name prompt dir default-dirname mustmatch initial
489                      'file-directory-p))
490    
491    
492  (defun pwd ()  (defun pwd ()
493    "Show the current default directory."    "Show the current default directory."
# Line 517  Not actually set up until the first time Line 536  Not actually set up until the first time
536  If your environment includes a `CDPATH' variable, try each one of that  If your environment includes a `CDPATH' variable, try each one of that
537  colon-separated list of directories when resolving a relative directory name."  colon-separated list of directories when resolving a relative directory name."
538    (interactive    (interactive
539     (list (read-file-name "Change default directory: "     (list (read-directory-name "Change default directory: "
540                           default-directory default-directory                           default-directory default-directory
541                           (and (member cd-path '(nil ("./")))                           (and (member cd-path '(nil ("./")))
542                                (null (getenv "CDPATH"))))))                                (null (getenv "CDPATH"))))))

Legend:
Removed from v.1.576  
changed lines
  Added in v.1.577

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