Mercurial > hg > xemacs-beta
changeset 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 | eaedf30d9d76 |
children | 5c7570514cc5 |
files | lisp/ChangeLog lisp/gutter-items.el |
diffstat | 2 files changed, 44 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Tue Jul 23 08:35:11 2002 +0000 +++ b/lisp/ChangeLog Wed Jul 24 04:46:29 2002 +0000 @@ -1,3 +1,12 @@ +2002-06-04 John H Palmieri <palmieri@math.washington.edu> + + * gutter-items.el (buffers-tab-omit-function): Default value is + now `buffers-tab-omit-some-buffers'. + * gutter-items.el (buffers-tab-omit-list): New customizable + variable, specifying which buffers to omit from buffers tab. + * gutter-items.el (buffers-tab-omit-some-buffers): New function + which uses buffers-tab-omit-list. + 2002-07-21 John Paul Wallington <jpw@xemacs.org> * process.el (substitute-env-vars): New function; sync with
--- a/lisp/gutter-items.el Tue Jul 23 08:35:11 2002 +0000 +++ b/lisp/gutter-items.el Wed Jul 24 04:46:29 2002 +0000 @@ -66,14 +66,37 @@ (function :tag "Other")) :group 'buffers-tab) -(defcustom buffers-tab-omit-function 'buffers-menu-omit-invisible-buffers +(defcustom buffers-tab-omit-function 'buffers-tab-omit-some-buffers "*If non-nil, a function specifying the buffers to omit from the buffers tab. This is passed a buffer and should return non-nil if the buffer should be -omitted. The default value `buffers-menu-omit-invisible-buffers' omits -buffers that are normally considered \"invisible\" (those whose name -begins with a space)." +omitted. The default value `buffers-tab-omit-some-buffers' omits +buffers based on the value of `buffers-tab-omit-list'." :type '(choice (const :tag "None" nil) - function) + function) + :group 'buffers-tab) + +(defcustom buffers-tab-omit-list '("\\` ") + "*A list of types of buffers to omit from the buffers tab. +This is only used if `buffers-tab-omit-function' is set to +`buffers-tab-omit-some-buffers', its default value." + :type '(checklist + :greedy t + :format "%{Omit List%}: \n%v" + (const + :tag "Invisible buffers (those whose names start with a space) " + "\\` ") + (const + :tag "Help buffers " + "\\`\\*Help") + (const + :tag "Customize buffers " + "\\`\\*Customize") + (const + :tag "`special' buffers (those whose names start with *) " + "\\`\\*") + (const + :tag "`special' buffers other than *scratch*" + "\\`\\*\\([^s]\\|s[^c]\\|sc[^r]\\|scr[^a]\\|scra[^t]\\|scrat[^c]\\|scratc[^h]\\|scratch[^*]\\|scratch\\*.+\\)")) :group 'buffers-tab) (defvar buffers-tab-selection-function 'select-buffers-tab-buffers-by-mode @@ -664,5 +687,12 @@ (display-progress-feedback label str value) str)))) +(defun buffers-tab-omit-some-buffers (buf) + "For use as a value of `buffers-tab-omit-function'. +Omit buffers based on the value of `buffers-tab-omit-list', which +see." + (let ((regexp (mapconcat 'concat buffers-tab-omit-list "\\|"))) + (not (null (string-match regexp (buffer-name buf)))))) + (provide 'gutter-items) ;;; gutter-items.el ends here.