# HG changeset patch # User Juanma Barranquero # Date 1140001856 0 # Node ID 526bb84288e134b3a563a3f1a9313881c2fdf557 # Parent c14fdae308ba1b666b9d1e7142d88b7ae7321bf4 (bs-mode): Use `buffer-disable-undo'. (bs--get-file-name): Simplify. (bs-show-in-buffer): Mark the buffer as not modified. diff -r c14fdae308ba -r 526bb84288e1 lisp/bs.el --- a/lisp/bs.el Wed Feb 15 09:46:01 2006 +0000 +++ b/lisp/bs.el Wed Feb 15 11:10:56 2006 +0000 @@ -652,6 +652,7 @@ (use-local-map bs-mode-map) (make-local-variable 'font-lock-defaults) (make-local-variable 'font-lock-verbose) + (buffer-disable-undo) (setq major-mode 'bs-mode mode-name "Buffer-Selection-Menu" buffer-read-only t @@ -1164,7 +1165,8 @@ (bs--set-window-height) (bs--goto-current-buffer) (font-lock-fontify-buffer) - (bs-apply-sort-faces))) + (bs-apply-sort-faces) + (set-buffer-modified-p nil))) (defun bs-next-buffer (&optional buffer-list sorting-p) "Return next buffer and buffer list for buffer cycling in BUFFER-LIST. @@ -1338,16 +1340,11 @@ default directory. START-BUFFER is the buffer where we started buffer selection. ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." - (let ((string (copy-sequence (if (member major-mode - '(shell-mode dired-mode)) - default-directory - (or buffer-file-name ""))))) - (add-text-properties - 0 (length string) - '(mouse-face highlight - help-echo "mouse-2: select this buffer, mouse-3: select in other frame") - string) - string)) + (propertize (if (member major-mode '(shell-mode dired-mode)) + default-directory + (or buffer-file-name "")) + 'mouse-face 'highlight + 'help-echo "mouse-2: select this buffer, mouse-3: select in other frame")) (defun bs--insert-one-entry (buffer) "Generate one entry for buffer BUFFER in Buffer Selection Menu.