GNU bug report logs -
#9511
Moving the point to / with C-M-f and C-M-b when reading a filename from minibuffer
Previous Next
Reported by: Masatake YAMATO <yamato <at> redhat.com>
Date: Thu, 15 Sep 2011 08:44:02 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 24.2
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Thank you for reviwing again.
=== modified file 'lisp/minibuffer.el'
*** lisp/minibuffer.el 2011-09-02 00:36:58 +0000
--- lisp/minibuffer.el 2011-09-15 13:48:51 +0000
***************
*** 1997,2002 ****
--- 1997,2020 ----
(funcall (or read-file-name-function #'read-file-name-default)
prompt dir default-filename mustmatch initial predicate))
+ (defvar minibuffer-local-filename-syntax
+ (let ((table (make-syntax-table))
+ (punctuation (car (string-to-syntax "."))))
+ ;; Convert all punctuation entries to symbol.
+ (map-char-table (lambda (c syntax)
+ (when (eq (car syntax) punctuation)
+ (modify-syntax-entry c "_" table)
+ ))
+ table)
+ (mapc
+ (lambda (c)
+ (modify-syntax-entry c "." table))
+ '(?/
+ ?: ?\\
+ ))
+ table)
+ "Syntax table to be used in minibuffer for reading file name.")
+
;; minibuffer-completing-file-name is a variable used internally in minibuf.c
;; to determine whether to use minibuffer-local-filename-completion-map or
;; minibuffer-local-completion-map. It shouldn't be exported to Elisp.
***************
*** 2065,2071 ****
(lambda ()
(with-current-buffer
(window-buffer (minibuffer-selected-window))
! (read-file-name--defaults dir initial)))))
(completing-read prompt 'read-file-name-internal
pred mustmatch insdef
'file-name-history default-filename)))
--- 2083,2091 ----
(lambda ()
(with-current-buffer
(window-buffer (minibuffer-selected-window))
! (read-file-name--defaults dir initial))))
! (set-syntax-table minibuffer-local-filename-syntax)
! )
(completing-read prompt 'read-file-name-internal
pred mustmatch insdef
'file-name-history default-filename)))
This bug report was last modified 13 years and 92 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.