diff options
| author | Juanma Barranquero | 2006-02-15 11:10:56 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2006-02-15 11:10:56 +0000 |
| commit | 310a26be6284648d501764efe921fdad606b991d (patch) | |
| tree | ed52c0645cdefcc34b63f41afddb6ebfbbf60886 | |
| parent | d8d3d48ce84db1041ac52084b63b4e021589b690 (diff) | |
| download | emacs-310a26be6284648d501764efe921fdad606b991d.tar.gz emacs-310a26be6284648d501764efe921fdad606b991d.zip | |
(bs-mode): Use `buffer-disable-undo'.
(bs--get-file-name): Simplify.
(bs-show-in-buffer): Mark the buffer as not modified.
| -rw-r--r-- | lisp/bs.el | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lisp/bs.el b/lisp/bs.el index a1dfad6ac7a..f095a98dc00 100644 --- a/lisp/bs.el +++ b/lisp/bs.el | |||
| @@ -652,6 +652,7 @@ to show always. | |||
| 652 | (use-local-map bs-mode-map) | 652 | (use-local-map bs-mode-map) |
| 653 | (make-local-variable 'font-lock-defaults) | 653 | (make-local-variable 'font-lock-defaults) |
| 654 | (make-local-variable 'font-lock-verbose) | 654 | (make-local-variable 'font-lock-verbose) |
| 655 | (buffer-disable-undo) | ||
| 655 | (setq major-mode 'bs-mode | 656 | (setq major-mode 'bs-mode |
| 656 | mode-name "Buffer-Selection-Menu" | 657 | mode-name "Buffer-Selection-Menu" |
| 657 | buffer-read-only t | 658 | buffer-read-only t |
| @@ -1164,7 +1165,8 @@ and move point to current buffer." | |||
| 1164 | (bs--set-window-height) | 1165 | (bs--set-window-height) |
| 1165 | (bs--goto-current-buffer) | 1166 | (bs--goto-current-buffer) |
| 1166 | (font-lock-fontify-buffer) | 1167 | (font-lock-fontify-buffer) |
| 1167 | (bs-apply-sort-faces))) | 1168 | (bs-apply-sort-faces) |
| 1169 | (set-buffer-modified-p nil))) | ||
| 1168 | 1170 | ||
| 1169 | (defun bs-next-buffer (&optional buffer-list sorting-p) | 1171 | (defun bs-next-buffer (&optional buffer-list sorting-p) |
| 1170 | "Return next buffer and buffer list for buffer cycling in BUFFER-LIST. | 1172 | "Return next buffer and buffer list for buffer cycling in BUFFER-LIST. |
| @@ -1338,16 +1340,11 @@ If current mode is `dired-mode' or `shell-mode' it returns the | |||
| 1338 | default directory. | 1340 | default directory. |
| 1339 | START-BUFFER is the buffer where we started buffer selection. | 1341 | START-BUFFER is the buffer where we started buffer selection. |
| 1340 | ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." | 1342 | ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." |
| 1341 | (let ((string (copy-sequence (if (member major-mode | 1343 | (propertize (if (member major-mode '(shell-mode dired-mode)) |
| 1342 | '(shell-mode dired-mode)) | 1344 | default-directory |
| 1343 | default-directory | 1345 | (or buffer-file-name "")) |
| 1344 | (or buffer-file-name ""))))) | 1346 | 'mouse-face 'highlight |
| 1345 | (add-text-properties | 1347 | 'help-echo "mouse-2: select this buffer, mouse-3: select in other frame")) |
| 1346 | 0 (length string) | ||
| 1347 | '(mouse-face highlight | ||
| 1348 | help-echo "mouse-2: select this buffer, mouse-3: select in other frame") | ||
| 1349 | string) | ||
| 1350 | string)) | ||
| 1351 | 1348 | ||
| 1352 | (defun bs--insert-one-entry (buffer) | 1349 | (defun bs--insert-one-entry (buffer) |
| 1353 | "Generate one entry for buffer BUFFER in Buffer Selection Menu. | 1350 | "Generate one entry for buffer BUFFER in Buffer Selection Menu. |