The pop-up buffer list menu can be customized two ways:
anju-buffer-list-filter-functions, a list of filter functions that are run each time the pop-up menu is raised when left-clicking the mode line buffer name.
anju-mode-line-buffer-list-function, which gives a user complete control on what is displayed in the pop-up menu.
This variable is an alist used by the function anju-buffer-list-menu-items to populate the list of buffers used in the pop up menu anju-popup-buffer-menu.
This alist is filled using the following key, value pair types:
a buffer list filter function
integer used as the maximum count of buffers to use from the filter function
The buffer list filter function is of the form (filter-fn (buffers &optional count)) where buffers is a list of buffers (usually buffer-list) and count is the maximum count of buffers to use.
The order of the buffer list presumes the most recently used buffers are at the front of the list.
Anju provides the following buffer filters:
anju-buffer-list-plain-filterbuffers whose name is not marked as special (a name wrapped in ‘*’).
anju-buffer-list-compilation-filterbuffers whose major mode is compilation-mode.
anju-buffer-list-grep-filterbuffers whose major mode is grep-mode.
anju-buffer-list-xref-filterbuffers whose major mode is xref--xref-buffer-mode.
anju-buffer-list-eshell-filterbuffers whose major mode is eshell-mode.
anju-buffer-list-shell-filterbuffers whose major mode is shell-mode.
anju-buffer-list-info-filterbuffers whose major mode is Info-mode.
anju-buffer-list-help-filterbuffers whose major mode is help-mode.
Users can customize anju-buffer-list-filter-functions to re-compose or add their own filters to define the resulting buffer list returned by anju-buffer-list-menu-items. It is recommended that the customize-variable command be used to accomplish this.
Function that populates the mode line buffer name popup menu.
Assign this variable to a function that returns a value that conforms to the MENU parameter of the command popup-menu.
This setting allows for customization of the buffer list (or any other menu content) when the mode line buffer name (identifier) is clicked (typically with mouse-1).
Users who wish define their own menu should override this value with their own function. It is recommended that such users look at the source to anju-buffer-list-menu-items as a start to defining their own menu function.