diff options
| author | Simon Marshall | 1995-06-13 08:27:11 +0000 |
|---|---|---|
| committer | Simon Marshall | 1995-06-13 08:27:11 +0000 |
| commit | cc37a58cebc29aed3ef044d8b977f41a38d86753 (patch) | |
| tree | 67c6009966e531762043fd0e860d0f8c1fa2dc39 | |
| parent | 525c5be7ddf9ec6a873832194b41eacd65a9dc3c (diff) | |
| download | emacs-cc37a58cebc29aed3ef044d8b977f41a38d86753.tar.gz emacs-cc37a58cebc29aed3ef044d8b977f41a38d86753.zip | |
Test for "" too; let it go to expand-file-name if it is equal.
| -rw-r--r-- | lisp/files.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index a9bf39ef6fb..763fac09125 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -355,7 +355,11 @@ Do not specify them in other calls." | |||
| 355 | ;; to chase before getting an error. | 355 | ;; to chase before getting an error. |
| 356 | ;; PREV-DIRS can be a cons cell whose car is an alist | 356 | ;; PREV-DIRS can be a cons cell whose car is an alist |
| 357 | ;; of truenames we've just recently computed. | 357 | ;; of truenames we've just recently computed. |
| 358 | (if (or (string= filename "~") | 358 | |
| 359 | ;; I don't understand the reason for these tests. To avoid string-match? | ||
| 360 | ;; Something like (string-match "\\`\\'\\|~" filename) would do the same. | ||
| 361 | ;; The last test looks dubious, maybe `+' is meant here? --simon. | ||
| 362 | (if (or (string= filename "") (string= filename "~") | ||
| 359 | (and (string= (substring filename 0 1) "~") | 363 | (and (string= (substring filename 0 1) "~") |
| 360 | (string-match "~[^/]*" filename))) | 364 | (string-match "~[^/]*" filename))) |
| 361 | (progn | 365 | (progn |