Mercurial > hg > xemacs-beta
comparison lisp/gutter-items.el @ 931:3508e2f71814
[xemacs-hg @ 2002-07-24 04:46:29 by andyp]
gutter enhancement
author | andyp |
---|---|
date | Wed, 24 Jul 2002 04:46:29 +0000 |
parents | 4a27df428c73 |
children | cfe4bcb9bdd4 |
comparison
equal
deleted
inserted
replaced
930:eaedf30d9d76 | 931:3508e2f71814 |
---|---|
64 :type '(radio (function-item switch-to-buffer) | 64 :type '(radio (function-item switch-to-buffer) |
65 (function-item pop-to-buffer) | 65 (function-item pop-to-buffer) |
66 (function :tag "Other")) | 66 (function :tag "Other")) |
67 :group 'buffers-tab) | 67 :group 'buffers-tab) |
68 | 68 |
69 (defcustom buffers-tab-omit-function 'buffers-menu-omit-invisible-buffers | 69 (defcustom buffers-tab-omit-function 'buffers-tab-omit-some-buffers |
70 "*If non-nil, a function specifying the buffers to omit from the buffers tab. | 70 "*If non-nil, a function specifying the buffers to omit from the buffers tab. |
71 This is passed a buffer and should return non-nil if the buffer should be | 71 This is passed a buffer and should return non-nil if the buffer should be |
72 omitted. The default value `buffers-menu-omit-invisible-buffers' omits | 72 omitted. The default value `buffers-tab-omit-some-buffers' omits |
73 buffers that are normally considered \"invisible\" (those whose name | 73 buffers based on the value of `buffers-tab-omit-list'." |
74 begins with a space)." | |
75 :type '(choice (const :tag "None" nil) | 74 :type '(choice (const :tag "None" nil) |
76 function) | 75 function) |
76 :group 'buffers-tab) | |
77 | |
78 (defcustom buffers-tab-omit-list '("\\` ") | |
79 "*A list of types of buffers to omit from the buffers tab. | |
80 This is only used if `buffers-tab-omit-function' is set to | |
81 `buffers-tab-omit-some-buffers', its default value." | |
82 :type '(checklist | |
83 :greedy t | |
84 :format "%{Omit List%}: \n%v" | |
85 (const | |
86 :tag "Invisible buffers (those whose names start with a space) " | |
87 "\\` ") | |
88 (const | |
89 :tag "Help buffers " | |
90 "\\`\\*Help") | |
91 (const | |
92 :tag "Customize buffers " | |
93 "\\`\\*Customize") | |
94 (const | |
95 :tag "`special' buffers (those whose names start with *) " | |
96 "\\`\\*") | |
97 (const | |
98 :tag "`special' buffers other than *scratch*" | |
99 "\\`\\*\\([^s]\\|s[^c]\\|sc[^r]\\|scr[^a]\\|scra[^t]\\|scrat[^c]\\|scratc[^h]\\|scratch[^*]\\|scratch\\*.+\\)")) | |
77 :group 'buffers-tab) | 100 :group 'buffers-tab) |
78 | 101 |
79 (defvar buffers-tab-selection-function 'select-buffers-tab-buffers-by-mode | 102 (defvar buffers-tab-selection-function 'select-buffers-tab-buffers-by-mode |
80 "*If non-nil, a function specifying the buffers to select in the | 103 "*If non-nil, a function specifying the buffers to select in the |
81 buffers tab. This is passed two buffers and should return non-nil if | 104 buffers tab. This is passed two buffers and should return non-nil if |
662 (clear-progress-feedback label nil)) | 685 (clear-progress-feedback label nil)) |
663 (let ((str (apply 'format fmt args))) | 686 (let ((str (apply 'format fmt args))) |
664 (display-progress-feedback label str value) | 687 (display-progress-feedback label str value) |
665 str)))) | 688 str)))) |
666 | 689 |
690 (defun buffers-tab-omit-some-buffers (buf) | |
691 "For use as a value of `buffers-tab-omit-function'. | |
692 Omit buffers based on the value of `buffers-tab-omit-list', which | |
693 see." | |
694 (let ((regexp (mapconcat 'concat buffers-tab-omit-list "\\|"))) | |
695 (not (null (string-match regexp (buffer-name buf)))))) | |
696 | |
667 (provide 'gutter-items) | 697 (provide 'gutter-items) |
668 ;;; gutter-items.el ends here. | 698 ;;; gutter-items.el ends here. |