Commit c91c739e authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(menu-bar-update-buffers): Record buffers' mod and

read-only flags, and recompute if they change.
parent 268466ed
......@@ -264,11 +264,19 @@ A large number or nil slows down menu responsiveness.")
(defun menu-bar-update-buffers ()
(let ((buffers (buffer-list))
(frames (frame-list))
buffers-menu frames-menu)
(if (and (equal buffers menu-bar-update-buffers-last-buffers)
(setq buffers-info
(mapcar (function (lambda (buffer)
(list buffer (buffer-modified-p buffer)
(set-buffer buffer)
(if (and (equal buffers-info menu-bar-update-buffers-last-buffers)
(equal frames menu-bar-update-buffers-last-frames))
(setq menu-bar-update-buffers-last-buffers buffers)
(setq menu-bar-update-buffers-last-buffers buffers-info)
(setq menu-bar-update-buffers-last-frames frames)
;; If requested, list only the N most recently selected buffers.
(if (and (integerp buffers-menu-max-size)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment