help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shell-command in Windows 7


From: John Mastro
Subject: Re: shell-command in Windows 7
Date: Fri, 14 Apr 2017 10:13:22 -0700

John Mastro <address@hidden> wrote:
>     (defun open-buffer-directory (buffer)
>       (interactive
>        (if current-prefix-arg
>            (read-buffer "Open buffer directory: " nil t)
>          (list (current-buffer))))
>       (with-current-buffer buffer
>         (let ((file (buffer-file-name)))
>           (if file
>               (w32-open-file (file-name-directory file))
>             (user-error "Buffer `%s' is not visiting a file" 
> (buffer-name))))))

Oops, bad `interactive' spec. That should be:

    (defun open-buffer-directory (buffer)
      (interactive
       (list (if current-prefix-arg
                 (read-buffer "Open buffer directory: " nil t)
               (current-buffer))))
      (with-current-buffer buffer
        (let ((file (buffer-file-name)))
          (if file
              (w32-open-file (file-name-directory file))
            (user-error "Buffer `%s' is not visiting a file" (buffer-name))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]