[Top][All Lists]

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

Re: Execute In Multiple Shells?

From: Dmitry Dzhus
Subject: Re: Execute In Multiple Shells?
Date: Tue, 24 Nov 2009 22:32:51 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

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`?
Happy Hacking.

reply via email to

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