comparison lisp/msb.el @ 13998:2f2d3995b57f

(msb-max-file-menu-items, msb-menu-cond): Doc fix.
author Karl Heuer <kwzh@gnu.org>
date Thu, 04 Jan 1996 23:45:49 +0000
parents 1652f047ebcf
children 83f275dcd93a
comparison
equal deleted inserted replaced
13997:a56ed7721b43 13998:2f2d3995b57f
220 220
221 (defvar msb-max-file-menu-items 10 221 (defvar msb-max-file-menu-items 10
222 "*The maximum number of items from different directories. 222 "*The maximum number of items from different directories.
223 223
224 When the menu is of type `file by directory', this is the maximum 224 When the menu is of type `file by directory', this is the maximum
225 number of buffers that are clumped togehter from different 225 number of buffers that are clumped together from different
226 directories. 226 directories.
227 227
228 Set this to 1 if you want one menu per directory instead of clumping 228 Set this to 1 if you want one menu per directory instead of clumping
229 them together. 229 them together.
230 230
276 (defvar msb-files-by-directory nil 276 (defvar msb-files-by-directory nil
277 "*Non-nil means that files should be sorted by directory instead of 277 "*Non-nil means that files should be sorted by directory instead of
278 the groups in msb-menu-cond.") 278 the groups in msb-menu-cond.")
279 279
280 (defvar msb-menu-cond msb--very-many-menus 280 (defvar msb-menu-cond msb--very-many-menus
281 "*List of criterias for splitting the mouse buffer menu. 281 "*List of criteria for splitting the mouse buffer menu.
282 The elements in the list should be of this type: 282 The elements in the list should be of this type:
283 (CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLING-FN ITEM-SORT-FN). 283 (CONDITION MENU-SORT-KEY MENU-TITLE ITEM-HANDLING-FN ITEM-SORT-FN).
284 284
285 When making the split, the buffers are tested one by one against the 285 When making the split, the buffers are tested one by one against the
286 CONDITION, just like a lisp cond: When hitting a true condition, the 286 CONDITION, just like a lisp cond: When hitting a true condition, the
287 other criterias are *not* tested and the buffer name will appear in 287 other criteria are *not* tested and the buffer name will appear in
288 the menu with the menu-title corresponding to the true condition. 288 the menu with the menu-title corresponding to the true condition.
289 289
290 If the condition returns the symbol `multi', then the buffer will be 290 If the condition returns the symbol `multi', then the buffer will be
291 added to this menu *and* tested for other menus too. If it returns 291 added to this menu *and* tested for other menus too. If it returns
292 `no-multi', then the buffer will only be added if it hasn't been added 292 `no-multi', then the buffer will only be added if it hasn't been added
437 "Return t if optional BUFFER is an \"invisible\" buffer. 437 "Return t if optional BUFFER is an \"invisible\" buffer.
438 If the argument is left out or nil, then the current buffer is considered." 438 If the argument is left out or nil, then the current buffer is considered."
439 (and (> (length (buffer-name buffer)) 0) 439 (and (> (length (buffer-name buffer)) 0)
440 (eq ?\ (aref (buffer-name buffer) 0)))) 440 (eq ?\ (aref (buffer-name buffer) 0))))
441 441
442 ;; Strip one hierarcy level from the end of PATH. 442 ;; Strip one hierarchy level from the end of PATH.
443 (defun msb--strip-path (path) 443 (defun msb--strip-path (path)
444 (save-match-data 444 (save-match-data
445 (if (string-match "\\(.+\\)/[^/]+$" path) 445 (if (string-match "\\(.+\\)/[^/]+$" path)
446 (substring path (match-beginning 1) (match-end 1)) 446 (substring path (match-beginning 1) (match-end 1))
447 "/"))) 447 "/")))
838 (posWind (posn-window (event-start event)))) 838 (posWind (posn-window (event-start event))))
839 ;; adjust position 839 ;; adjust position
840 (setq posX (- posX (funcall msb-horizontal-shift-function)) 840 (setq posX (- posX (funcall msb-horizontal-shift-function))
841 position (list (list posX posY) posWind)))) 841 position (list (list posX posY) posWind))))
842 ;; This `sit-for' magically makes the menu stay up if the mouse 842 ;; This `sit-for' magically makes the menu stay up if the mouse
843 ;; button is released withing 0.1 second. 843 ;; button is released within 0.1 second.
844 (sit-for 0 100) 844 (sit-for 0 100)
845 ;; Popup the menu 845 ;; Popup the menu
846 (setq choice (x-popup-menu position msb--last-buffer-menu)) 846 (setq choice (x-popup-menu position msb--last-buffer-menu))
847 (cond 847 (cond
848 ((eq (car choice) 'toggle) 848 ((eq (car choice) 'toggle)