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

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

Re: buffer-list and desktop


From: Kevin Rodgers
Subject: Re: buffer-list and desktop
Date: Wed, 10 Nov 2004 15:06:29 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Kevin Rodgers wrote:
> Here's a start:

Gotta get used to using with-current-buffer:

(defun desktop-list-buffers ()
  "Return the list of buffers that `desktop-save' would save."
  (nreverse
   (apply 'nconc
          (mapcar (lambda (buffer)
                    (with-current-buffer buffer
                      (if (desktop-save-buffer-p (buffer-file-name)
                                                 (buffer-name)
                                                 major-mode)
                          (list buffer))))
                  (buffer-list)))))

--
Kevin Rodgers


reply via email to

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