diff options
| author | Luc Teirlinck | 2004-03-21 04:40:38 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2004-03-21 04:40:38 +0000 |
| commit | 8f8607bebf9c61948456a97103ca3d0ed7c510a3 (patch) | |
| tree | b21b2329539f6f75eb3460c3fa26ff9313db88a9 | |
| parent | a2ac68f1ee4d388206e852388b62e647f3cc0910 (diff) | |
| download | emacs-8f8607bebf9c61948456a97103ca3d0ed7c510a3.tar.gz emacs-8f8607bebf9c61948456a97103ca3d0ed7c510a3.zip | |
(insert-directory): Fix bug if SWITCHES is a list.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/files.el | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0cb0af79c9..7cf48800d6d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2004-03-20 Luc Teirlinck <teirllm@auburn.edu> | 1 | 2004-03-20 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 2 | ||
| 3 | * files.el (insert-directory): Fix bug if SWITCHES is a list. | ||
| 4 | |||
| 3 | * autorevert.el (auto-revert-interval): Make new value take | 5 | * autorevert.el (auto-revert-interval): Make new value take |
| 4 | effect immediately when set through Custom. | 6 | effect immediately when set through Custom. |
| 5 | (auto-revert-set-timer): Add interactive declaration. | 7 | (auto-revert-set-timer): Add interactive declaration. |
diff --git a/lisp/files.el b/lisp/files.el index a63aea99114..15f0f5e5179 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -4205,14 +4205,20 @@ program specified by `directory-free-space-program' if that is non-nil." | |||
| 4205 | (defun insert-directory (file switches &optional wildcard full-directory-p) | 4205 | (defun insert-directory (file switches &optional wildcard full-directory-p) |
| 4206 | "Insert directory listing for FILE, formatted according to SWITCHES. | 4206 | "Insert directory listing for FILE, formatted according to SWITCHES. |
| 4207 | Leaves point after the inserted text. | 4207 | Leaves point after the inserted text. |
| 4208 | SWITCHES may be a string of options, or a list of strings. | 4208 | SWITCHES may be a string of options, or a list of strings |
| 4209 | representing individual options. | ||
| 4209 | Optional third arg WILDCARD means treat FILE as shell wildcard. | 4210 | Optional third arg WILDCARD means treat FILE as shell wildcard. |
| 4210 | Optional fourth arg FULL-DIRECTORY-P means file is a directory and | 4211 | Optional fourth arg FULL-DIRECTORY-P means file is a directory and |
| 4211 | switches do not contain `d', so that a full listing is expected. | 4212 | switches do not contain `d', so that a full listing is expected. |
| 4212 | 4213 | ||
| 4213 | This works by running a directory listing program | 4214 | This works by running a directory listing program |
| 4214 | whose name is in the variable `insert-directory-program'. | 4215 | whose name is in the variable `insert-directory-program'. |
| 4215 | If WILDCARD, it also runs the shell specified by `shell-file-name'." | 4216 | If WILDCARD, it also runs the shell specified by `shell-file-name'. |
| 4217 | |||
| 4218 | When SWITCHES contains the long `--dired' option,this function | ||
| 4219 | treats it specially, for the sake of dired. However, the | ||
| 4220 | normally equivalent short `-D' option is just passed on to | ||
| 4221 | `insert-directory-program', as any other option." | ||
| 4216 | ;; We need the directory in order to find the right handler. | 4222 | ;; We need the directory in order to find the right handler. |
| 4217 | (let ((handler (find-file-name-handler (expand-file-name file) | 4223 | (let ((handler (find-file-name-handler (expand-file-name file) |
| 4218 | 'insert-directory))) | 4224 | 'insert-directory))) |
| @@ -4301,7 +4307,9 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'." | |||
| 4301 | (access-file file "Reading directory") | 4307 | (access-file file "Reading directory") |
| 4302 | (error "Listing directory failed but `access-file' worked"))) | 4308 | (error "Listing directory failed but `access-file' worked"))) |
| 4303 | 4309 | ||
| 4304 | (when (string-match "--dired\\>" switches) | 4310 | (when (if (stringp switches) |
| 4311 | (string-match "--dired\\>" switches) | ||
| 4312 | (member "--dired" switches)) | ||
| 4305 | (forward-line -2) | 4313 | (forward-line -2) |
| 4306 | (when (looking-at "//SUBDIRED//") | 4314 | (when (looking-at "//SUBDIRED//") |
| 4307 | (delete-region (point) (progn (forward-line 1) (point))) | 4315 | (delete-region (point) (progn (forward-line 1) (point))) |