aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuanma Barranquero2003-01-31 15:24:20 +0000
committerJuanma Barranquero2003-01-31 15:24:20 +0000
commitc60ee5e70f7ae20f1bbf7d0e2d36f40658f3dff1 (patch)
tree7d28300d64e41bf2aeed37bc8f1293f9fc52a36a /lisp
parent2454c12d458c60b871f6f36c3fd6ba752aad61bf (diff)
downloademacs-c60ee5e70f7ae20f1bbf7d0e2d36f40658f3dff1.tar.gz
emacs-c60ee5e70f7ae20f1bbf7d0e2d36f40658f3dff1.zip
Cygwin support patch.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog18
-rw-r--r--lisp/comint.el8
-rw-r--r--lisp/dired-aux.el2
-rw-r--r--lisp/dired.el22
-rw-r--r--lisp/dirtrack.el74
-rw-r--r--lisp/dos-w32.el2
-rw-r--r--lisp/fast-lock.el10
-rw-r--r--lisp/filecache.el6
-rw-r--r--lisp/files.el14
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/nnheader.el6
-rw-r--r--lisp/hippie-exp.el128
-rw-r--r--lisp/international/mule.el2
-rw-r--r--lisp/net/browse-url.el6
-rw-r--r--lisp/pcomplete.el2
-rw-r--r--lisp/recentf.el10
-rw-r--r--lisp/shell.el2
-rw-r--r--lisp/woman.el2
18 files changed, 171 insertions, 147 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8c54bba61af..45dae9f96dd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,21 @@
12003-01-31 Joe Buehler <jhpb@draco.hekimian.com>
2
3 * comint.el:
4 * dired-aux.el:
5 * dired.el:
6 * dirtrack.el:
7 * dos-w32.el:
8 * fast-lock.el:
9 * filecache.el:
10 * files.el:
11 * hippie-exp.el:
12 * international/mule.el:
13 * net/browse-url.el:
14 * pcomplete.el:
15 * recentf.el:
16 * shell.el:
17 * woman.el: Added cygwin to system-type comparisons.
18
12003-01-31 Francesco Potort,Al(B <pot@gnu.org> 192003-01-31 Francesco Potort,Al(B <pot@gnu.org>
2 20
3 * mail/undigest.el (rmail-forward-separator-regex): New custom 21 * mail/undigest.el (rmail-forward-separator-regex): New custom
diff --git a/lisp/comint.el b/lisp/comint.el
index 0577d96a61e..126f05b1a79 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -2536,7 +2536,7 @@ This is used by comint's and shell's completion functions, and by shell's
2536directory tracking functions.") 2536directory 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.
@@ -2661,7 +2661,7 @@ Returns t if successful."
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.
2663See `comint-dynamic-complete-filename'. Returns t if successful." 2663See `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,
@@ -2750,7 +2750,7 @@ Returns `partial' if completed as far as possible with the completion matches.
2750Returns `listed' if a completion listing was shown. 2750Returns `listed' if a completion listing was shown.
2751 2751
2752See also `comint-dynamic-complete-filename'." 2752See 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))))
@@ -2791,7 +2791,7 @@ See also `comint-dynamic-complete-filename'."
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.
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 70e14730bd3..ca6f12e0fc7 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1258,7 +1258,7 @@ Optional arg HOW-TO is used to set the value of the into-dir variable
1258 ;; will return t because the filesystem is 1258 ;; will return t because the filesystem is
1259 ;; case-insensitive, and Emacs will try to move 1259 ;; case-insensitive, and Emacs will try to move
1260 ;; foo -> foo/foo, which fails. 1260 ;; foo -> foo/foo, which fails.
1261 (if (and (memq system-type '(ms-dos windows-nt)) 1261 (if (and (memq system-type '(ms-dos windows-nt cygwin))
1262 (eq op-symbol 'move) 1262 (eq op-symbol 'move)
1263 dired-one-file 1263 dired-one-file
1264 (string= (downcase 1264 (string= (downcase
diff --git a/lisp/dired.el b/lisp/dired.el
index c504e7a1185..d658960a35e 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -65,7 +65,7 @@ some of the `ls' switches are not supported; see the doc string of
65 65
66;;;###autoload 66;;;###autoload
67(defvar dired-chown-program 67(defvar dired-chown-program
68 (if (memq system-type '(hpux dgux usg-unix-v irix linux gnu/linux)) 68 (if (memq system-type '(hpux dgux usg-unix-v irix linux gnu/linux cygwin))
69 "chown" 69 "chown"
70 (if (file-exists-p "/usr/sbin/chown") 70 (if (file-exists-p "/usr/sbin/chown")
71 "/usr/sbin/chown" 71 "/usr/sbin/chown"
@@ -299,7 +299,7 @@ Subexpression 2 must end right before the \\n or \\r.")
299 '(".+" (dired-move-to-filename) nil (0 font-lock-function-name-face))) 299 '(".+" (dired-move-to-filename) nil (0 font-lock-function-name-face)))
300 ;; 300 ;;
301 ;; Symbolic links. 301 ;; Symbolic links.
302 (list dired-re-sym 302 (list dired-re-sym
303 '(".+" (dired-move-to-filename) nil (0 font-lock-keyword-face))) 303 '(".+" (dired-move-to-filename) nil (0 font-lock-keyword-face)))
304 ;; 304 ;;
305 ;; Files suffixed with `completion-ignored-extensions'. 305 ;; Files suffixed with `completion-ignored-extensions'.
@@ -530,11 +530,11 @@ If DIRNAME is already in a dired buffer, that buffer is used without refresh."
530 (setq buffer (create-file-buffer (directory-file-name dirname))))) 530 (setq buffer (create-file-buffer (directory-file-name dirname)))))
531 (set-buffer buffer) 531 (set-buffer buffer)
532 (if (not new-buffer-p) ; existing buffer ... 532 (if (not new-buffer-p) ; existing buffer ...
533 (cond (switches ; ... but new switches 533 (cond (switches ; ... but new switches
534 ;; file list may have changed 534 ;; file list may have changed
535 (setq dired-directory dir-or-list) 535 (setq dired-directory dir-or-list)
536 ;; this calls dired-revert 536 ;; this calls dired-revert
537 (dired-sort-other switches)) 537 (dired-sort-other switches))
538 ;; If directory has changed on disk, offer to revert. 538 ;; If directory has changed on disk, offer to revert.
539 ((if (let ((attributes (file-attributes dirname)) 539 ((if (let ((attributes (file-attributes dirname))
540 (modtime (visited-file-modtime))) 540 (modtime (visited-file-modtime)))
@@ -1769,7 +1769,7 @@ You can then feed the file name(s) to other commands with \\[yank]."
1769 (substring pattern matched-in-pattern)) 1769 (substring pattern matched-in-pattern))
1770 "\\'"))) 1770 "\\'")))
1771 1771
1772 1772
1773 1773
1774(defun dired-advertise () 1774(defun dired-advertise ()
1775 ;;"Advertise in variable `dired-buffers' that we dired `default-directory'." 1775 ;;"Advertise in variable `dired-buffers' that we dired `default-directory'."
@@ -2053,7 +2053,7 @@ Anything else means ask for each directory."
2053 (const :tag "Confirm for each top directory only" top)) 2053 (const :tag "Confirm for each top directory only" top))
2054 :group 'dired) 2054 :group 'dired)
2055 2055
2056;; Match anything but `.' and `..'. 2056;; Match anything but `.' and `..'.
2057(defvar dired-re-no-dot "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*") 2057(defvar dired-re-no-dot "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")
2058 2058
2059;; Delete file, possibly delete a directory and all its files. 2059;; Delete file, possibly delete a directory and all its files.
@@ -2174,7 +2174,7 @@ if there are no flagged files."
2174 (setq success-list (cons (buffer-name buf) success-list))))) 2174 (setq success-list (cons (buffer-name buf) success-list)))))
2175 success-list)) 2175 success-list))
2176 2176
2177;; Delete the entry for FILE from 2177;; Delete the entry for FILE from
2178(defun dired-delete-entry (file) 2178(defun dired-delete-entry (file)
2179 (save-excursion 2179 (save-excursion
2180 (and (dired-goto-file file) 2180 (and (dired-goto-file file)
@@ -2572,7 +2572,7 @@ A prefix argument says to unflag those files instead."
2572(defvar dired-garbage-files-regexp 2572(defvar dired-garbage-files-regexp
2573 (concat (regexp-opt 2573 (concat (regexp-opt
2574 '(".log" ".toc" ".dvi" ".bak" ".orig" ".rej" ".aux")) 2574 '(".log" ".toc" ".dvi" ".bak" ".orig" ".rej" ".aux"))
2575 "\\'") 2575 "\\'")
2576 "*Regular expression to match \"garbage\" files for `dired-flag-garbage-files'.") 2576 "*Regular expression to match \"garbage\" files for `dired-flag-garbage-files'.")
2577 2577
2578(defun dired-flag-garbage-files () 2578(defun dired-flag-garbage-files ()
@@ -2632,7 +2632,7 @@ OLD and NEW are both characters used to mark files."
2632 2632
2633(defun dired-unmark-all-files (mark &optional arg) 2633(defun dired-unmark-all-files (mark &optional arg)
2634 "Remove a specific mark (or any mark) from every file. 2634 "Remove a specific mark (or any mark) from every file.
2635After this command, type the mark character to remove, 2635After this command, type the mark character to remove,
2636or type RET to remove all marks. 2636or type RET to remove all marks.
2637With prefix arg, query for each marked file. 2637With prefix arg, query for each marked file.
2638Type \\[help-command] at that time for help." 2638Type \\[help-command] at that time for help."
@@ -2683,7 +2683,7 @@ Thus, use \\[backward-page] to find the beginning of a group of errors."
2683 ;; Log a message or the contents of a buffer. 2683 ;; Log a message or the contents of a buffer.
2684 ;; If LOG is a string and there are more args, it is formatted with 2684 ;; If LOG is a string and there are more args, it is formatted with
2685 ;; those ARGS. Usually the LOG string ends with a \n. 2685 ;; those ARGS. Usually the LOG string ends with a \n.
2686 ;; End each bunch of errors with (dired-log t): 2686 ;; End each bunch of errors with (dired-log t):
2687 ;; this inserts the current time and buffer at the start of the page, 2687 ;; this inserts the current time and buffer at the start of the page,
2688 ;; and \f (formfeed) at the end. 2688 ;; and \f (formfeed) at the end.
2689 (let ((obuf (current-buffer))) 2689 (let ((obuf (current-buffer)))
@@ -3076,7 +3076,7 @@ Use \\[dired-hide-subdir] to (un)hide a particular subdirectory."
3076(autoload 'dired-show-file-type "dired-aux" 3076(autoload 'dired-show-file-type "dired-aux"
3077 "Print the type of FILE, according to the `file' command. 3077 "Print the type of FILE, according to the `file' command.
3078If FILE is a symbolic link and the optional argument DEREF-SYMLINKS is 3078If FILE is a symbolic link and the optional argument DEREF-SYMLINKS is
3079true then the type of the file linked to by FILE is printed instead." 3079true then the type of the file linked to by FILE is printed instead."
3080 t) 3080 t)
3081 3081
3082(autoload 'dired-run-shell-command "dired-aux") 3082(autoload 'dired-run-shell-command "dired-aux")
diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el
index 572435d357b..d8590f60add 100644
--- a/lisp/dirtrack.el
+++ b/lisp/dirtrack.el
@@ -5,7 +5,7 @@
5;; Author: Peter Breton <pbreton@cs.umb.edu> 5;; Author: Peter Breton <pbreton@cs.umb.edu>
6;; Created: Sun Nov 17 1996 6;; Created: Sun Nov 17 1996
7;; Keywords: processes 7;; Keywords: processes
8;; Time-stamp: <1999-02-21 01:27:24 pbreton> 8;; Time-stamp: <2003-01-31 16:15:05 jbarranquero>
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -42,8 +42,8 @@
42;; 1) Set your shell's prompt to contain the current working directory. 42;; 1) Set your shell's prompt to contain the current working directory.
43;; You may need to consult your shell's documentation to find out how to 43;; You may need to consult your shell's documentation to find out how to
44;; do this. 44;; do this.
45;; 45;;
46;; Note that directory tracking is done by matching regular expressions, 46;; Note that directory tracking is done by matching regular expressions,
47;; therefore it is *VERY IMPORTANT* for your prompt to be easily 47;; therefore it is *VERY IMPORTANT* for your prompt to be easily
48;; distinguishable from other output. If your prompt regexp is too general, 48;; distinguishable from other output. If your prompt regexp is too general,
49;; you will see error messages from the dirtrack filter as it attempts to cd 49;; you will see error messages from the dirtrack filter as it attempts to cd
@@ -52,16 +52,16 @@
52;; 2) Set the variable `dirtrack-list' to an appropriate value. This 52;; 2) Set the variable `dirtrack-list' to an appropriate value. This
53;; should be a list of two elements: the first is a regular expression 53;; should be a list of two elements: the first is a regular expression
54;; which matches your prompt up to and including the pathname part. 54;; which matches your prompt up to and including the pathname part.
55;; The second is a number which tells which regular expression group to 55;; The second is a number which tells which regular expression group to
56;; match to extract only the pathname. If you use a multi-line prompt, 56;; match to extract only the pathname. If you use a multi-line prompt,
57;; add 't' as a third element. Note that some of the functions in 57;; add 't' as a third element. Note that some of the functions in
58;; 'comint.el' assume a single-line prompt (eg, comint-bol). 58;; 'comint.el' assume a single-line prompt (eg, comint-bol).
59;; 59;;
60;; Determining this information may take some experimentation. Setting 60;; Determining this information may take some experimentation. Setting
61;; the variable `dirtrack-debug' may help; it causes the directory-tracking 61;; the variable `dirtrack-debug' may help; it causes the directory-tracking
62;; filter to log messages to the buffer `dirtrack-debug-buffer'. You can easily 62;; filter to log messages to the buffer `dirtrack-debug-buffer'. You can easily
63;; toggle this setting with the `dirtrack-debug-toggle' function. 63;; toggle this setting with the `dirtrack-debug-toggle' function.
64;; 64;;
65;; 3) Add a hook to shell-mode to enable the directory tracking: 65;; 3) Add a hook to shell-mode to enable the directory tracking:
66;; 66;;
67;; (add-hook 'shell-mode-hook 67;; (add-hook 'shell-mode-hook
@@ -83,26 +83,26 @@
83;; 'dirtrack-list' is set to (list "^\\([/~].*\\)\nemacs@[^%]+% *" 1 t) 83;; 'dirtrack-list' is set to (list "^\\([/~].*\\)\nemacs@[^%]+% *" 1 t)
84;; 84;;
85;; I'd appreciate other examples from people who use this package. 85;; I'd appreciate other examples from people who use this package.
86;; 86;;
87;; Here's one from Stephen Eglen: 87;; Here's one from Stephen Eglen:
88;; 88;;
89;; Running under tcsh: 89;; Running under tcsh:
90;; (setq-default dirtrack-list '("^%E \\([^ ]+\\)" 1)) 90;; (setq-default dirtrack-list '("^%E \\([^ ]+\\)" 1))
91;; 91;;
92;; It might be worth mentioning in your file that emacs sources start up 92;; It might be worth mentioning in your file that emacs sources start up
93;; files of the form: ~/.emacs_<SHELL> where <SHELL> is the name of the 93;; files of the form: ~/.emacs_<SHELL> where <SHELL> is the name of the
94;; shell. So for example, I have the following in ~/.emacs_tcsh: 94;; shell. So for example, I have the following in ~/.emacs_tcsh:
95;; 95;;
96;; set prompt = "%%E %~ %h% " 96;; set prompt = "%%E %~ %h% "
97;; 97;;
98;; This produces a prompt of the form: 98;; This produces a prompt of the form:
99;; %E /var/spool 10% 99;; %E /var/spool 10%
100;; 100;;
101;; This saves me from having to use the %E prefix in other non-emacs 101;; This saves me from having to use the %E prefix in other non-emacs
102;; shells. 102;; shells.
103;; 103;;
104;; A final note: 104;; A final note:
105;; 105;;
106;; I run LOTS of shell buffers through Emacs, sometimes as different users 106;; I run LOTS of shell buffers through Emacs, sometimes as different users
107;; (eg, when logged in as myself, I'll run a root shell in the same Emacs). 107;; (eg, when logged in as myself, I'll run a root shell in the same Emacs).
108;; If you do this, and the shell prompt contains a ~, Emacs will interpret 108;; If you do this, and the shell prompt contains a ~, Emacs will interpret
@@ -134,11 +134,11 @@
134(defcustom dirtrack-list (list "^emacs \\([a-zA-Z]:.*\\)>" 1) 134(defcustom dirtrack-list (list "^emacs \\([a-zA-Z]:.*\\)>" 1)
135 "*List for directory tracking. 135 "*List for directory tracking.
136First item is a regexp that describes where to find the path in a prompt. 136First item is a regexp that describes where to find the path in a prompt.
137Second is a number, the regexp group to match. Optional third item is 137Second is a number, the regexp group to match. Optional third item is
138whether the prompt is multi-line. If nil or omitted, prompt is assumed to 138whether the prompt is multi-line. If nil or omitted, prompt is assumed to
139be on a single line." 139be on a single line."
140 :group 'dirtrack 140 :group 'dirtrack
141 :type '(sexp (regexp :tag "Prompt Expression") 141 :type '(sexp (regexp :tag "Prompt Expression")
142 (integer :tag "Regexp Group") 142 (integer :tag "Regexp Group")
143 (boolean :tag "Multiline Prompt") 143 (boolean :tag "Multiline Prompt")
144 ) 144 )
@@ -166,8 +166,8 @@ be on a single line."
166 166
167(make-variable-buffer-local 'dirtrackp) 167(make-variable-buffer-local 'dirtrackp)
168 168
169(defcustom dirtrack-directory-function 169(defcustom dirtrack-directory-function
170 (if (memq system-type (list 'ms-dos 'windows-nt)) 170 (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
171 'dirtrack-windows-directory-function 171 'dirtrack-windows-directory-function
172 'dirtrack-default-directory-function) 172 'dirtrack-default-directory-function)
173 "*Function to apply to the prompt directory for comparison purposes." 173 "*Function to apply to the prompt directory for comparison purposes."
@@ -175,8 +175,8 @@ be on a single line."
175 :type 'function 175 :type 'function
176 ) 176 )
177 177
178(defcustom dirtrack-canonicalize-function 178(defcustom dirtrack-canonicalize-function
179 (if (memq system-type (list 'ms-dos 'windows-nt)) 179 (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
180 'downcase 'identity) 180 'downcase 'identity)
181 "*Function to apply to the default directory for comparison purposes." 181 "*Function to apply to the default directory for comparison purposes."
182 :group 'dirtrack 182 :group 'dirtrack
@@ -204,7 +204,7 @@ Such a directory ends with a forward slash."
204 204
205(defun dirtrack-windows-directory-function (dir) 205(defun dirtrack-windows-directory-function (dir)
206 "Return a canonical directory for comparison purposes. 206 "Return a canonical directory for comparison purposes.
207Such a directory is all lowercase, has forward-slashes as delimiters, 207Such a directory is all lowercase, has forward-slashes as delimiters,
208and ends with a forward slash." 208and ends with a forward slash."
209 (let ((directory dir)) 209 (let ((directory dir))
210 (setq directory (downcase (dirtrack-replace-slash directory t))) 210 (setq directory (downcase (dirtrack-replace-slash directory t)))
@@ -217,13 +217,13 @@ and ends with a forward slash."
217 217
218(defun dirtrack-replace-slash (string &optional opposite) 218(defun dirtrack-replace-slash (string &optional opposite)
219 "Replace forward slashes with backwards ones. 219 "Replace forward slashes with backwards ones.
220If additional argument is non-nil, replace backwards slashes with 220If additional argument is non-nil, replace backwards slashes with
221forward ones." 221forward ones."
222 (let ((orig (if opposite 222 (let ((orig (if opposite
223 dirtrack-backward-slash 223 dirtrack-backward-slash
224 dirtrack-forward-slash)) 224 dirtrack-forward-slash))
225 (replace (if opposite 225 (replace (if opposite
226 dirtrack-forward-slash 226 dirtrack-forward-slash
227 dirtrack-backward-slash)) 227 dirtrack-backward-slash))
228 (newstring string) 228 (newstring string)
229 ) 229 )
@@ -266,7 +266,7 @@ You can toggle directory tracking by using the function `dirtrack-toggle'.
266If directory tracking does not seem to be working, you can use the 266If directory tracking does not seem to be working, you can use the
267function `dirtrack-debug-toggle' to turn on debugging output. 267function `dirtrack-debug-toggle' to turn on debugging output.
268 268
269You can enable directory tracking by adding this function to 269You can enable directory tracking by adding this function to
270`comint-output-filter-functions'. 270`comint-output-filter-functions'.
271" 271"
272 (if (null dirtrackp) 272 (if (null dirtrackp)
@@ -286,33 +286,33 @@ You can enable directory tracking by adding this function to
286 ;; No match 286 ;; No match
287 (if (null matched) 287 (if (null matched)
288 (and dirtrack-debug 288 (and dirtrack-debug
289 (dirtrack-debug-message 289 (dirtrack-debug-message
290 (format 290 (format
291 "Input `%s' failed to match regexp: %s" 291 "Input `%s' failed to match regexp: %s"
292 input dirtrack-regexp))) 292 input dirtrack-regexp)))
293 (setq prompt-path 293 (setq prompt-path
294 (substring input 294 (substring input
295 (match-beginning match-num) (match-end match-num))) 295 (match-beginning match-num) (match-end match-num)))
296 ;; Empty string 296 ;; Empty string
297 (if (not (> (length prompt-path) 0)) 297 (if (not (> (length prompt-path) 0))
298 (and dirtrack-debug 298 (and dirtrack-debug
299 (dirtrack-debug-message "Match is empty string")) 299 (dirtrack-debug-message "Match is empty string"))
300 ;; Transform prompts into canonical forms 300 ;; Transform prompts into canonical forms
301 (setq prompt-path (funcall dirtrack-directory-function 301 (setq prompt-path (funcall dirtrack-directory-function
302 prompt-path)) 302 prompt-path))
303 (setq current-dir (funcall dirtrack-canonicalize-function 303 (setq current-dir (funcall dirtrack-canonicalize-function
304 current-dir)) 304 current-dir))
305 (and dirtrack-debug 305 (and dirtrack-debug
306 (dirtrack-debug-message 306 (dirtrack-debug-message
307 (format 307 (format
308 "Prompt is %s\nCurrent directory is %s" 308 "Prompt is %s\nCurrent directory is %s"
309 prompt-path current-dir))) 309 prompt-path current-dir)))
310 ;; Compare them 310 ;; Compare them
311 (if (or (string= current-dir prompt-path) 311 (if (or (string= current-dir prompt-path)
312 (string= current-dir 312 (string= current-dir
313 (abbreviate-file-name prompt-path))) 313 (abbreviate-file-name prompt-path)))
314 (and dirtrack-debug 314 (and dirtrack-debug
315 (dirtrack-debug-message 315 (dirtrack-debug-message
316 (format "Not changing directory"))) 316 (format "Not changing directory")))
317 ;; It's possible that Emacs will think the directory 317 ;; It's possible that Emacs will think the directory
318 ;; won't exist (eg, rlogin buffers) 318 ;; won't exist (eg, rlogin buffers)
@@ -321,7 +321,7 @@ You can enable directory tracking by adding this function to
321 (and (shell-process-cd prompt-path) 321 (and (shell-process-cd prompt-path)
322 (run-hooks 'dirtrack-directory-change-hook) 322 (run-hooks 'dirtrack-directory-change-hook)
323 dirtrack-debug 323 dirtrack-debug
324 (dirtrack-debug-message 324 (dirtrack-debug-message
325 (format "Changing directory to %s" prompt-path))) 325 (format "Changing directory to %s" prompt-path)))
326 (error "Directory %s does not exist" prompt-path))) 326 (error "Directory %s does not exist" prompt-path)))
327 ))))) 327 )))))
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el
index 81aa9c28cd7..4768586b331 100644
--- a/lisp/dos-w32.el
+++ b/lisp/dos-w32.el
@@ -197,7 +197,7 @@ the directory prefix corresponding to the filesystem.")
197(defun untranslated-canonical-name (filename) 197(defun untranslated-canonical-name (filename)
198 "Return FILENAME in a canonicalized form for use with the functions 198 "Return FILENAME in a canonicalized form for use with the functions
199dealing with untranslated filesystems." 199dealing with untranslated filesystems."
200 (if (memq system-type '(ms-dos windows-nt)) 200 (if (memq system-type '(ms-dos windows-nt cygwin))
201 ;; The canonical form for DOS/W32 is with A-Z downcased and all 201 ;; The canonical form for DOS/W32 is with A-Z downcased and all
202 ;; directory separators changed to directory-sep-char. 202 ;; directory separators changed to directory-sep-char.
203 (let ((name nil)) 203 (let ((name nil))
diff --git a/lisp/fast-lock.el b/lisp/fast-lock.el
index 804b8df9245..c37a4adb192 100644
--- a/lisp/fast-lock.el
+++ b/lisp/fast-lock.el
@@ -34,7 +34,7 @@
34;; See also the lazy-lock package. (But don't use the two at the same time!) 34;; See also the lazy-lock package. (But don't use the two at the same time!)
35 35
36;; Installation: 36;; Installation:
37;; 37;;
38;; Put in your ~/.emacs: 38;; Put in your ~/.emacs:
39;; 39;;
40;; (setq font-lock-support-mode 'fast-lock-mode) 40;; (setq font-lock-support-mode 'fast-lock-mode)
@@ -67,7 +67,7 @@
67;; 1.01--2.00: complete rewrite---not worth the space to document 67;; 1.01--2.00: complete rewrite---not worth the space to document
68;; - Changed structure of text properties cache and threw out file mod checks 68;; - Changed structure of text properties cache and threw out file mod checks
69;; 2.00--2.01: 69;; 2.00--2.01:
70;; - Made `condition-case' forms understand `quit'. 70;; - Made `condition-case' forms understand `quit'.
71;; - Made `fast-lock' require `font-lock' 71;; - Made `fast-lock' require `font-lock'
72;; - Made `fast-lock-cache-name' chase links (from Ben Liblit) 72;; - Made `fast-lock-cache-name' chase links (from Ben Liblit)
73;; 2.01--3.00: 73;; 2.01--3.00:
@@ -230,7 +230,7 @@
230 ;; 230 ;;
231 ;; We use this for compatibility with a future Emacs. 231 ;; We use this for compatibility with a future Emacs.
232 (or (fboundp 'defcustom) 232 (or (fboundp 'defcustom)
233 (defmacro defcustom (symbol value doc &rest args) 233 (defmacro defcustom (symbol value doc &rest args)
234 `(defvar ,symbol ,value ,doc)))) 234 `(defvar ,symbol ,value ,doc))))
235 235
236;(defun fast-lock-submit-bug-report () 236;(defun fast-lock-submit-bug-report ()
@@ -553,7 +553,7 @@ See `fast-lock-cache-directory'."
553 (concat buffer-file-name ".flc") 553 (concat buffer-file-name ".flc")
554 (let* ((bufile (expand-file-name buffer-file-truename)) 554 (let* ((bufile (expand-file-name buffer-file-truename))
555 (chars-alist 555 (chars-alist
556 (if (memq system-type '(emx windows-nt)) 556 (if (memq system-type '(emx windows-nt cygwin))
557 '((?/ . (?#)) (?# . (?# ?#)) (?: . (?\;)) (?\; . (?\; ?\;))) 557 '((?/ . (?#)) (?# . (?# ?#)) (?: . (?\;)) (?\; . (?\; ?\;)))
558 '((?/ . (?#)) (?# . (?# ?#))))) 558 '((?/ . (?#)) (?# . (?# ?#)))))
559 (mapchars 559 (mapchars
@@ -807,7 +807,7 @@ See `fast-lock-get-face-properties'."
807 (font-lock-set-face (nth 0 regions) (nth 1 regions) face) 807 (font-lock-set-face (nth 0 regions) (nth 1 regions) face)
808 (setq regions (nthcdr 2 regions))) 808 (setq regions (nthcdr 2 regions)))
809 (setq face-properties (cdr face-properties)))) 809 (setq face-properties (cdr face-properties))))
810 ;; XEmacs does not support the `syntax-table' text property. 810 ;; XEmacs does not support the `syntax-table' text property.
811 )) 811 ))
812 ;; 812 ;;
813 ;; XEmacs 19.12 font-lock.el's `font-lock-fontify-buffer' runs a hook. 813 ;; XEmacs 19.12 font-lock.el's `font-lock-fontify-buffer' runs a hook.
diff --git a/lisp/filecache.el b/lisp/filecache.el
index 72ef62fc650..4cc259bf9f6 100644
--- a/lisp/filecache.el
+++ b/lisp/filecache.el
@@ -187,7 +187,7 @@ do not use this variable."
187 :group 'file-cache) 187 :group 'file-cache)
188 188
189(defcustom file-cache-completion-ignore-case 189(defcustom file-cache-completion-ignore-case
190 (if (memq system-type (list 'ms-dos 'windows-nt)) 190 (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
191 t 191 t
192 completion-ignore-case) 192 completion-ignore-case)
193 "If non-nil, file-cache completion should ignore case. 193 "If non-nil, file-cache completion should ignore case.
@@ -197,7 +197,7 @@ Defaults to the value of `completion-ignore-case'."
197 ) 197 )
198 198
199(defcustom file-cache-case-fold-search 199(defcustom file-cache-case-fold-search
200 (if (memq system-type (list 'ms-dos 'windows-nt)) 200 (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
201 t 201 t
202 case-fold-search) 202 case-fold-search)
203 "If non-nil, file-cache completion should ignore case. 203 "If non-nil, file-cache completion should ignore case.
@@ -207,7 +207,7 @@ Defaults to the value of `case-fold-search'."
207 ) 207 )
208 208
209(defcustom file-cache-assoc-function 209(defcustom file-cache-assoc-function
210 (if (memq system-type (list 'ms-dos 'windows-nt)) 210 (if (memq system-type (list 'ms-dos 'windows-nt 'cygwin))
211 'assoc-ignore-case 211 'assoc-ignore-case
212 'assoc) 212 'assoc)
213 "Function to use to check completions in the file cache. 213 "Function to use to check completions in the file cache.
diff --git a/lisp/files.el b/lisp/files.el
index 8a801a3d530..cb1e0156ed3 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -215,7 +215,7 @@ have fast storage with limited space, such as a RAM disk."
215 "[\000-\031]\\|" ; control characters 215 "[\000-\031]\\|" ; control characters
216 "\\(/\\.\\.?[^/]\\)\\|" ; leading dots 216 "\\(/\\.\\.?[^/]\\)\\|" ; leading dots
217 "\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot 217 "\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot
218 ((memq system-type '(ms-dos windows-nt)) 218 ((memq system-type '(ms-dos windows-nt cygwin))
219 (concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive 219 (concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive
220 "[|<>\"?*\000-\031]")) ; invalid characters 220 "[|<>\"?*\000-\031]")) ; invalid characters
221 (t "[\000]")) 221 (t "[\000]"))
@@ -1028,6 +1028,7 @@ Type \\[describe-variable] directory-abbrev-alist RET for more information."
1028 ;; MS-DOS root directories can come with a drive letter; 1028 ;; MS-DOS root directories can come with a drive letter;
1029 ;; Novell Netware allows drive letters beyond `Z:'. 1029 ;; Novell Netware allows drive letters beyond `Z:'.
1030 (not (and (or (eq system-type 'ms-dos) 1030 (not (and (or (eq system-type 'ms-dos)
1031 (eq system-type 'cygwin)
1031 (eq system-type 'windows-nt)) 1032 (eq system-type 'windows-nt))
1032 (save-match-data 1033 (save-match-data
1033 (string-match "^[a-zA-`]:/$" filename))))) 1034 (string-match "^[a-zA-`]:/$" filename)))))
@@ -1774,7 +1775,7 @@ and we don't even do that unless it would come from the file name."
1774 (mode nil)) 1775 (mode nil))
1775 ;; Find first matching alist entry. 1776 ;; Find first matching alist entry.
1776 (let ((case-fold-search 1777 (let ((case-fold-search
1777 (memq system-type '(vax-vms windows-nt)))) 1778 (memq system-type '(vax-vms windows-nt cygwin))))
1778 (while (and (not mode) alist) 1779 (while (and (not mode) alist)
1779 (if (string-match (car (car alist)) name) 1780 (if (string-match (car (car alist)) name)
1780 (if (and (consp (cdr (car alist))) 1781 (if (and (consp (cdr (car alist)))
@@ -2615,7 +2616,7 @@ doesn't exist, it is created."
2615 file 2616 file
2616 (if (file-name-absolute-p backup-directory) 2617 (if (file-name-absolute-p backup-directory)
2617 (progn 2618 (progn
2618 (when (memq system-type '(windows-nt ms-dos)) 2619 (when (memq system-type '(windows-nt ms-dos cygwin))
2619 ;; Normalize DOSish file names: downcase the drive 2620 ;; Normalize DOSish file names: downcase the drive
2620 ;; letter, if any, and replace the leading "x:" with 2621 ;; letter, if any, and replace the leading "x:" with
2621 ;; "/drive_x". 2622 ;; "/drive_x".
@@ -2737,6 +2738,7 @@ then it returns FILENAME."
2737 ;; On Microsoft OSes, if FILENAME and DIRECTORY have different 2738 ;; On Microsoft OSes, if FILENAME and DIRECTORY have different
2738 ;; drive names, they can't be relative, so return the absolute name. 2739 ;; drive names, they can't be relative, so return the absolute name.
2739 (if (and (or (eq system-type 'ms-dos) 2740 (if (and (or (eq system-type 'ms-dos)
2741 (eq system-type 'cygwin)
2740 (eq system-type 'windows-nt)) 2742 (eq system-type 'windows-nt))
2741 (not (string-equal (substring fname 0 2) 2743 (not (string-equal (substring fname 0 2)
2742 (substring directory 0 2)))) 2744 (substring directory 0 2))))
@@ -3136,7 +3138,7 @@ prints a message in the minibuffer. Instead, use `set-buffer-modified-p'."
3136With arg, set read-only iff arg is positive. 3138With arg, set read-only iff arg is positive.
3137If visiting file read-only and `view-read-only' is non-nil, enter view mode." 3139If visiting file read-only and `view-read-only' is non-nil, enter view mode."
3138 (interactive "P") 3140 (interactive "P")
3139 (if (and arg 3141 (if (and arg
3140 (if (> (prefix-numeric-value arg) 0) buffer-read-only 3142 (if (> (prefix-numeric-value arg) 0) buffer-read-only
3141 (not buffer-read-only))) ; If buffer-read-only is set correctly, 3143 (not buffer-read-only))) ; If buffer-read-only is set correctly,
3142 nil ; do nothing. 3144 nil ; do nothing.
@@ -3881,7 +3883,7 @@ Existing quote characters in PATTERN are left alone, so you can pass
3881PATTERN that already quotes some of the special characters." 3883PATTERN that already quotes some of the special characters."
3882 (save-match-data 3884 (save-match-data
3883 (cond 3885 (cond
3884 ((memq system-type '(ms-dos windows-nt)) 3886 ((memq system-type '(ms-dos windows-nt cygwin))
3885 ;; DOS/Windows don't allow `"' in file names. So if the 3887 ;; DOS/Windows don't allow `"' in file names. So if the
3886 ;; argument has quotes, we can safely assume it is already 3888 ;; argument has quotes, we can safely assume it is already
3887 ;; quoted by the caller. 3889 ;; quoted by the caller.
@@ -4022,7 +4024,7 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
4022 ;; bunch by one to preserve that property. 4024 ;; bunch by one to preserve that property.
4023 (coding-system-for-read 'no-conversion) 4025 (coding-system-for-read 'no-conversion)
4024 ;; This is to control encoding the arguments in call-process. 4026 ;; This is to control encoding the arguments in call-process.
4025 (coding-system-for-write 4027 (coding-system-for-write
4026 (and enable-multibyte-characters 4028 (and enable-multibyte-characters
4027 (or file-name-coding-system 4029 (or file-name-coding-system
4028 default-file-name-coding-system)))) 4030 default-file-name-coding-system))))
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index e57878b6e66..f5198d5eea1 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
12003-01-31 Joe Buehler <jhpb@draco.hekimian.com>
2
3 * nnheader.el: Added cygwin to system-type comparisons.
4
12003-01-27 Juanma Barranquero <lektu@terra.es> 52003-01-27 Juanma Barranquero <lektu@terra.es>
2 6
3 * imap.el (imap-mailbox-status): Fix typo. 7 * imap.el (imap-mailbox-status): Fix typo.
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index 9fee7b776c5..53ab2d88ebb 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -47,7 +47,7 @@
47(defvar nnheader-head-chop-length 2048 47(defvar nnheader-head-chop-length 2048
48 "*Length of each read operation when trying to fetch HEAD headers.") 48 "*Length of each read operation when trying to fetch HEAD headers.")
49 49
50(defvar nnheader-file-name-translation-alist 50(defvar nnheader-file-name-translation-alist
51 (let ((case-fold-search t)) 51 (let ((case-fold-search t))
52 (cond 52 (cond
53 ((string-match "windows-nt\\|os/2\\|emx\\|cygwin32" 53 ((string-match "windows-nt\\|os/2\\|emx\\|cygwin32"
@@ -653,12 +653,12 @@ If FULL, translate everything."
653 ;; We translate -- but only the file name. We leave the directory 653 ;; We translate -- but only the file name. We leave the directory
654 ;; alone. 654 ;; alone.
655 (if (and (featurep 'xemacs) 655 (if (and (featurep 'xemacs)
656 (memq system-type '(win32 w32 mswindows windows-nt))) 656 (memq system-type '(win32 w32 mswindows windows-nt cygwin)))
657 ;; This is needed on NT and stuff, because 657 ;; This is needed on NT and stuff, because
658 ;; file-name-nondirectory is not enough to split 658 ;; file-name-nondirectory is not enough to split
659 ;; file names, containing ':', e.g. 659 ;; file names, containing ':', e.g.
660 ;; "d:\\Work\\News\\nntp+news.fido7.ru:fido7.ru.gnu.SCORE" 660 ;; "d:\\Work\\News\\nntp+news.fido7.ru:fido7.ru.gnu.SCORE"
661 ;; 661 ;;
662 ;; we are trying to correctly split such names: 662 ;; we are trying to correctly split such names:
663 ;; "d:file.name" -> "a:" "file.name" 663 ;; "d:file.name" -> "a:" "file.name"
664 ;; "aaa:bbb.ccc" -> "" "aaa:bbb.ccc" 664 ;; "aaa:bbb.ccc" -> "" "aaa:bbb.ccc"
diff --git a/lisp/hippie-exp.el b/lisp/hippie-exp.el
index ba53e3a086c..499e99352e2 100644
--- a/lisp/hippie-exp.el
+++ b/lisp/hippie-exp.el
@@ -28,7 +28,7 @@
28 28
29;; `hippie-expand' is a single function for a lot of different kinds 29;; `hippie-expand' is a single function for a lot of different kinds
30;; of completions and expansions. Called repeatedly it tries all 30;; of completions and expansions. Called repeatedly it tries all
31;; possible completions in succession. 31;; possible completions in succession.
32;; Which kinds of completions to try, and in which order, is 32;; Which kinds of completions to try, and in which order, is
33;; determined by the contents of `hippie-expand-try-functions-list'. 33;; determined by the contents of `hippie-expand-try-functions-list'.
34;; Much customization of `hippie-expand' can be made by changing the 34;; Much customization of `hippie-expand' can be made by changing the
@@ -61,7 +61,7 @@
61;; characters of syntax '_' is considered part of the words to expand 61;; characters of syntax '_' is considered part of the words to expand
62;; dynamically. 62;; dynamically.
63;; See also the macro `make-hippie-expand-function' below. 63;; See also the macro `make-hippie-expand-function' below.
64;; 64;;
65;; A short description of the current try-functions in this file: 65;; A short description of the current try-functions in this file:
66;; `try-complete-file-name' : very convenient to have in any buffer, 66;; `try-complete-file-name' : very convenient to have in any buffer,
67;; and not just in the minibuffer or (some) shell-mode. It goes 67;; and not just in the minibuffer or (some) shell-mode. It goes
@@ -72,9 +72,9 @@
72;; a file name completed only as many characters as is unique. 72;; a file name completed only as many characters as is unique.
73;; `try-expand-all-abbrevs' : can be removed if you don't use abbrevs. 73;; `try-expand-all-abbrevs' : can be removed if you don't use abbrevs.
74;; Otherwise it looks through all abbrev-tables, starting with 74;; Otherwise it looks through all abbrev-tables, starting with
75;; the local followed by the global. 75;; the local followed by the global.
76;; `try-expand-line' : Searches the buffer for an entire line that 76;; `try-expand-line' : Searches the buffer for an entire line that
77;; begins exactly as the current line. Convenient sometimes, for 77;; begins exactly as the current line. Convenient sometimes, for
78;; example as a substitute for (or complement to) the history 78;; example as a substitute for (or complement to) the history
79;; list in shell-like buffers. At other times, only confusing. 79;; list in shell-like buffers. At other times, only confusing.
80;; `try-expand-line-all-buffers' : Like `try-expand-line' but searches 80;; `try-expand-line-all-buffers' : Like `try-expand-line' but searches
@@ -83,14 +83,14 @@
83;; `try-expand-list' : Tries to expand the text back to the nearest 83;; `try-expand-list' : Tries to expand the text back to the nearest
84;; open delimiter, to a whole list from the buffer. Convenient for 84;; open delimiter, to a whole list from the buffer. Convenient for
85;; example when writing lisp or TeX. 85;; example when writing lisp or TeX.
86;; `try-expand-list-all-buffers' : Like `try-expand-list' but searches 86;; `try-expand-list-all-buffers' : Like `try-expand-list' but searches
87;; in all buffers (except the current). 87;; in all buffers (except the current).
88;; `try-expand-dabbrev' : works exactly as dabbrev-expand (but of 88;; `try-expand-dabbrev' : works exactly as dabbrev-expand (but of
89;; course in a way compatible with the other try-functions). 89;; course in a way compatible with the other try-functions).
90;; `try-expand-dabbrev-all-buffers' : perhaps the most useful of them, 90;; `try-expand-dabbrev-all-buffers' : perhaps the most useful of them,
91;; like `dabbrev-expand' but searches all Emacs buffers (except the 91;; like `dabbrev-expand' but searches all Emacs buffers (except the
92;; current) for matching words. (No, I don't find this one 92;; current) for matching words. (No, I don't find this one
93;; particularly slow.) 93;; particularly slow.)
94;; `try-expand-dabbrev-visible': Searches the currently visible parts of 94;; `try-expand-dabbrev-visible': Searches the currently visible parts of
95;; all windows. Can be put before `try-expand-dabbrev-all-buffers' to 95;; all windows. Can be put before `try-expand-dabbrev-all-buffers' to
96;; first try the expansions you can see. 96;; first try the expansions you can see.
@@ -108,7 +108,7 @@
108;; already has a key of its own, you might want to remove this. 108;; already has a key of its own, you might want to remove this.
109;; `try-complete-lisp-symbol-partially' : To insert in the list just 109;; `try-complete-lisp-symbol-partially' : To insert in the list just
110;; before `try-complete-lisp-symbol' for those who first want to get 110;; before `try-complete-lisp-symbol' for those who first want to get
111;; completion of what is unique in the name. 111;; completion of what is unique in the name.
112;; 112;;
113;; Not all of the above functions are by default in 113;; Not all of the above functions are by default in
114;; `hippie-expand-try-functions-list'. This variable is better set 114;; `hippie-expand-try-functions-list'. This variable is better set
@@ -143,14 +143,14 @@
143;; `he-reset-string' : Resets the initialized region to its original 143;; `he-reset-string' : Resets the initialized region to its original
144;; contents. 144;; contents.
145;; There is also a variable: `he-tried-table' which is meant to contain 145;; There is also a variable: `he-tried-table' which is meant to contain
146;; all tried expansions so far. The try-function can check this 146;; all tried expansions so far. The try-function can check this
147;; variable to see whether an expansion has already been tried 147;; variable to see whether an expansion has already been tried
148;; (hint: `he-string-member'). 148;; (hint: `he-string-member').
149;; 149;;
150;; Known bugs 150;; Known bugs
151;; 151;;
152;; It may happen that some completion suggestion occurs twice, in 152;; It may happen that some completion suggestion occurs twice, in
153;; spite of the use of `he-tried-table' to prevent that. This is 153;; spite of the use of `he-tried-table' to prevent that. This is
154;; because different try-functions may try to complete different 154;; because different try-functions may try to complete different
155;; lengths of text, and thus put different amounts of the 155;; lengths of text, and thus put different amounts of the
156;; text in `he-tried-table'. Anyway this seems to occur seldom enough 156;; text in `he-tried-table'. Anyway this seems to occur seldom enough
@@ -274,12 +274,12 @@ Can contain both regexps matching buffer names (as strings) and major modes
274The expansion functions in `hippie-expand-try-functions-list' are 274The expansion functions in `hippie-expand-try-functions-list' are
275tried in order, until a possible expansion is found. Repeated 275tried in order, until a possible expansion is found. Repeated
276application of `hippie-expand' inserts successively possible 276application of `hippie-expand' inserts successively possible
277expansions. 277expansions.
278With a positive numeric argument, jumps directly to the ARG next 278With a positive numeric argument, jumps directly to the ARG next
279function in this list. With a negative argument or just \\[universal-argument], 279function in this list. With a negative argument or just \\[universal-argument],
280undoes the expansion." 280undoes the expansion."
281 (interactive "P") 281 (interactive "P")
282 (if (or (not arg) 282 (if (or (not arg)
283 (and (integerp arg) (> arg 0))) 283 (and (integerp arg) (> arg 0)))
284 (let ((first (or (= he-num -1) 284 (let ((first (or (= he-num -1)
285 (not (equal this-command last-command))))) 285 (not (equal this-command last-command)))))
@@ -292,7 +292,7 @@ undoes the expansion."
292 (setq arg 0)) 292 (setq arg 0))
293 (let ((i (max (+ he-num arg) 0))) 293 (let ((i (max (+ he-num arg) 0)))
294 (while (not (or (>= i (length hippie-expand-try-functions-list)) 294 (while (not (or (>= i (length hippie-expand-try-functions-list))
295 (apply (nth i hippie-expand-try-functions-list) 295 (apply (nth i hippie-expand-try-functions-list)
296 (list (= he-num i))))) 296 (list (= he-num i)))))
297 (setq i (1+ i))) 297 (setq i (1+ i)))
298 (setq he-num i)) 298 (setq he-num i))
@@ -331,7 +331,7 @@ undoes the expansion."
331 (goto-char newpos))) 331 (goto-char newpos)))
332 332
333;; Substitutes an expansion STR into the correct region (the region 333;; Substitutes an expansion STR into the correct region (the region
334;; initialized with `he-init-string'). 334;; initialized with `he-init-string').
335;; An optional argument TRANS-CASE means that it is ok to transfer case 335;; An optional argument TRANS-CASE means that it is ok to transfer case
336;; from the abbreviation to the expansion if that is possible, and is 336;; from the abbreviation to the expansion if that is possible, and is
337;; enabled in the buffer. 337;; enabled in the buffer.
@@ -413,14 +413,14 @@ undoes the expansion."
413;; (fset 'my-complete-line (make-hippie-expand-function 413;; (fset 'my-complete-line (make-hippie-expand-function
414;; '(try-expand-line 414;; '(try-expand-line
415;; try-expand-line-all-buffers))) 415;; try-expand-line-all-buffers)))
416;; 416;;
417;;;###autoload 417;;;###autoload
418(defmacro make-hippie-expand-function (try-list &optional verbose) 418(defmacro make-hippie-expand-function (try-list &optional verbose)
419 "Construct a function similar to `hippie-expand'. 419 "Construct a function similar to `hippie-expand'.
420Make it use the expansion functions in TRY-LIST. An optional second 420Make it use the expansion functions in TRY-LIST. An optional second
421argument VERBOSE non-nil makes the function verbose." 421argument VERBOSE non-nil makes the function verbose."
422 `(function (lambda (arg) 422 `(function (lambda (arg)
423 ,(concat 423 ,(concat
424 "Try to expand text before point, using the following functions: \n" 424 "Try to expand text before point, using the following functions: \n"
425 (mapconcat 'prin1-to-string (eval try-list) ", ")) 425 (mapconcat 'prin1-to-string (eval try-list) ", "))
426 (interactive "P") 426 (interactive "P")
@@ -438,7 +438,7 @@ The argument OLD has to be nil the first call of this function, and t
438for subsequent calls (for further possible completions of the same 438for subsequent calls (for further possible completions of the same
439string). It returns t if a new completion is found, nil otherwise." 439string). It returns t if a new completion is found, nil otherwise."
440 (if (not old) 440 (if (not old)
441 (progn 441 (progn
442 (he-init-string (he-file-name-beg) (point)) 442 (he-init-string (he-file-name-beg) (point))
443 (let ((name-part (he-file-name-nondirectory he-search-string)) 443 (let ((name-part (he-file-name-nondirectory he-search-string))
444 (dir-part (expand-file-name (or (he-file-name-directory 444 (dir-part (expand-file-name (or (he-file-name-directory
@@ -447,7 +447,7 @@ string). It returns t if a new completion is found, nil otherwise."
447 (setq he-tried-table (cons name-part he-tried-table))) 447 (setq he-tried-table (cons name-part he-tried-table)))
448 (if (and (not (equal he-search-string "")) 448 (if (and (not (equal he-search-string ""))
449 (he-file-directory-p dir-part)) 449 (he-file-directory-p dir-part))
450 (setq he-expand-list (sort (file-name-all-completions 450 (setq he-expand-list (sort (file-name-all-completions
451 name-part 451 name-part
452 dir-part) 452 dir-part)
453 'string-lessp)) 453 'string-lessp))
@@ -471,11 +471,11 @@ string). It returns t if a new completion is found, nil otherwise."
471(defun try-complete-file-name-partially (old) 471(defun try-complete-file-name-partially (old)
472 "Try to complete text as a file name, as many characters as unique. 472 "Try to complete text as a file name, as many characters as unique.
473The argument OLD has to be nil the first call of this function. It 473The argument OLD has to be nil the first call of this function. It
474returns t if a unique, possibly partial, completion is found, nil 474returns t if a unique, possibly partial, completion is found, nil
475otherwise." 475otherwise."
476 (let ((expansion ())) 476 (let ((expansion ()))
477 (if (not old) 477 (if (not old)
478 (progn 478 (progn
479 (he-init-string (he-file-name-beg) (point)) 479 (he-init-string (he-file-name-beg) (point))
480 (let ((name-part (he-file-name-nondirectory he-search-string)) 480 (let ((name-part (he-file-name-nondirectory he-search-string))
481 (dir-part (expand-file-name (or (he-file-name-directory 481 (dir-part (expand-file-name (or (he-file-name-directory
@@ -503,7 +503,7 @@ otherwise."
503(defvar he-file-name-chars 503(defvar he-file-name-chars
504 (cond ((memq system-type '(vax-vms axp-vms)) 504 (cond ((memq system-type '(vax-vms axp-vms))
505 "-a-zA-Z0-9_/.,~^#$+=:\\[\\]") 505 "-a-zA-Z0-9_/.,~^#$+=:\\[\\]")
506 ((memq system-type '(ms-dos windows-nt)) 506 ((memq system-type '(ms-dos windows-nt cygwin))
507 "-a-zA-Z0-9_/.,~^#$+=:\\\\") 507 "-a-zA-Z0-9_/.,~^#$+=:\\\\")
508 (t ;; More strange file formats ? 508 (t ;; More strange file formats ?
509 "-a-zA-Z0-9_/.,~^#$+=")) 509 "-a-zA-Z0-9_/.,~^#$+="))
@@ -518,7 +518,7 @@ otherwise."
518 (point))))) 518 (point)))))
519 519
520;; Thanks go to Richard Levitte <levitte@e.kth.se> who helped to make these 520;; Thanks go to Richard Levitte <levitte@e.kth.se> who helped to make these
521;; work under VMS, and to David Hughes <ukchugd@ukpmr.cs.philips.nl> who 521;; work under VMS, and to David Hughes <ukchugd@ukpmr.cs.philips.nl> who
522;; helped to make it work on PC. 522;; helped to make it work on PC.
523(defun he-file-name-nondirectory (file) 523(defun he-file-name-nondirectory (file)
524 "Fix to make `file-name-nondirectory' work for hippie-expand under VMS." 524 "Fix to make `file-name-nondirectory' work for hippie-expand under VMS."
@@ -545,7 +545,7 @@ otherwise."
545 (or (file-directory-p file) 545 (or (file-directory-p file)
546 (file-directory-p (concat file "[000000]"))) 546 (file-directory-p (concat file "[000000]")))
547 (file-directory-p file))) 547 (file-directory-p file)))
548 548
549(defun he-concat-directory-file-name (dir-part name-part) 549(defun he-concat-directory-file-name (dir-part name-part)
550 "Try to slam together two parts of a file specification, system dependently." 550 "Try to slam together two parts of a file specification, system dependently."
551 (cond ((null dir-part) name-part) 551 (cond ((null dir-part) name-part)
@@ -560,20 +560,20 @@ otherwise."
560 (= (aref name-part (1- (length name-part))) ?/)) 560 (= (aref name-part (1- (length name-part))) ?/))
561 (aset name-part (1- (length name-part)) ?\\)) 561 (aset name-part (1- (length name-part)) ?\\))
562 (concat dir-part name-part)) 562 (concat dir-part name-part))
563 (t 563 (t
564 (concat dir-part name-part)))) 564 (concat dir-part name-part))))
565 565
566(defun try-complete-lisp-symbol (old) 566(defun try-complete-lisp-symbol (old)
567 "Try to complete word as an Emacs Lisp symbol. 567 "Try to complete word as an Emacs Lisp symbol.
568The argument OLD has to be nil the first call of this function, and t 568The argument OLD has to be nil the first call of this function, and t
569for subsequent calls (for further possible completions of the same 569for subsequent calls (for further possible completions of the same
570string). It returns t if a new completion is found, nil otherwise." 570string). It returns t if a new completion is found, nil otherwise."
571 (if (not old) 571 (if (not old)
572 (progn 572 (progn
573 (he-init-string (he-lisp-symbol-beg) (point)) 573 (he-init-string (he-lisp-symbol-beg) (point))
574 (if (not (he-string-member he-search-string he-tried-table)) 574 (if (not (he-string-member he-search-string he-tried-table))
575 (setq he-tried-table (cons he-search-string he-tried-table))) 575 (setq he-tried-table (cons he-search-string he-tried-table)))
576 (setq he-expand-list 576 (setq he-expand-list
577 (and (not (equal he-search-string "")) 577 (and (not (equal he-search-string ""))
578 (sort (all-completions he-search-string obarray 578 (sort (all-completions he-search-string obarray
579 (function (lambda (sym) 579 (function (lambda (sym)
@@ -596,14 +596,14 @@ string). It returns t if a new completion is found, nil otherwise."
596(defun try-complete-lisp-symbol-partially (old) 596(defun try-complete-lisp-symbol-partially (old)
597 "Try to complete as an Emacs Lisp symbol, as many characters as unique. 597 "Try to complete as an Emacs Lisp symbol, as many characters as unique.
598The argument OLD has to be nil the first call of this function. It 598The argument OLD has to be nil the first call of this function. It
599returns t if a unique, possibly partial, completion is found, nil 599returns t if a unique, possibly partial, completion is found, nil
600otherwise." 600otherwise."
601 (let ((expansion ())) 601 (let ((expansion ()))
602 (if (not old) 602 (if (not old)
603 (progn 603 (progn
604 (he-init-string (he-lisp-symbol-beg) (point)) 604 (he-init-string (he-lisp-symbol-beg) (point))
605 (if (not (string= he-search-string "")) 605 (if (not (string= he-search-string ""))
606 (setq expansion 606 (setq expansion
607 (try-completion he-search-string obarray 607 (try-completion he-search-string obarray
608 (function (lambda (sym) 608 (function (lambda (sym)
609 (or (boundp sym) 609 (or (boundp sym)
@@ -649,7 +649,7 @@ string). It returns t if a new completion is found, nil otherwise."
649 (widen)) 649 (widen))
650 ;; Try looking backward unless inhibited. 650 ;; Try looking backward unless inhibited.
651 (if he-search-bw 651 (if he-search-bw
652 (progn 652 (progn
653 (goto-char he-search-loc) 653 (goto-char he-search-loc)
654 (setq expansion (he-line-search he-search-string 654 (setq expansion (he-line-search he-search-string
655 strip-prompt t)) 655 strip-prompt t))
@@ -660,9 +660,9 @@ string). It returns t if a new completion is found, nil otherwise."
660 (setq he-search-bw ()))))) 660 (setq he-search-bw ())))))
661 661
662 (if (not expansion) ; Then look forward. 662 (if (not expansion) ; Then look forward.
663 (progn 663 (progn
664 (goto-char he-search-loc) 664 (goto-char he-search-loc)
665 (setq expansion (he-line-search he-search-string 665 (setq expansion (he-line-search he-search-string
666 strip-prompt nil)) 666 strip-prompt nil))
667 (set-marker he-search-loc (point))))))) 667 (set-marker he-search-loc (point)))))))
668 668
@@ -693,7 +693,7 @@ string). It returns t if a new completion is found, nil otherwise."
693 (set-marker he-search-loc 1 (car he-search-bufs)))) 693 (set-marker he-search-loc 1 (car he-search-bufs))))
694 694
695 (if (not (equal he-search-string "")) 695 (if (not (equal he-search-string ""))
696 (while (and he-search-bufs 696 (while (and he-search-bufs
697 (not expansion) 697 (not expansion)
698 (or (not hippie-expand-max-buffers) 698 (or (not hippie-expand-max-buffers)
699 (< he-searched-n-bufs hippie-expand-max-buffers))) 699 (< he-searched-n-bufs hippie-expand-max-buffers)))
@@ -710,7 +710,7 @@ string). It returns t if a new completion is found, nil otherwise."
710 (setq strip-prompt (and (get-buffer-process (current-buffer)) 710 (setq strip-prompt (and (get-buffer-process (current-buffer))
711 comint-use-prompt-regexp-instead-of-fields 711 comint-use-prompt-regexp-instead-of-fields
712 comint-prompt-regexp)) 712 comint-prompt-regexp))
713 (setq expansion 713 (setq expansion
714 (let ((case-fold-search orig-case-fold-search)) 714 (let ((case-fold-search orig-case-fold-search))
715 (he-line-search he-search-string 715 (he-line-search he-search-string
716 strip-prompt nil))) 716 strip-prompt nil)))
@@ -732,11 +732,11 @@ string). It returns t if a new completion is found, nil otherwise."
732 (he-substitute-string expansion t) 732 (he-substitute-string expansion t)
733 t)))) 733 t))))
734 734
735(defun he-line-search (str strip-prompt reverse) 735(defun he-line-search (str strip-prompt reverse)
736 (let ((result ())) 736 (let ((result ()))
737 (while (and (not result) 737 (while (and (not result)
738 (if reverse 738 (if reverse
739 (re-search-backward 739 (re-search-backward
740 (he-line-search-regexp str strip-prompt) 740 (he-line-search-regexp str strip-prompt)
741 nil t) 741 nil t)
742 (re-search-forward 742 (re-search-forward
@@ -750,7 +750,7 @@ string). It returns t if a new completion is found, nil otherwise."
750 750
751(defun he-line-beg (strip-prompt) 751(defun he-line-beg (strip-prompt)
752 (save-excursion 752 (save-excursion
753 (if (re-search-backward (he-line-search-regexp "" strip-prompt) 753 (if (re-search-backward (he-line-search-regexp "" strip-prompt)
754 (save-excursion (beginning-of-line) 754 (save-excursion (beginning-of-line)
755 (point)) t) 755 (point)) t)
756 (match-beginning 2) 756 (match-beginning 2)
@@ -761,7 +761,7 @@ string). It returns t if a new completion is found, nil otherwise."
761 (concat "\\(" comint-prompt-regexp "\\|^\\s-*\\)\\(" 761 (concat "\\(" comint-prompt-regexp "\\|^\\s-*\\)\\("
762 (regexp-quote pat) 762 (regexp-quote pat)
763 "[^\n]*[^ \t\n]\\)") 763 "[^\n]*[^ \t\n]\\)")
764 (concat "^\\(\\s-*\\)\\(" 764 (concat "^\\(\\s-*\\)\\("
765 (regexp-quote pat) 765 (regexp-quote pat)
766 "[^\n]*[^ \t\n]\\)"))) 766 "[^\n]*[^ \t\n]\\)")))
767 767
@@ -784,7 +784,7 @@ string). It returns t if a new completion is found, nil otherwise."
784 (widen)) 784 (widen))
785 ;; Try looking backward unless inhibited. 785 ;; Try looking backward unless inhibited.
786 (if he-search-bw 786 (if he-search-bw
787 (progn 787 (progn
788 (goto-char he-search-loc) 788 (goto-char he-search-loc)
789 (setq expansion (he-list-search he-search-string t)) 789 (setq expansion (he-list-search he-search-string t))
790 (set-marker he-search-loc (point)) 790 (set-marker he-search-loc (point))
@@ -794,7 +794,7 @@ string). It returns t if a new completion is found, nil otherwise."
794 (setq he-search-bw ()))))) 794 (setq he-search-bw ())))))
795 795
796 (if (not expansion) ; Then look forward. 796 (if (not expansion) ; Then look forward.
797 (progn 797 (progn
798 (goto-char he-search-loc) 798 (goto-char he-search-loc)
799 (setq expansion (he-list-search he-search-string nil)) 799 (setq expansion (he-list-search he-search-string nil))
800 (set-marker he-search-loc (point))))))) 800 (set-marker he-search-loc (point)))))))
@@ -823,7 +823,7 @@ string). It returns t if a new completion is found, nil otherwise."
823 (set-marker he-search-loc 1 (car he-search-bufs)))) 823 (set-marker he-search-loc 1 (car he-search-bufs))))
824 824
825 (if (not (equal he-search-string "")) 825 (if (not (equal he-search-string ""))
826 (while (and he-search-bufs 826 (while (and he-search-bufs
827 (not expansion) 827 (not expansion)
828 (or (not hippie-expand-max-buffers) 828 (or (not hippie-expand-max-buffers)
829 (< he-searched-n-bufs hippie-expand-max-buffers))) 829 (< he-searched-n-bufs hippie-expand-max-buffers)))
@@ -837,7 +837,7 @@ string). It returns t if a new completion is found, nil otherwise."
837 (if hippie-expand-no-restriction 837 (if hippie-expand-no-restriction
838 (widen)) 838 (widen))
839 (goto-char he-search-loc) 839 (goto-char he-search-loc)
840 (setq expansion 840 (setq expansion
841 (let ((case-fold-search orig-case-fold-search)) 841 (let ((case-fold-search orig-case-fold-search))
842 (he-list-search he-search-string nil))) 842 (he-list-search he-search-string nil)))
843 (set-marker he-search-loc (point)) 843 (set-marker he-search-loc (point))
@@ -858,7 +858,7 @@ string). It returns t if a new completion is found, nil otherwise."
858 (he-substitute-string expansion t) 858 (he-substitute-string expansion t)
859 t)))) 859 t))))
860 860
861(defun he-list-search (str reverse) 861(defun he-list-search (str reverse)
862 (let ((result ()) 862 (let ((result ())
863 beg pos err) 863 beg pos err)
864 (while (and (not result) 864 (while (and (not result)
@@ -872,7 +872,7 @@ string). It returns t if a new completion is found, nil otherwise."
872 (condition-case () 872 (condition-case ()
873 (forward-list 1) 873 (forward-list 1)
874 (error (setq err t))) 874 (error (setq err t)))
875 (if (and reverse 875 (if (and reverse
876 (> (point) he-string-beg)) 876 (> (point) he-string-beg))
877 (setq err t)) 877 (setq err t))
878 (if (not err) 878 (if (not err)
@@ -898,13 +898,13 @@ string). It returns t if a new expansion is found, nil otherwise."
898 (if (not old) 898 (if (not old)
899 (progn 899 (progn
900 (he-init-string (he-dabbrev-beg) (point)) 900 (he-init-string (he-dabbrev-beg) (point))
901 (setq he-expand-list 901 (setq he-expand-list
902 (and (not (equal he-search-string "")) 902 (and (not (equal he-search-string ""))
903 (mapcar (function (lambda (sym) 903 (mapcar (function (lambda (sym)
904 (if (and (boundp sym) (vectorp (eval sym))) 904 (if (and (boundp sym) (vectorp (eval sym)))
905 (abbrev-expansion (downcase he-search-string) 905 (abbrev-expansion (downcase he-search-string)
906 (eval sym))))) 906 (eval sym)))))
907 (append '(local-abbrev-table 907 (append '(local-abbrev-table
908 global-abbrev-table) 908 global-abbrev-table)
909 abbrev-table-name-list)))))) 909 abbrev-table-name-list))))))
910 (while (and he-expand-list 910 (while (and he-expand-list
@@ -939,7 +939,7 @@ string). It returns t if a new expansion is found, nil otherwise."
939 (widen)) 939 (widen))
940 ;; Try looking backward unless inhibited. 940 ;; Try looking backward unless inhibited.
941 (if he-search-bw 941 (if he-search-bw
942 (progn 942 (progn
943 (goto-char he-search-loc) 943 (goto-char he-search-loc)
944 (setq expansion (he-dabbrev-search he-search-string t)) 944 (setq expansion (he-dabbrev-search he-search-string t))
945 (set-marker he-search-loc (point)) 945 (set-marker he-search-loc (point))
@@ -949,11 +949,11 @@ string). It returns t if a new expansion is found, nil otherwise."
949 (setq he-search-bw ()))))) 949 (setq he-search-bw ())))))
950 950
951 (if (not expansion) ; Then look forward. 951 (if (not expansion) ; Then look forward.
952 (progn 952 (progn
953 (goto-char he-search-loc) 953 (goto-char he-search-loc)
954 (setq expansion (he-dabbrev-search he-search-string nil)) 954 (setq expansion (he-dabbrev-search he-search-string nil))
955 (set-marker he-search-loc (point))))))) 955 (set-marker he-search-loc (point)))))))
956 956
957 (if (not expansion) 957 (if (not expansion)
958 (progn 958 (progn
959 (if old (he-reset-string)) 959 (if old (he-reset-string))
@@ -978,7 +978,7 @@ string). It returns t if a new expansion is found, nil otherwise."
978 (set-marker he-search-loc 1 (car he-search-bufs)))) 978 (set-marker he-search-loc 1 (car he-search-bufs))))
979 979
980 (if (not (equal he-search-string "")) 980 (if (not (equal he-search-string ""))
981 (while (and he-search-bufs 981 (while (and he-search-bufs
982 (not expansion) 982 (not expansion)
983 (or (not hippie-expand-max-buffers) 983 (or (not hippie-expand-max-buffers)
984 (< he-searched-n-bufs hippie-expand-max-buffers))) 984 (< he-searched-n-bufs hippie-expand-max-buffers)))
@@ -1047,13 +1047,13 @@ string). It returns t if a new expansion is found, nil otherwise."
1047 (window-end he-search-window)))) 1047 (window-end he-search-window))))
1048 (set-marker he-search-loc (point) (current-buffer))) 1048 (set-marker he-search-loc (point) (current-buffer)))
1049 (if (not expansion) 1049 (if (not expansion)
1050 (progn 1050 (progn
1051 (setq he-search-window (next-window he-search-window nil flag)) 1051 (setq he-search-window (next-window he-search-window nil flag))
1052 (if (eq he-search-window (selected-window)) 1052 (if (eq he-search-window (selected-window))
1053 (set-marker he-search-loc nil) 1053 (set-marker he-search-loc nil)
1054 (set-marker he-search-loc (window-start he-search-window) 1054 (set-marker he-search-loc (window-start he-search-window)
1055 (window-buffer he-search-window)))))) 1055 (window-buffer he-search-window))))))
1056 1056
1057 (set-buffer buf) 1057 (set-buffer buf)
1058 (if (not expansion) 1058 (if (not expansion)
1059 (progn 1059 (progn
@@ -1072,7 +1072,7 @@ string). It returns t if a new expansion is found, nil otherwise."
1072 (t 1072 (t
1073 (concat "\\<" (regexp-quote pattern) 1073 (concat "\\<" (regexp-quote pattern)
1074 "\\(\\sw\\|\\s_\\)+"))))) 1074 "\\(\\sw\\|\\s_\\)+")))))
1075 (while (and (not result) 1075 (while (and (not result)
1076 (if reverse 1076 (if reverse
1077 (re-search-backward regpat limit t) 1077 (re-search-backward regpat limit t)
1078 (re-search-forward regpat limit t))) 1078 (re-search-forward regpat limit t)))
@@ -1104,7 +1104,7 @@ for subsequent calls (for further possible completions of the same
1104string). It returns t if a new completion is found, nil otherwise." 1104string). It returns t if a new completion is found, nil otherwise."
1105 (let ((expansion ())) 1105 (let ((expansion ()))
1106 (if (not old) 1106 (if (not old)
1107 (progn 1107 (progn
1108 (he-init-string (he-dabbrev-beg) (point)) 1108 (he-init-string (he-dabbrev-beg) (point))
1109 (setq he-expand-list 1109 (setq he-expand-list
1110 (if (not (equal he-search-string "")) 1110 (if (not (equal he-search-string ""))
@@ -1130,7 +1130,7 @@ string). It returns t if a new completion is found, nil otherwise."
1130 (concat "\\<" (regexp-quote pattern) 1130 (concat "\\<" (regexp-quote pattern)
1131 "\\(\\sw\\|\\s_\\)+")))) 1131 "\\(\\sw\\|\\s_\\)+"))))
1132 (killstr (car he-expand-list))) 1132 (killstr (car he-expand-list)))
1133 (while (and (not result) 1133 (while (and (not result)
1134 he-expand-list) 1134 he-expand-list)
1135 (while (and (not result) 1135 (while (and (not result)
1136 (string-match regpat killstr he-search-loc2)) 1136 (string-match regpat killstr he-search-loc2))
@@ -1143,10 +1143,10 @@ string). It returns t if a new completion is found, nil otherwise."
1143 '(?_ ?w))) 1143 '(?_ ?w)))
1144 (he-string-member result he-tried-table t)) 1144 (he-string-member result he-tried-table t))
1145 (setq result nil))) ; ignore if bad prefix or already in table 1145 (setq result nil))) ; ignore if bad prefix or already in table
1146 (if (and (not result) 1146 (if (and (not result)
1147 he-expand-list) 1147 he-expand-list)
1148 (progn 1148 (progn
1149 (setq he-expand-list (cdr he-expand-list)) 1149 (setq he-expand-list (cdr he-expand-list))
1150 (setq killstr (car he-expand-list)) 1150 (setq killstr (car he-expand-list))
1151 (setq he-search-loc2 0)))) 1151 (setq he-search-loc2 0))))
1152 result)) 1152 result))
@@ -1158,11 +1158,11 @@ for subsequent calls (for further possible completions of the same
1158string). It returns t if a new completion is found, nil otherwise." 1158string). It returns t if a new completion is found, nil otherwise."
1159 (let ((expansion ())) 1159 (let ((expansion ()))
1160 (if (not old) 1160 (if (not old)
1161 (progn 1161 (progn
1162 (he-init-string (he-kill-beg) (point)) 1162 (he-init-string (he-kill-beg) (point))
1163 (if (not (he-string-member he-search-string he-tried-table)) 1163 (if (not (he-string-member he-search-string he-tried-table))
1164 (setq he-tried-table (cons he-search-string he-tried-table))) 1164 (setq he-tried-table (cons he-search-string he-tried-table)))
1165 (setq he-expand-list 1165 (setq he-expand-list
1166 (if (not (equal he-search-string "")) 1166 (if (not (equal he-search-string ""))
1167 kill-ring)) 1167 kill-ring))
1168 (setq he-search-loc2 ()))) 1168 (setq he-search-loc2 ())))
@@ -1206,7 +1206,7 @@ string). It returns t if a new completion is found, nil otherwise."
1206 (if (and (not result) 1206 (if (and (not result)
1207 he-expand-list) 1207 he-expand-list)
1208 (progn 1208 (progn
1209 (setq he-expand-list (cdr he-expand-list)) 1209 (setq he-expand-list (cdr he-expand-list))
1210 (setq killstr (car he-expand-list)) 1210 (setq killstr (car he-expand-list))
1211 (setq pos -1)))) 1211 (setq pos -1))))
1212 result)) 1212 result))
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index c2c53f5b042..0573b0046a6 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1631,7 +1631,7 @@ This is used for loading and byte-compiling Emacs Lisp files.")
1631(defun auto-coding-alist-lookup (filename) 1631(defun auto-coding-alist-lookup (filename)
1632 "Return the coding system specified by `auto-coding-alist' for FILENAME." 1632 "Return the coding system specified by `auto-coding-alist' for FILENAME."
1633 (let ((alist auto-coding-alist) 1633 (let ((alist auto-coding-alist)
1634 (case-fold-search (memq system-type '(vax-vms windows-nt ms-dos))) 1634 (case-fold-search (memq system-type '(vax-vms windows-nt ms-dos cygwin)))
1635 coding-system) 1635 coding-system)
1636 (while (and alist (not coding-system)) 1636 (while (and alist (not coding-system))
1637 (if (string-match (car (car alist)) filename) 1637 (if (string-match (car (car alist)) filename)
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 0a417a22f0f..0ebc41150df 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -227,7 +227,7 @@
227 227
228;;;###autoload 228;;;###autoload
229(defcustom browse-url-browser-function 229(defcustom browse-url-browser-function
230 (if (memq system-type '(windows-nt ms-dos)) 230 (if (memq system-type '(windows-nt ms-dos cygwin))
231 'browse-url-default-windows-browser 231 'browse-url-default-windows-browser
232 'browse-url-default-browser) 232 'browse-url-default-browser)
233 "*Function to display the current buffer in a WWW browser. 233 "*Function to display the current buffer in a WWW browser.
@@ -381,7 +381,7 @@ commands reverses the effect of this variable. Requires Netscape version
381 ;; it in anonymous cases. If it's not anonymous the next regexp 381 ;; it in anonymous cases. If it's not anonymous the next regexp
382 ;; applies. 382 ;; applies.
383 ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/") 383 ("^/\\([^:@]+@\\)?\\([^:]+\\):/*" . "ftp://\\1\\2/")
384 (,@ (if (memq system-type '(windows-nt ms-dos)) 384 (,@ (if (memq system-type '(windows-nt ms-dos cygwin))
385 '(("^\\([a-zA-Z]:\\)[\\/]" . "file:\\1/") 385 '(("^\\([a-zA-Z]:\\)[\\/]" . "file:\\1/")
386 ("^[\\/][\\/]+" . "file://")))) 386 ("^[\\/][\\/]+" . "file://"))))
387 ("^/+" . "file:/"))) 387 ("^/+" . "file:/")))
@@ -972,7 +972,7 @@ effect of `browse-url-new-window-flag'.
972 972
973When called non-interactively, optional second argument NEW-WINDOW is 973When called non-interactively, optional second argument NEW-WINDOW is
974used instead of `browse-url-new-window-flag'." 974used instead of `browse-url-new-window-flag'."
975 (interactive (browse-url-interactive-arg "URL: ")) 975 (interactive (browse-url-interactive-arg "URL: "))
976 (apply 'start-process (concat "gnome-moz-remote " url) 976 (apply 'start-process (concat "gnome-moz-remote " url)
977 nil 977 nil
978 "gnome-moz-remote" 978 "gnome-moz-remote"
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index 7a3f7aaae3a..cc4b876477a 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -139,7 +139,7 @@
139 :type '(choice regexp (const :tag "None" nil)) 139 :type '(choice regexp (const :tag "None" nil))
140 :group 'pcomplete) 140 :group 'pcomplete)
141 141
142(defcustom pcomplete-ignore-case (memq system-type '(ms-dos windows-nt)) 142(defcustom pcomplete-ignore-case (memq system-type '(ms-dos windows-nt cygwin))
143 "*If non-nil, ignore case when doing filename completion." 143 "*If non-nil, ignore case when doing filename completion."
144 :type 'boolean 144 :type 'boolean
145 :group 'pcomplete) 145 :group 'pcomplete)
diff --git a/lisp/recentf.el b/lisp/recentf.el
index 72e026ab2db..f7683e30698 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -156,7 +156,7 @@ The filter function is called with one argument, the list of menu elements
156used to build the menu and must return a new list of menu elements (see 156used to build the menu and must return a new list of menu elements (see
157`recentf-make-menu-element' for menu element form)." 157`recentf-make-menu-element' for menu element form)."
158 :group 'recentf 158 :group 'recentf
159 :type '(radio (const nil) 159 :type '(radio (const nil)
160 (function-item recentf-sort-ascending) 160 (function-item recentf-sort-ascending)
161 (function-item recentf-sort-descending) 161 (function-item recentf-sort-descending)
162 (function-item recentf-sort-basenames-ascending) 162 (function-item recentf-sort-basenames-ascending)
@@ -201,7 +201,7 @@ used to build the menu and must return a new list of menu elements (see
201;;;; Common functions 201;;;; Common functions
202;;;; 202;;;;
203(defconst recentf-case-fold-search 203(defconst recentf-case-fold-search
204 (memq system-type '(vax-vms windows-nt)) 204 (memq system-type '(vax-vms windows-nt cygwin))
205 "Non-nil if recentf searches and matches should ignore case.") 205 "Non-nil if recentf searches and matches should ignore case.")
206 206
207(defun recentf-include-p (filename) 207(defun recentf-include-p (filename)
@@ -676,7 +676,7 @@ Arrange them in sub-menus following rules in `recentf-arrange-rules'."
676 ;; It is important to preserve auto-mode-alist order 676 ;; It is important to preserve auto-mode-alist order
677 ;; to ensure the right file <-> mode association 677 ;; to ensure the right file <-> mode association
678 (nreverse rules))) 678 (nreverse rules)))
679 679
680(defun recentf-arrange-by-mode (l) 680(defun recentf-arrange-by-mode (l)
681 "Filter the list of menu-elements L to build sub-menus for each major mode." 681 "Filter the list of menu-elements L to build sub-menus for each major mode."
682 (let ((recentf-arrange-rules (recentf-build-mode-rules)) 682 (let ((recentf-arrange-rules (recentf-build-mode-rules))
@@ -765,7 +765,7 @@ Each filter is defined by a pair (FILTER-FUN . FILTER-LBL) where:
765 (setq filters (cdr filters))))) 765 (setq filters (cdr filters)))))
766 (if (consp filters) 766 (if (consp filters)
767 (car filters)))) 767 (car filters))))
768 768
769(defun recentf-filter-changer (l) 769(defun recentf-filter-changer (l)
770 "Manage a ring of filters. 770 "Manage a ring of filters.
771`recentf-filter-changer-alist' defines the filters in the ring. 771`recentf-filter-changer-alist' defines the filters in the ring.
@@ -888,7 +888,7 @@ Holds list of files to be deleted from `recentf-list'.")
888 (setq recentf-edit-selected-items 888 (setq recentf-edit-selected-items
889 (nconc (list value) recentf-edit-selected-items)) 889 (nconc (list value) recentf-edit-selected-items))
890 (message "%s added to selection." value))))) 890 (message "%s added to selection." value)))))
891 891
892;;;###autoload 892;;;###autoload
893(defun recentf-edit-list () 893(defun recentf-edit-list ()
894 "Allow the user to edit the files that are kept in the recent list." 894 "Allow the user to edit the files that are kept in the recent list."
diff --git a/lisp/shell.el b/lisp/shell.el
index fa4f31ce5f0..77ad7f2808c 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -165,7 +165,7 @@ shell buffer. The value may depend on the operating system or shell.
165This is a fine thing to set in your `.emacs' file.") 165This is a fine thing to set in your `.emacs' file.")
166 166
167(defvar shell-file-name-chars 167(defvar shell-file-name-chars
168 (if (memq system-type '(ms-dos windows-nt)) 168 (if (memq system-type '(ms-dos windows-nt cygwin))
169 "~/A-Za-z0-9_^$!#%&{}@`'.,:()-" 169 "~/A-Za-z0-9_^$!#%&{}@`'.,:()-"
170 "~/A-Za-z0-9+@:_.$#%,={}-") 170 "~/A-Za-z0-9+@:_.$#%,={}-")
171 "String of characters valid in a file name. 171 "String of characters valid in a file name.
diff --git a/lisp/woman.el b/lisp/woman.el
index 115e70546bb..c3becb5186e 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1347,7 +1347,7 @@ Any UN*X-style environment variables are evaluated first."
1347 ;; including `.' and `..', so remove any trailing / !!! 1347 ;; including `.' and `..', so remove any trailing / !!!
1348 (if (string= (substring dir -1) "/") 1348 (if (string= (substring dir -1) "/")
1349 (setq dir (substring dir 0 -1))) 1349 (setq dir (substring dir 0 -1)))
1350 (if (memq system-type '(windows-nt ms-dos)) ; what else? 1350 (if (memq system-type '(windows-nt ms-dos cygwin)) ; what else?
1351 ;; Match capitalization used by `file-name-directory': 1351 ;; Match capitalization used by `file-name-directory':
1352 (setq dir (concat (file-name-directory dir) 1352 (setq dir (concat (file-name-directory dir)
1353 (file-name-nondirectory dir)))) 1353 (file-name-nondirectory dir))))