Mercurial > hg > xemacs-beta
diff lisp/packages/buff-menu.el @ 4:b82b59fe008d r19-15b3
Import from CVS: tag r19-15b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:56 +0200 |
parents | 376386a54a3c |
children | 27bc7f280385 |
line wrap: on
line diff
--- a/lisp/packages/buff-menu.el Mon Aug 13 08:46:35 2007 +0200 +++ b/lisp/packages/buff-menu.el Mon Aug 13 08:46:56 2007 +0200 @@ -3,6 +3,7 @@ ;; Copyright (C) 1985, 86, 87, 93, 94, 95 Free Software Foundation, Inc. ;; Maintainer: FSF +;; Keywords: extensions ;; This file is part of XEmacs. @@ -18,9 +19,10 @@ ;; You should have received a copy of the GNU General Public License ;; along with XEmacs; see the file COPYING. If not, write to the Free -;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +;; 02111-1307, USA. -;;; Synched up with: FSF 19.30 except as noted. +;;; Synched up with: FSF 19.34 except as noted. ;;; Commentary: @@ -68,7 +70,7 @@ () (setq Buffer-menu-mode-map (make-keymap)) (suppress-keymap Buffer-menu-mode-map t) - (set-keymap-name Buffer-menu-mode-map 'Buffer-menu-mode-map) + (set-keymap-name Buffer-menu-mode-map 'Buffer-menu-mode-map) ; XEmacs (define-key Buffer-menu-mode-map "q" 'Buffer-menu-quit) (define-key Buffer-menu-mode-map "v" 'Buffer-menu-select) (define-key Buffer-menu-mode-map "2" 'Buffer-menu-2-window) @@ -94,8 +96,8 @@ (define-key Buffer-menu-mode-map "t" 'Buffer-menu-visit-tags-table) (define-key Buffer-menu-mode-map "%" 'Buffer-menu-toggle-read-only) (define-key Buffer-menu-mode-map "g" 'revert-buffer) - (define-key Buffer-menu-mode-map 'button2 'Buffer-menu-mouse-select) - (define-key Buffer-menu-mode-map 'button3 'Buffer-menu-popup-menu) + (define-key Buffer-menu-mode-map [mouse-2] 'Buffer-menu-mouse-select) + (define-key Buffer-menu-mode-map [mouse-3] 'Buffer-menu-popup-menu) ) ;; Buffer Menu mode is suitable only for specially formatted data. @@ -135,8 +137,8 @@ (setq revert-buffer-function 'Buffer-menu-revert-function) (setq truncate-lines t) (setq buffer-read-only t) - (make-local-variable 'mouse-track-click-hook) - (add-hook 'mouse-track-click-hook 'Buffer-menu-maybe-mouse-select) + (make-local-variable 'mouse-track-click-hook) ; XEmacs + (add-hook 'mouse-track-click-hook 'Buffer-menu-maybe-mouse-select) ; XEmacs (run-hooks 'buffer-menu-mode-hook)) (defun Buffer-menu-revert-function (ignore1 ignore2) @@ -252,7 +254,7 @@ (forward-line 1))) (defun Buffer-menu-save () - "Mark buffer on this line to be saved by \\[Buffer-menu-execute] command." + "Mark buffer on this line to be saved by \\<Buffer-menu-mode-map>\\[Buffer-menu-execute] command." (interactive) (beginning-of-line) (if (looking-at " [-M]") ;header lines @@ -365,6 +367,7 @@ (switch-to-buffer (Buffer-menu-buffer t)) (bury-buffer (other-buffer)) (delete-other-windows) + ;; XEmacs: ;; This is to get w->force_start set to nil. Don't ask me, I only work here. (set-window-buffer (selected-window) (current-buffer))) @@ -373,16 +376,17 @@ (interactive "e") (let (buffer) (save-excursion - (set-buffer (event-buffer event)) + (set-buffer (event-buffer event)) ; XEmacs (save-excursion - (goto-char (event-point event)) + (goto-char (event-point event)) ; XEmacs (setq buffer (Buffer-menu-buffer t)))) - (select-window (event-window event)) + (select-window (event-window event)) ; XEmacs (if (and (window-dedicated-p (selected-window)) (eq (selected-window) (frame-root-window))) (switch-to-buffer-other-frame buffer) (switch-to-buffer buffer)))) +;; XEmacs (defun Buffer-menu-maybe-mouse-select (event &optional click-count) (interactive "e") (and (>= click-count 2) @@ -442,6 +446,7 @@ (delete-char 1) (insert char)))))) +;; XEmacs (defvar Buffer-menu-popup-menu '("Buffer Commands" ["Select Buffer" Buffer-menu-select t] @@ -456,6 +461,7 @@ ["Delete/Save Marked Buffers" Buffer-menu-execute t] )) +;; XEmacs (defun Buffer-menu-popup-menu (event) (interactive "e") (mouse-set-point event) @@ -471,15 +477,18 @@ (error "no buffer on this line")))) +;; XEmacs (defvar list-buffers-header-line (purecopy (concat " MR Buffer Size Mode File\n" " -- ------ ---- ---- ----\n"))) +;; XEmacs (defvar list-buffers-identification 'default-list-buffers-identification "String used to identify this buffer, or a function of one argument to generate such a string. This variable is always buffer-local.") (make-variable-buffer-local 'list-buffers-identification) +;; XEmacs (defvar list-buffers-directory) (make-variable-buffer-local 'list-buffers-directory) @@ -581,6 +590,7 @@ (Buffer-menu-mode) (if (not (bufferp current)) (goto-char current))))) +;(define-key ctl-x-map "\C-b" 'list-buffers) (defun list-buffers (&optional files-only) "Display a list of names of existing buffers. @@ -590,7 +600,7 @@ The M column contains a * for buffers that are modified. The R column contains a % for buffers that are read-only." - (interactive (list (if current-prefix-arg t nil))) + (interactive (list (if current-prefix-arg t nil))) ; XEmacs (display-buffer (list-buffers-noselect files-only))) ;; #### not synched