~ubuntu-branches/ubuntu/karmic/emacs-snapshot/karmic

« back to all changes in this revision

Viewing changes to lisp/msb.el

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-04-05 09:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090405091430-nw07lynn2arotjbe
Tags: upstream-20090320
ImportĀ upstreamĀ versionĀ 20090320

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;;; msb.el --- customizable buffer-selection with multiple menus
2
2
 
3
3
;; Copyright (C) 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002,
4
 
;;   2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
4
;;   2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5
5
 
6
6
;; Author: Lars Lindberg <lars.lindberg@home.se>
7
7
;; Maintainer: FSF
206
206
      (msb-menu-bar-update-buffers t)))
207
207
 
208
208
(defcustom msb-menu-cond msb--very-many-menus
209
 
  "*List of criteria for splitting the mouse buffer menu.
 
209
  "List of criteria for splitting the mouse buffer menu.
210
210
The elements in the list should be of this type:
211
211
 (CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLING-FN ITEM-SORT-FN).
212
212
 
264
264
  :version "20.3")
265
265
 
266
266
(defcustom msb-separator-diff 100
267
 
  "*Non-nil means use separators.
 
267
  "Non-nil means use separators.
268
268
The separators will appear between all menus that have a sorting key
269
269
that differs by this value or more."
270
270
  :type '(choice integer (const nil))
275
275
  "*The sort key for files sorted by directory.")
276
276
 
277
277
(defcustom msb-max-menu-items 15
278
 
  "*The maximum number of items in a menu.
 
278
  "The maximum number of items in a menu.
279
279
If this variable is set to 15 for instance, then the submenu will be
280
280
split up in minor parts, 15 items each.  A value of nil means no limit."
281
281
  :type '(choice integer (const nil))
283
283
  :group 'msb)
284
284
 
285
285
(defcustom msb-max-file-menu-items 10
286
 
  "*The maximum number of items from different directories.
 
286
  "The maximum number of items from different directories.
287
287
 
288
288
When the menu is of type `file by directory', this is the maximum
289
289
number of buffers that are clumped together from different
298
298
  :group 'msb)
299
299
 
300
300
(defcustom msb-most-recently-used-sort-key -1010
301
 
  "*Where should the menu with the most recently used buffers be placed?"
 
301
  "Where should the menu with the most recently used buffers be placed?"
302
302
  :type 'integer
303
303
  :set 'msb-custom-set
304
304
  :group 'msb)
305
305
 
306
306
(defcustom msb-display-most-recently-used 15
307
 
  "*How many buffers should be in the most-recently-used menu.
 
307
  "How many buffers should be in the most-recently-used menu.
308
308
No buffers at all if less than 1 or nil (or any non-number)."
309
309
  :type 'integer
310
310
  :set 'msb-custom-set
311
311
  :group 'msb)
312
312
 
313
313
(defcustom msb-most-recently-used-title "Most recently used (%d)"
314
 
  "*The title for the most-recently-used menu."
 
314
  "The title for the most-recently-used menu."
315
315
  :type 'string
316
316
  :set 'msb-custom-set
317
317
  :group 'msb)
320
320
  "*Function that specifies how many pixels to shift the top menu leftwards.")
321
321
 
322
322
(defcustom msb-display-invisible-buffers-p nil
323
 
  "*Show invisible buffers or not.
 
323
  "Show invisible buffers or not.
324
324
Non-nil means that the buffer menu should include buffers that have
325
325
names that starts with a space character."
326
326
  :type 'boolean
342
342
information.")
343
343
 
344
344
(defcustom msb-item-sort-function 'msb-sort-by-name
345
 
  "*The order of items in a buffer menu.
 
345
  "The order of items in a buffer menu.
346
346
 
347
347
The default function to call for handling the order of items in a menu
348
348
item.  This function is called like a sort function.  The items look
359
359
  :group 'msb)
360
360
 
361
361
(defcustom msb-files-by-directory nil
362
 
  "*Non-nil means that files should be sorted by directory.
 
362
  "Non-nil means that files should be sorted by directory.
363
363
This is instead of the groups in `msb-menu-cond'."
364
364
  :type 'boolean
365
365
  :set 'msb-custom-set