?
Current Path : /usr/share/emacs/24.3/lisp/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/bs.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:12 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/bs.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301\302\303\304\305\306\307\306\310\311\312&\210\300\313\302\314\311\301%\210\315\316\317\320\321DD\322\311\313\323\324&\207" [custom-declare-group bs nil "Buffer Selection: Maintaining buffers by buffer menu." :version "21.1" :link (emacs-commentary-link "bs") (url-link "http://www.geekware.de/software/emacs") :group convenience bs-appearance "Buffer Selection appearance: Appearance of bs buffer menu." custom-declare-variable bs-attributes-list funcall function #[0 "\300\207" [((#1="" 1 1 left bs--get-marked-string) ("M" 1 1 left bs--get-modified-string) ("R" 2 2 left bs--get-readonly-string) ("Buffer" bs--get-name-length 10 left bs--get-name) (#1# 1 1 left " ") ("Size" 8 8 right bs--get-size-string) (#1# 1 1 left " ") ("Mode" 12 12 right bs--get-mode-name) (#1# 2 2 left " ") ("File" 12 12 left bs--get-file-name) (#1# 2 2 left " "))] 1 "\n\n(fn)"] "List specifying the layout of a Buffer Selection Menu buffer.\nEach entry specifies a column and is a list of the form of:\n(HEADER MINIMUM-LENGTH MAXIMUM-LENGTH ALIGNMENT FUN-OR-STRING)\n\nHEADER : String for header for first line or a function\n which calculates column title.\nMINIMUM-LENGTH : Minimum width of column (number or name of function).\n The function must return a positive integer.\nMAXIMUM-LENGTH : Maximum width of column (number or name of function)\n (currently ignored).\nALIGNMENT : Alignment of column (`left', `right', `middle').\nFUN-OR-STRING : Name of a function for calculating the value or a\n string for a constant value.\n\nThe function gets as parameter the buffer where we have started\nbuffer selection and the list of all buffers to show. The function must\nreturn a string representing the column's value." :type (repeat sexp)] 12) #@82 Return a regexp matching the first line of a Buffer Selection Menu buffer. (fn) (defalias 'bs--make-header-match-string #[0 "\301\302\303\304#\305Q\207" [bs-attributes-list "^\\(" mapconcat car " *" " *$\\)"] 5 (#$ . 2375)]) #@58 Default font lock expressions for Buffer Selection Menu. (defvar bs-mode-font-lock-keywords (byte-code "\300 \301\302E\303\304\305\306!\203 \306\202 \307E\310\311F\207" [bs--make-header-match-string (1 font-lock-type-face append) (1 'bold append) "^\\(.*\\*.*\\*.*\\)$" 1 facep font-lock-constant-face font-lock-comment-face ("^..\\(.*Dired .*\\)$" 1 font-lock-function-name-face) ("^.\\(\\*\\) +[^\\*]" 1 font-lock-comment-face)] 5) (#$ . 2608)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable bs-max-window-height funcall function #[0 "\300\207" [20] 1 "\n\n(fn)"] "Maximal window height of Buffer Selection Menu." :group bs-appearance :type integer] 8) #@151 Regular expression specifying which buffers not to show. A buffer whose name matches this regular expression will not be included in the buffer list. (defvar bs-dont-show-regexp nil (#$ . 3312)) #@355 Regular expression for specifying buffers which must be shown. A buffer whose name matches this regular expression will be included in the buffer list. Note that this variable is temporary: if the configuration is changed it is reset to nil. Use `bs-must-always-show-regexp' to specify buffers that must always be shown regardless of the configuration. (defvar bs-must-show-regexp nil (#$ . 3514)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable bs-must-always-show-regexp funcall function #[0 "\300\207" [nil] 1 "\n\n(fn)"] "Regular expression for specifying buffers to show always.\nA buffer whose name matches this regular expression will\nbe shown regardless of current configuration of Buffer Selection Menu." :group bs :type (choice (const :tag "Nothing at all" nil) regexp)] 8) #@199 Function for specifying buffers not to show. The function gets one argument - the buffer to test. The function must return a value different from nil to ignore the buffer in Buffer Selection Menu. (defvar bs-dont-show-function nil (#$ . 4346)) #@107 Function for specifying buffers which must be shown. The function gets one argument - the buffer to test. (defvar bs-must-show-function nil (#$ . 4598)) #@205 Sort function to sort the buffers that appear in Buffer Selection Menu. The function gets two arguments - the buffers to compare. It must return non-nil if the first buffer should sort before the second. (defvar bs-buffer-sort-function nil (#$ . 4758)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\311&\207" [custom-declare-variable bs-maximal-buffer-name-column funcall function #[0 "\300\207" [45] 1 "\n\n(fn)"] "Maximum column width for buffer names.\nThe column for buffer names has dynamic width. The width depends on\nmaximal and minimal length of names of buffers to show. The maximal\nwidth is bounded by `bs-maximal-buffer-name-column'.\nSee also `bs-minimal-buffer-name-column'." :group bs-appearance :type integer bs-minimal-buffer-name-column #[0 "\300\207" [15] 1 "\n\n(fn)"] "Minimum column width for buffer names.\nThe column for buffer names has dynamic width. The width depends on\nmaximal and minimal length of names of buffers to show. The minimal\nwidth is bounded by `bs-minimal-buffer-name-column'.\nSee also `bs-maximal-buffer-name-column'."] 8) #@55 Number of lines for headers in Buffer Selection Menu. (defconst bs-header-lines-length 2 (#$ . 5892)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\315\310\316&\210\300\317\302\303\320DD\321\306\315\310\316&\207" [custom-declare-variable bs-configurations funcall function #[0 "\300\207" [(("all" nil nil nil nil nil) ("files" nil nil nil bs-visits-non-file bs-sort-buffer-interns-are-last) ("files-and-scratch" "^\\*scratch\\*$" nil nil bs-visits-non-file bs-sort-buffer-interns-are-last) ("all-intern-last" nil nil nil nil bs-sort-buffer-interns-are-last))] 1 "\n\n(fn)"] "List of all configurations you can use in the Buffer Selection Menu.\nA configuration describes which buffers appear in Buffer Selection Menu\nand also the order of buffers. A configuration is a list with\nsix elements. The first element is a string and describes the configuration.\nThe following five elements represent the values for Buffer Selection Menu\nconfiguration variables `bs-must-show-regexp', `bs-must-show-function',\n`bs-dont-show-regexp', `bs-dont-show-function' and `bs-buffer-sort-function'.\nBy setting these variables you define a configuration." :group bs-appearance :type (repeat sexp) bs-default-configuration #[0 "\300\207" ["files"] 1 "files\n\n(fn)"] "Name of default configuration used by the Buffer Selection Menu.\n\\<bs-mode-map>\nWill be changed using key \\[bs-select-next-configuration].\nMust be a string used in `bs-configurations' for naming a configuration." bs string bs-alternative-configuration #[0 "\300\207" ["all"] 1 "all\n\n(fn)"] "Name of configuration used when calling `bs-show' with \\[universal-argument] as prefix key.\nMust be a string used in `bs-configurations' for naming a configuration."] 8) #@105 Name of current configuration. Must be a string used in `bs-configurations' for naming a configuration. (defvar bs-current-configuration bs-default-configuration (#$ . 7672)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\315\310\316&\210\300\317\302\303\320DD\321\306\315\310\316&\210\300\322\302\303\323DD\324\306\315\310\316&\210\300\325\302\303\326DD\327\306\315\310\316&\210\300\330\302\303\331DD\332\306\315\310\316&\210\300\333\302\303\334DD\335\306\315\310\316&\207" [custom-declare-variable bs-cycle-configuration-name funcall function #[0 "\300\207" [nil] 1 "\n\n(fn)"] "Name of configuration used when cycling through the buffer list.\nA value of nil means to use current configuration `bs-default-configuration'.\nMust be a string used in `bs-configurations' for naming a configuration." :group bs :type (choice (const :tag "like current configuration" nil) string) bs-string-show-always #[0 "\300\207" ["+"] 1 "+\n\n(fn)"] "String added in column 1 indicating a buffer will always be shown." bs-appearance string bs-string-show-never #[0 "\300\207" ["-"] 1 "-\n\n(fn)"] "String added in column 1 indicating a buffer will never be shown." bs-string-current #[0 "\300\207" ["."] 1 ".\n\n(fn)"] "String added in column 1 indicating the current buffer." bs-string-current-marked #[0 "\300\207" ["#"] 1 "#\n\n(fn)"] "String added in column 1 indicating the current buffer when it is marked." bs-string-marked #[0 "\300\207" [">"] 1 ">\n\n(fn)"] "String added in column 1 indicating a marked buffer." bs-string-show-normally #[0 "\300\207" [" "] 1 " \n\n(fn)"] "String added in column 1 indicating an unmarked buffer."] 8) #@70 Maximum length of all displayed buffer names. Used internally, only. (defvar bs--name-entry-length 20 (#$ . 9358)) #@259 Flag for the current mode for showing this buffer. A value of nil means buffer will be shown depending on the current configuration. A value of `never' means to never show the buffer. A value of `always' means to show buffer regardless of the configuration. (defvar bs-buffer-show-mark nil (#$ . 9480)) (byte-code "\300\301!\210\302\303!\204 \304\303!\210\305\303\306\"\210\300\207" [make-variable-buffer-local bs-buffer-show-mark facep region make-face set-face-background "gray75"] 3) #@55 Compare buffers B1 and B2 by buffer name. (fn B1 B2) (defalias 'bs--sort-by-name #[514 "\300!\300!\231\207" [buffer-name] 5 (#$ . 9974)]) #@53 Compare buffers B1 and B2 by file name. (fn B1 B2) (defalias 'bs--sort-by-filename #[514 "\300!\206 \301\300!\206 \301\231\207" [buffer-file-name ""] 5 (#$ . 10121)]) #@53 Compare buffers B1 and B2 by mode name. (fn B1 B2) (defalias 'bs--sort-by-mode #[514 "rq\210\301\302\211$q\210\301\302\211$\231)\207" [mode-name format-mode-line nil] 8 (#$ . 10299)]) #@55 Compare buffers B1 and B2 by buffer size. (fn B1 B2) (defalias 'bs--sort-by-size #[514 "\300!\300!W\207" [buffer-size] 5 (#$ . 10496)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable bs-sort-functions funcall function #[0 "\300\207" [(("by name" bs--sort-by-name "Buffer" region) ("by size" bs--sort-by-size "Size" region) ("by mode" bs--sort-by-mode "Mode" region) ("by filename" bs--sort-by-filename "File" region) ("by nothing" nil nil nil))] 1 "\n\n(fn)"] "List of all possible sorting aspects for Buffer Selection Menu.\nYou can add a new entry with a call to `bs-define-sort-function'.\nEach element is a list of four elements (NAME FUNCTION REGEXP-FOR-SORTING FACE).\nNAME specifies the sort order defined by function FUNCTION.\nFUNCTION nil means don't sort the buffer list. Otherwise the function\nmust have two parameters - the buffers to compare.\nREGEXP-FOR-SORTING is a regular expression which describes the\ncolumn title to highlight.\nFACE is a face used to fontify the sorted column title. A value of nil means\ndon't highlight." :group bs :type (repeat sexp)] 8) #@558 Define a new function for buffer sorting in Buffer Selection Menu. NAME specifies the sort order defined by function FUN. A value of nil for FUN means don't sort the buffer list. Otherwise the functions must have two parameters - the buffers to compare. REGEXP-FOR-SORTING is a regular expression which describes the column title to highlight. FACE is a face used to fontify the sorted column title. A value of nil means don't highlight. The new sort aspect will be inserted into list `bs-sort-functions'. (fn NAME FUN &optional REGEXP-FOR-SORTING FACE) (defalias 'bs-define-sort-function #[1026 "\301\"\211\203 \211E\241\202 FB\211\207" [bs-sort-functions assoc] 9 (#$ . 11629)]) #@109 Description of the current function for sorting the buffer list. This is an element of `bs-sort-functions'. (defvar bs--current-sort-function nil (#$ . 12333)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable bs-default-sort-name funcall function #[0 "\300\207" ["by nothing"] 1 "by nothing\n\n(fn)"] "Name of default sort behavior.\nMust be \"by nothing\" or a string used in `bs-sort-functions' for\nnaming a sort behavior. Default is \"by nothing\" which means no sorting." :group bs :type string :set #[514 "L\210\302\"\211\207" [bs-sort-functions bs--current-sort-function assoc] 5 "\n\n(fn VAR-NAME VALUE)"]] 10) #@73 The buffer in which the user started the current Buffer Selection Menu. (defvar bs--buffer-coming-from nil (#$ . 13010)) #@191 Flag whether showing all buffers regardless of current configuration. Non-nil means to show all buffers. Otherwise show buffers defined by current configuration `bs-current-configuration'. (defvar bs--show-all nil (#$ . 13138)) #@61 Window configuration before starting Buffer Selection Menu. (defvar bs--window-config-coming-from nil (#$ . 13373)) #@155 Regular expression specifying which buffers never to show. A buffer whose name matches this regular expression will never be included in the buffer list. (defvar bs--intern-show-never "^ \\|\\*buffer-selection\\*" (#$ . 13496)) #@72 List of buffers shown in Buffer Selection Menu. Used internally, only. (defvar bs-current-list nil (#$ . 13730)) #@52 Currently marked buffers in Buffer Selection Menu. (defvar bs--marked-buffers nil (#$ . 13849)) #@22 Keymap of `bs-mode'. (defvar bs-mode-map (byte-code "\300 \301\302\303#\210\301\304\303#\210\301\305\306#\210\301\307\310#\210\301\311\312#\210\301\313\312#\210\301\314\315#\210\316\211\317X\203B \301\320!\321#\210\211T\262\202- \210\301\322\323#\210\301\324\323#\210\301\325\326#\210\301\327\330#\210\301\331\332#\210\301\333\332#\210\301\334\335#\210\301\336\337#\210\301\340\335#\210\301\341\337#\210\301\342\303#\210\301\343\344#\210\301\345\346#\210\301\347\350#\210\301\351\352#\210\301\353\354#\210\301\355\356#\210\301\357\354#\210\301\360\361#\210\301\362\363#\210\301\364\365#\210\301\366\367#\210\301\370\367#\210\301\371\372#\210\301\373\372#\210\301\374\375#\210\301\376\377#\210\301\201@ \201A #\210\301\201B \201C #\210\301\201D \201E #\210\301\201F \201G #\210\301\201H \201I #\210\301\201J \201K #\210\301\201L \201M #\210\301\201N \201O #\210\211\207" [make-sparse-keymap define-key " " bs-select "f" "v" bs-view "!" bs-select-in-one-window [mouse-2] bs-mouse-select [button2] "F" bs-select-other-frame 49 57 char-to-string digit-argument "-" negative-argument "-" "o" bs-select-other-window "" bs-tmp-select-other-window [mouse-3] bs-mouse-select-other-frame [button3] [up] bs-up "n" bs-down "p" [down] " " "b" bs-bury-buffer "s" bs-save "S" bs-show-sorted "a" bs-toggle-show-all "d" bs-delete "" bs-delete-backward "k" "g" bs-refresh "C" bs-set-configuration-and-refresh "c" bs-select-next-configuration "q" bs-kill "" "" bs-abort "" "%" bs-toggle-readonly "~" bs-clear-modified "M" bs-toggle-current-to-show "+" bs-set-current-buffer-to-show-always "t" bs-visit-tags-table "m" bs-mark-current "u" bs-unmark-current ">" scroll-right "<" scroll-left "?" bs-help] 6) (#$ . 13951)) #@459 Return a list of buffers to be shown. LIST is a list of buffers to test for appearance in Buffer Selection Menu. The result list depends on the global variables `bs-dont-show-regexp', `bs-must-show-regexp', `bs-dont-show-function', `bs-must-show-function' and `bs-buffer-sort-function'. If SORT-DESCRIPTION isn't nil the list will be sorted by a special function. SORT-DESCRIPTION is an element of `bs-sort-functions'. (fn &optional LIST SORT-DESCRIPTION) (defalias 'bs-buffer-list #[512 "\211\206 \262\206 \306 \262\307\211\203\271 \211@\310! \307\311\312\f\n#,\205<