[EMAIL PROTECTED] (Daniel Jensen) writes:

> This patch adds functionality to `bongo-insert-file' for inserting
> multiple files using wildcards.

Good idea, thanks.

I changed a couple of things --- I'll comment below.

> [Expand wildcards in interactive use of `bongo-insert-file'
> Daniel Jensen <[EMAIL PROTECTED]>**20061128145340] {
> hunk ./bongo.el 4943
> -If FILE-NAME names a directory, call `bongo-insert-directory'."
> -  (interactive (list (expand-file-name
> +If FILE-NAME names a directory, call `bongo-insert-directory'.
> +Interactively, expand wildcards and insert all matching files."
> +  (interactive (list (file-expand-wildcards
> hunk ./bongo.el 4947
> -                                      default-directory nil t
> +                                      default-directory nil nil
> hunk ./bongo.el 4949
> -                                        (dired-get-filename t))))))
> -  (if (file-directory-p file-name)
> -      (bongo-insert-directory-tree file-name)
> -    (bongo-insert-line 'bongo-file-name file-name)
> -    (when (and (interactive-p) (not (bongo-buffer-p)))
> -      (message "Inserted track: %s"
> -               (bongo-format-infoset
> -                (bongo-infoset-from-file-name file-name))))))
> +                                        (dired-get-filename t))) t)))
> +  (cond ((null file-name)
> +         (and (interactive-p) (error "No matching file found")))

You should almost never use `interactive-p' for anything
other than deciding whether to display a message.  In this
case, it is better to use `called-interactively-p'.

> +        ((consp file-name)
> +         (let ((beginning (point)))
> +           (mapcar 'bongo-insert-file file-name)

I changed this to `mapc'.

-- 
Daniel Brockman <[EMAIL PROTECTED]>



_______________________________________________
bongo-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/bongo-devel

Reply via email to