emacs-devel
[Top][All Lists]
Advanced

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

RE: File modes facilities.


From: Drew Adams
Subject: RE: File modes facilities.
Date: Fri, 21 Oct 2005 22:39:07 -0700

        AFAIK M-x load-library accepts and properly completes both kinds
        of arguments.

    Yes, it seems to.  That's a change I had forgotten about.  (In the old
    days, load-library did no completion at all.)  However, load-file only
    reads file names, and only completes file names.

    Could load-file now be an alias to load-library?

Don't load-file and load-library complete the file name differently? Doesn't
load-library expect the library to be in the load-path, while load-file is
content to load a file even if it is not in the load-path?

  (defun load-library (library)
     (interactive
     (list (completing-read "Load library: " 'locate-file-completion
                            (cons load-path load-suffixes))))
    (load library))

The (cons load-path load-suffixes) makes me think this only works for
load-path files.

  (defun load-file (file)
    (interactive (list (let ((completion-ignored-extensions
                              (remove ".elc"
completion-ignored-extensions)))
                          (read-file-name "Load file: "))))
    (load (expand-file-name file) nil nil t))

This one has no connection with load-path.

Or am I misunderstanding the issue?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]