Commit cc356a5d authored by Stefan Monnier's avatar Stefan Monnier
Browse files

Remove unnecessary use of minibuffer-completing-file-name.

* lisp/ffap.el: Remove old code for obsolete package.
(ffap-complete-as-file-p): Remove.
* lisp/mh-e/mh-utils.el (minibuffer-completing-file-name): Don't declare.
parent b4ff4f1f
2012-04-25 Stefan Monnier <monnier@iro.umontreal.ca>
* ffap.el: Remove old code for obsolete package.
(ffap-complete-as-file-p): Remove.
Use completion-table-with-quoting for comint and pcomplete.
* comint.el (comint--unquote&requote-argument)
(comint--unquote-argument, comint--requote-argument): New functions.
......
......@@ -1340,20 +1340,6 @@ which may actually result in an URL rather than a filename."
;; We must inform complete about whether our completion function
;; will do filename style completion.
(defun ffap-complete-as-file-p ()
;; Will `minibuffer-completion-table' complete the minibuffer
;; contents as a filename? Assumes the minibuffer is current.
;; Note: t and non-nil mean somewhat different reasons.
(if (eq minibuffer-completion-table 'ffap-read-file-or-url-internal)
(not (ffap-url-p (buffer-string))) ; t
(and minibuffer-completing-file-name '(t)))) ;list
(and
(featurep 'complete)
(if (boundp 'PC-completion-as-file-name-predicate)
;; modern version of complete.el, just set the variable:
(setq PC-completion-as-file-name-predicate 'ffap-complete-as-file-p)))
;;; Highlighting (`ffap-highlight'):
;;
......
This diff is collapsed.
......@@ -732,8 +732,7 @@ See Info node `(elisp) Programmed Completion' for details."
;; Shush compiler.
(mh-do-in-xemacs
(defvar completion-root-regexp)
(defvar minibuffer-completing-file-name))
(defvar completion-root-regexp))
(defun mh-folder-completing-read (prompt default allow-root-folder-flag)
"Read folder name with PROMPT and default result DEFAULT.
......
......@@ -2280,7 +2280,7 @@ and `read-file-name-function'."
;; use (eq minibuffer-completion-table #'read-file-name-internal), which is
;; probably even worse. Maybe We should add some read-file-name-setup-hook
;; instead, but for now, let's keep this non-obsolete.
;;(make-obsolete-variable 'minibuffer-completing-file-name nil "24.1" 'get)
;;(make-obsolete-variable 'minibuffer-completing-file-name nil "future" 'get)
(defun read-file-name-default (prompt &optional dir default-filename mustmatch initial predicate)
"Default method for reading file names.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment