emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Can't use file name completion in Customize for "Program Files" subd


From: Richard M. Stallman
Subject: Re: Can't use file name completion in Customize for "Program Files" subdir
Date: Mon, 03 Oct 2005 01:09:44 -0400

    The problem seems to be these lines near the top of
    widget-complete-file

    (beg (save-excursion
                    (skip-chars-backward "^ ")
                    (point)))

    Are there actually situations where files are listed in custom
    variables with space seperators? Or is this code attempting to find
    the beginning of the widget? If the latter, there must be a better way
    to do that.

This change works when I try it.  Does it work for you?

*** wid-edit.el 24 Sep 2005 22:42:50 -0400      1.146
--- wid-edit.el 03 Oct 2005 00:50:32 -0400      
***************
*** 2991,2999 ****
    "Perform completion on file name preceding point."
    (interactive)
    (let* ((end (point))
!        (beg (save-excursion
!               (skip-chars-backward "^ ")
!               (point)))
         (pattern (buffer-substring beg end))
         (name-part (file-name-nondirectory pattern))
         (directory (file-name-directory pattern))
--- 2991,2997 ----
    "Perform completion on file name preceding point."
    (interactive)
    (let* ((end (point))
!        (beg (widget-field-start widget))
         (pattern (buffer-substring beg end))
         (name-part (file-name-nondirectory pattern))
         (directory (file-name-directory pattern))




reply via email to

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