| Server IP : 217.160.0.212 / Your IP : 216.73.217.5 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(defconst msb--few-menus '(((and (boundp 'server-buffer-clients) server-buffer-clients 'multi) 3030 "Clients (%d)") ((and msb-display-invisible-buffers-p (msb-invisible-buffer-p) 'multi) 3090 "Invisible buffers (%d)") ((eq major-mode 'dired-mode) 2010 "Dired (%d)" msb-dired-item-handler msb-sort-by-directory) ((eq major-mode 'Man-mode) 4090 "Manuals (%d)") ((eq major-mode 'w3-mode) 4020 "WWW (%d)") ((or (memq major-mode '(rmail-mode rmail-edit-mode vm-summary-mode vm-mode mail-mode)) (memq major-mode '(mh-letter-mode mh-show-mode mh-folder-mode)) (memq major-mode '(gnus-summary-mode message-mode gnus-group-mode gnus-article-mode score-mode gnus-browse-killed-mode))) 4010 "Mail (%d)") ((not buffer-file-name) 4099 "Buffers (%d)") ('no-multi 1099 "Files (%d)")))
(defconst msb--very-many-menus '(((and (boundp 'server-buffer-clients) server-buffer-clients 'multi) 1010 "Clients (%d)") ((and (boundp 'vc-mode) vc-mode 'multi) 1020 "Version Control (%d)") ((and buffer-file-name (buffer-modified-p) 'multi) 1030 "Changed files (%d)") ((and (get-buffer-process (current-buffer)) 'multi) 1040 "Processes (%d)") ((and msb-display-invisible-buffers-p (msb-invisible-buffer-p) 'multi) 1090 "Invisible buffers (%d)") ((eq major-mode 'dired-mode) 2010 "Dired (%d)" msb-dired-item-handler msb-sort-by-directory) ((eq major-mode 'Man-mode) 5030 "Manuals (%d)") ((eq major-mode 'w3-mode) 5020 "WWW (%d)") ((or (memq major-mode '(rmail-mode rmail-edit-mode vm-summary-mode vm-mode mail-mode)) (memq major-mode '(mh-letter-mode mh-show-mode mh-folder-mode)) (memq major-mode '(gnus-summary-mode message-mode gnus-group-mode gnus-article-mode score-mode gnus-browse-killed-mode))) 5010 "Mail (%d)") ((and (not buffer-file-name) 'no-multi) 5099 "Other non-file buffers (%d)") ((and (string-match "/\\.[^/]*$" buffer-file-name) 'multi) 3090 "Hidden Files (%d)") ((memq major-mode '(c-mode c++-mode)) 3010 "C/C++ Files (%d)") ((eq major-mode 'emacs-lisp-mode) 3020 "Elisp Files (%d)") ((eq major-mode 'latex-mode) 3030 "LaTeX Files (%d)") ('no-multi 3099 "Other files (%d)")))
(custom-declare-group 'msb nil "Customizable buffer-selection with multiple menus." :prefix "msb-" :group 'mouse)
#@63 Set the value of custom variables for msb.
(fn SYMBOL VALUE)
(defalias 'msb-custom-set #[514 "L\210\301\302!\205 \205 \303\304!\207" [msb-mode featurep msb msb-menu-bar-update-buffers t] 4 (#$ . 2264)])
(byte-code "\302\303\304\305\306DD\307\310\311\312\313\314\315\257\312\313\316\315 \257\317BBB\320\321&\210\302\322\304\305\323DD\324\310\325\320\321\326\327& \210\302\330\304\305\331DD\332\310\333\320\321&\207" [msb--very-many-menus msb--few-menus custom-declare-variable msb-menu-cond funcall function #[0 "\207" [msb--very-many-menus] 1 #1=""] "List of criteria for splitting the mouse buffer menu.\nThe elements in the list should be of this type:\n (CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLING-FN ITEM-SORT-FN).\n\nWhen making the split, the buffers are tested one by one against the\nCONDITION, just like a Lisp cond: When hitting a true condition, the\nother criteria are *not* tested and the buffer name will appear in the\nmenu with the menu-title corresponding to the true condition.\n\nIf the condition returns the symbol `multi', then the buffer will be\nadded to this menu *and* tested for other menus too. If it returns\n`no-multi', then the buffer will only be added if it hasn't been added\nto any other menu.\n\nDuring this test, the buffer in question is the current buffer, and\nthe test is surrounded by calls to `save-excursion' and\n`save-match-data'.\n\nThe categories are sorted by MENU-SORT-KEY. Smaller keys are on top.\nA value of nil means don't display this menu.\n\nMENU-TITLE is really a format. If you add %d in it, the %d is\nreplaced with the number of items in that menu.\n\nITEM-HANDLING-FN is optional. If it is supplied and is a function,\nthen it is used for displaying the items in that particular buffer\nmenu, otherwise the function pointed out by\n`msb-item-handling-function' is used.\n\nITEM-SORT-FN is also optional.\nIf it is not supplied, the function pointed out by\n`msb-item-sort-function' is used.\nIf it is nil, then no sort takes place and the buffers are presented\nin least-recently-used order.\nIf it is t, then no sort takes place and the buffers are presented in\nmost-recently-used order.\nIf it is supplied and non-nil and not t than it is used for sorting\nthe items in that particular buffer menu.\n\nNote1: There should always be a `catch-all' as last element, in this\nlist. That is an element like (t TITLE ITEM-HANDLING-FUNCTION).\nNote2: A buffer menu appears only if it has at least one buffer in it.\nNote3: If you have a CONDITION that can't be evaluated you will get an\nerror every time you do \\[msb]." :type choice const :tag "long" :value "short" ((sexp :tag "user")) :set msb-custom-set msb-modes-key #[0 "\300\207" [4000] 1 #1#] "The sort key for files sorted by mode." integer :version "20.3" msb-separator-diff #[0 "\300\207" [100] 1 #1#] "Non-nil means use separators.\nThe separators will appear between all menus that have a sorting key\nthat differs by this value or more." (choice integer (const nil))] 12)
#@45 The sort key for files sorted by directory.
(defvar msb-files-by-directory-sort-key 0 (#$ . 5287))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\315\310\311&\210\300\316\302\303\317DD\320\306\315\310\311&\210\300\321\302\303\322DD\323\306\315\310\311&\210\300\324\302\303\325DD\326\306\327\310\311&\207" [custom-declare-variable msb-max-menu-items funcall function #[0 "\300\207" [15] 1 #1=""] "The maximum number of items in a menu.\nIf this variable is set to 15 for instance, then the submenu will be\nsplit up in minor parts, 15 items each. A value of nil means no limit." :type (choice integer (const nil)) :set msb-custom-set msb-max-file-menu-items #[0 "\300\207" [10] 1 #1#] "The maximum number of items from different directories.\n\nWhen the menu is of type `file by directory', this is the maximum\nnumber of buffers that are clumped together from different\ndirectories.\n\nSet this to 1 if you want one menu per directory instead of clumping\nthem together.\n\nIf the value is not a number, then the value 10 is used." integer msb-most-recently-used-sort-key #[0 "\300\207" [-1010] 1 #1#] "Where should the menu with the most recently used buffers be placed?" msb-display-most-recently-used #[0 "\300\207" [15] 1 #1#] "How many buffers should be in the most-recently-used menu.\nNo buffers at all if less than 1 or nil (or any non-number)." msb-most-recently-used-title #[0 "\300\207" ["Most recently used (%d)"] 1 #1#] "The title for the most-recently-used menu." string] 8)
#@74 Function that specifies how many pixels to shift the top menu leftwards.
(defvar msb-horizontal-shift-function #[0 "\300\207" [0] 1] (#$ . 6832))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable msb-display-invisible-buffers-p funcall function #[0 "\300\207" [nil] 1 ""] "Show invisible buffers or not.\nNon-nil means that the buffer menu should include buffers that have\nnames that starts with a space character." :type boolean :set msb-custom-set] 8)
#@500 The appearance of a buffer menu.
The default function to call for handling the appearance of a menu
item. It should take two arguments, BUFFER and MAX-BUFFER-NAME-LENGTH,
where the latter is the max length of all buffer names.
The function should return the string to use in the menu.
When the function is called, BUFFER is the current buffer. This
function is called for items in the variable `msb-menu-cond' that have
nil as ITEM-HANDLING-FUNCTION. See `msb-menu-cond' for more
information.
(defvar msb-item-handling-function 'msb-item-handler (#$ . 7331))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\315\310\311&\210\316\317\320\321#\210\322\211\203F \211@\317N\203? \320N\204? \323\320\317N#\210A\266\202\202% \210\324\317\320\325#\210\300\320\302\303\326DD\327\306\330\310\311&\210\324\320\331\332#\207" [custom-declare-variable msb-item-sort-function funcall function #[0 "\300\207" [msb-sort-by-name] 1 #1=""] "The order of items in a buffer menu.\n\nThe default function to call for handling the order of items in a menu\nitem. This function is called like a sort function. The items look\nlike (ITEM-NAME . BUFFER).\n\nITEM-NAME is the name of the item that will appear in the menu.\nBUFFER is the buffer, this is not necessarily the current buffer.\n\nSet this to nil or t if you don't want any sorting (faster)." :type (choice (const msb-sort-by-name) (const :tag "Newest first" t) (const :tag "Oldest first" nil)) :set msb-custom-set msb-files-by-directory #[0 "\300\207" [nil] 1 #1#] "Non-nil means that files should be sorted by directory.\nThis is instead of the groups in `msb-menu-cond'." boolean defvaralias msb-after-load-hooks msb-after-load-hook nil (saved-value saved-variable-comment) put make-obsolete-variable "24.1" #[0 "\300\207" [nil] 1 #1#] "Hook run after the msb package has been loaded." hook "use `with-eval-after-load' instead." "28.1"] 8)
(defvar msb--last-buffer-menu nil)
(defvar msb--error nil)
#@295 Create one string item, concerning BUFFER, for the buffer menu.
The item looks like:
*% <buffer-name>
The `*' appears only if the buffer is marked as modified.
The `%' appears only if the buffer is read-only.
Optional second argument MAXBUF is completely ignored.
(fn BUFFER &optional MAXBUF)
(defalias 'msb-item-handler #[513 "\301 \302 \203 \303\202\f \304\203 \305\202 \304\306\307$\207" [buffer-read-only buffer-name buffer-modified-p "*" " " "%" format "%s%s %s"] 10 (#$ . 9333)])
(defalias 'msb--dired-directory #[0 ";\203 \301\302!!\207:\203 \301\302@!!\207\303\304\305 \"\207" [dired-directory abbreviate-file-name expand-file-name error "Unknown type of `dired-directory' in buffer %s" buffer-name] 3])
#@303 Create one string item, concerning a dired BUFFER, for the buffer menu.
The item looks like:
*% <buffer-name>
The `*' appears only if the buffer is marked as modified.
The `%' appears only if the buffer is read-only.
Optional second argument MAXBUF is completely ignored.
(fn BUFFER &optional MAXBUF)
(defalias 'msb-dired-item-handler #[513 "\301 \302 \203 \303\202\f \304\203 \305\202 \304\306\307$\207" [buffer-read-only msb--dired-directory buffer-modified-p "*" " " "%" format "%s%s %s"] 10 (#$ . 10067)])
#@277 Create one string item for the buffer menu.
The item looks like:
<buffer-name> *%# <file-name>
The `*' appears only if the buffer is marked as modified.
The `%' appears only if the buffer is read-only.
The `#' appears only version control file (SCCS/RCS).
(fn BUFFER MAXBUF)
(defalias 'msb-alon-item-handler #[514 "\303\211\304\"\305!\306 \203 \307\202 \310\203 \311\202 \310\312\301!\203) \203) \313\202* \310\n\206/ \314&\207" [buffer-read-only vc-mode buffer-file-name format "%%%ds %%s%%s%%s %%s" buffer-name buffer-modified-p "*" " " "%" boundp "#" ""] 9 (#$ . 10593)])
#@110 Sort the items ITEM1 and ITEM2 by their `buffer-name'.
An item looks like (NAME . BUFFER).
(fn ITEM1 ITEM2)
(defalias 'msb-sort-by-name #[514 "\300A!\300A!\231\207" [buffer-name] 5 (#$ . 11187)])
#@121 Sort the items ITEM1 and ITEM2 by directory name. Made for dired.
An item look like (NAME . BUFFER).
(fn ITEM1 ITEM2)
(defalias 'msb-sort-by-directory #[514 "rAq\210\300 )rAq\210\300 )\231\207" [msb--dired-directory] 4 (#$ . 11393)])
#@290 Pop up several menus of buffers for selection with the mouse.
This command switches buffers in the window that you clicked on, and
selects that window.
See the function `mouse-select-buffer' and the variable
`msb-menu-cond' for more information about how the menus are split.
(fn EVENT)
(defalias 'msb #[257 "\301 \302!\211@\262\303\304!\204 \305!\210\306\307\310\"?\262\311!\211\203* \312!\266\202/ \305!\266\211\203>