unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Nic Ferrier <nferrier@tapsellferrier.co.uk>
Subject: patch for locate-file-completion?
Date: 31 Mar 2004 23:31:16 +0100	[thread overview]
Message-ID: <87k7107iob.fsf@tapsellferrier.co.uk> (raw)
In-Reply-To: <pa67fsr6amg8$.4p3gjtb4y4i9.dlg@40tude.net>

I think locate-file-completion is broken, here's how:

    M-x load-library somepath-that-should-complete TAB

Mine causes an exception because of a nil path element in my
load-path. I'm not sure why I've got a nil path element in my
load-path but the docs for load-path say it is legal to have a nil
element.

Apologies if it's not really a problem, if there's some reason for the
exception I'd like to know.

If not, and there is a problem, here's a patch that fixes it:


Index: files.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/files.el,v
retrieving revision 1.686
diff -c -r1.686 files.el
*** files.el	27 Mar 2004 04:05:23 -0000	1.686
--- files.el	31 Mar 2004 22:26:37 -0000
***************
*** 617,623 ****
  	  (string-dir (file-name-directory string)))
        (dolist (dir (car path-and-suffixes))
  	(if string-dir (setq dir (expand-file-name string-dir dir)))
! 	(when (file-directory-p dir)
  	  (dolist (file (file-name-all-completions
  			 (file-name-nondirectory string) dir))
  	    (push (if string-dir (concat string-dir file) file) names)
--- 617,623 ----
  	  (string-dir (file-name-directory string)))
        (dolist (dir (car path-and-suffixes))
  	(if string-dir (setq dir (expand-file-name string-dir dir)))
! 	(when (and dir (file-directory-p dir))
  	  (dolist (file (file-name-all-completions
  			 (file-name-nondirectory string) dir))
  	    (push (if string-dir (concat string-dir file) file) names)

-- 
Nic Ferrier
http://www.tapsellferrier.co.uk

  parent reply	other threads:[~2004-03-31 22:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-30 19:31 `make' written in elisp Michael Schierl
2003-12-31 22:57 ` Richard Stallman
2003-12-31 23:14   ` Michael Schierl
2004-01-01 21:10     ` Richard Stallman
2004-01-01 21:37       ` Michael Schierl
2004-01-04 23:25 ` Stefan Monnier
2005-01-02 16:06   ` Richard Stallman
2005-01-02 23:22     ` David Kastrup
2005-01-02 23:55       ` Ralf Angeli
2005-01-03  0:07         ` David Kastrup
2005-01-03  0:25           ` Ralf Angeli
2005-01-03  4:32             ` Richard Stallman
2005-01-03  8:02               ` David Kastrup
2005-01-03  9:36                 ` Eli Zaretskii
2005-01-03 16:45                   ` Stefan Monnier
2005-01-03  9:10               ` Ralf Angeli
2005-01-03 18:29                 ` Richard Stallman
2005-01-03 19:28                   ` Ralf Angeli
2005-01-03 23:10                     ` David Kastrup
2005-01-04  3:38                     ` Richard Stallman
2005-01-04 11:17                       ` Ralf Angeli
2005-01-03  0:26       ` Stefan
2005-01-03 11:05         ` Stephen J. Turnbull
2005-01-03 17:16           ` Stefan Monnier
2005-01-04 12:00             ` Stephen J. Turnbull
2005-01-04 13:59               ` Stefan
2005-01-04 14:07                 ` Miles Bader
2004-03-31 22:31 ` Nic Ferrier [this message]
2004-04-01 17:34   ` patch for locate-file-completion? Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k7107iob.fsf@tapsellferrier.co.uk \
    --to=nferrier@tapsellferrier.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).