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

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

Re: Execute In Multiple Shells?


From: gamename
Subject: Re: Execute In Multiple Shells?
Date: Thu, 21 Jan 2010 08:27:50 -0800 (PST)
User-agent: G2/1.0

On Nov 24 2009, 11:56 am, address@hidden (Pascal J.
Bourguignon) wrote:
> Dmitry Dzhus <address@hidden> writes:
> > Pascal J. Bourguignon wrote:
>
> >> (defun buffer-named (name)
> >>   "
> >> RETURN: the buffer which has as name `name'.
> >> "
> >>   (let ((bl (buffer-list)))
> >>     (unless (and buffer-list-cache buffer-name-map
> >>                  (equal buffer-list-cache bl))
> >>       (setf buffer-list-cache (copy-seq bl))
> >>       (setf buffer-name-map (make-hash-table :test (function equal)))
> >>       (dolist (buffer buffer-list-cache)
> >>         (let ((name (buffer-name buffer)))
> >>           (when name (setf (gethash name buffer-name-map) buffer)))
> >>         (let ((name (buffer-file-name buffer)))
> >>           (when name (setf (gethash name buffer-name-map) buffer))))))
> >>   (or (gethash name buffer-name-map)
> >>       (gethash (truename name) buffer-name-map)))
>
> > How is this different from `get-buffer`?
>
> It uses truename, which I forgot to adjoin:
>
> (defun truename (filespec)
>   "
> RETURN:  The absolute path name corresponding to fielspec.
> "
>   (car (file-expand-wildcards (shell-quote-argument filespec) t)))
>
> --
> __Pascal Bourguignon__

Thanks guys!
-T


reply via email to

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