comparison lisp/comint.el @ 49549:99be3a1e2589

Cygwin support patch.
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 31 Jan 2003 15:24:20 +0000
parents 0bf251ecfd1a
children 379cf00d7016 d7ddb3e565de
comparison
equal deleted inserted replaced
49548:8b1c605f8c9b 49549:99be3a1e2589
2534 "Prefix prepended to absolute file names taken from process input. 2534 "Prefix prepended to absolute file names taken from process input.
2535 This is used by comint's and shell's completion functions, and by shell's 2535 This is used by comint's and shell's completion functions, and by shell's
2536 directory tracking functions.") 2536 directory tracking functions.")
2537 2537
2538 (defvar comint-file-name-chars 2538 (defvar comint-file-name-chars
2539 (if (memq system-type '(ms-dos windows-nt)) 2539 (if (memq system-type '(ms-dos windows-nt cygwin))
2540 "~/A-Za-z0-9_^$!#%&{}@`'.,:()-" 2540 "~/A-Za-z0-9_^$!#%&{}@`'.,:()-"
2541 "~/A-Za-z0-9+@:_.$#%,={}-") 2541 "~/A-Za-z0-9+@:_.$#%,={}-")
2542 "String of characters valid in a file name. 2542 "String of characters valid in a file name.
2543 Note that all non-ASCII characters are considered valid in a file name 2543 Note that all non-ASCII characters are considered valid in a file name
2544 regardless of what this variable says. 2544 regardless of what this variable says.
2659 (comint-dynamic-complete-as-filename))) 2659 (comint-dynamic-complete-as-filename)))
2660 2660
2661 (defun comint-dynamic-complete-as-filename () 2661 (defun comint-dynamic-complete-as-filename ()
2662 "Dynamically complete at point as a filename. 2662 "Dynamically complete at point as a filename.
2663 See `comint-dynamic-complete-filename'. Returns t if successful." 2663 See `comint-dynamic-complete-filename'. Returns t if successful."
2664 (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt))) 2664 (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin)))
2665 (completion-ignored-extensions comint-completion-fignore) 2665 (completion-ignored-extensions comint-completion-fignore)
2666 ;; If we bind this, it breaks remote directory tracking in rlogin.el. 2666 ;; If we bind this, it breaks remote directory tracking in rlogin.el.
2667 ;; I think it was originally bound to solve file completion problems, 2667 ;; I think it was originally bound to solve file completion problems,
2668 ;; but subsequent changes may have made this unnecessary. sm. 2668 ;; but subsequent changes may have made this unnecessary. sm.
2669 ;;(file-name-handler-alist nil) 2669 ;;(file-name-handler-alist nil)
2748 Returns `shortest' if completed with the shortest of the completion matches. 2748 Returns `shortest' if completed with the shortest of the completion matches.
2749 Returns `partial' if completed as far as possible with the completion matches. 2749 Returns `partial' if completed as far as possible with the completion matches.
2750 Returns `listed' if a completion listing was shown. 2750 Returns `listed' if a completion listing was shown.
2751 2751
2752 See also `comint-dynamic-complete-filename'." 2752 See also `comint-dynamic-complete-filename'."
2753 (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt))) 2753 (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin)))
2754 (suffix (cond ((not comint-completion-addsuffix) "") 2754 (suffix (cond ((not comint-completion-addsuffix) "")
2755 ((not (consp comint-completion-addsuffix)) " ") 2755 ((not (consp comint-completion-addsuffix)) " ")
2756 (t (cdr comint-completion-addsuffix)))) 2756 (t (cdr comint-completion-addsuffix))))
2757 (candidates (mapcar (function (lambda (x) (list x))) candidates)) 2757 (candidates (mapcar (function (lambda (x) (list x))) candidates))
2758 (completions (all-completions stub candidates))) 2758 (completions (all-completions stub candidates)))
2789 2789
2790 2790
2791 (defun comint-dynamic-list-filename-completions () 2791 (defun comint-dynamic-list-filename-completions ()
2792 "List in help buffer possible completions of the filename at point." 2792 "List in help buffer possible completions of the filename at point."
2793 (interactive) 2793 (interactive)
2794 (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt))) 2794 (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin)))
2795 ;; If we bind this, it breaks remote directory tracking in rlogin.el. 2795 ;; If we bind this, it breaks remote directory tracking in rlogin.el.
2796 ;; I think it was originally bound to solve file completion problems, 2796 ;; I think it was originally bound to solve file completion problems,
2797 ;; but subsequent changes may have made this unnecessary. sm. 2797 ;; but subsequent changes may have made this unnecessary. sm.
2798 ;;(file-name-handler-alist nil) 2798 ;;(file-name-handler-alist nil)
2799 (filename (or (comint-match-partial-filename) "")) 2799 (filename (or (comint-match-partial-filename) ""))