X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/eada086196ccb005ded188ac2e58d41f3682a125..1d8bea62832ea227d154995d2d52bd2093d4d722:/lisp/bs.el diff --git a/lisp/bs.el b/lisp/bs.el index 09aefee416..f0f8b1dc35 100644 --- a/lisp/bs.el +++ b/lisp/bs.el @@ -1,6 +1,6 @@ ;;; bs.el --- menu for selecting and displaying buffers -*- lexical-binding: t -*- -;; Copyright (C) 1998-2012 Free Software Foundation, Inc. +;; Copyright (C) 1998-2014 Free Software Foundation, Inc. ;; Author: Olaf Sylvester ;; Maintainer: Olaf Sylvester ;; Keywords: convenience @@ -336,15 +336,13 @@ Used internally, only.") ;; Internal globals ;; ---------------------------------------------------------------------- -(defvar bs-buffer-show-mark nil +(defvar-local bs-buffer-show-mark nil "Flag for the current mode for showing this buffer. A value of nil means buffer will be shown depending on the current configuration. A value of `never' means to never show the buffer. A value of `always' means to show buffer regardless of the configuration.") -(make-variable-buffer-local 'bs-buffer-show-mark) - ;; Make face named region (for XEmacs) (unless (facep 'region) (make-face 'region) @@ -648,17 +646,14 @@ available Buffer Selection Menu configuration. to show always. \\[bs-visit-tags-table] -- call `visit-tags-table' on current line's buffer. \\[bs-help] -- display this help text." - (make-local-variable 'font-lock-defaults) - (make-local-variable 'font-lock-verbose) - (make-local-variable 'font-lock-global-modes) (buffer-disable-undo) (setq buffer-read-only t truncate-lines t - show-trailing-whitespace nil - font-lock-global-modes '(not bs-mode) - font-lock-defaults '(bs-mode-font-lock-keywords t) - font-lock-verbose nil) - (set (make-local-variable 'revert-buffer-function) 'bs-refresh) + show-trailing-whitespace nil) + (setq-local font-lock-defaults '(bs-mode-font-lock-keywords t)) + (setq-local font-lock-verbose nil) + (setq-local font-lock-global-modes '(not bs-mode)) + (setq-local revert-buffer-function 'bs-refresh) (add-hook 'window-size-change-functions 'bs--track-window-changes) (add-hook 'kill-buffer-hook 'bs--remove-hooks nil t) (add-hook 'change-major-mode-hook 'bs--remove-hooks nil t)) @@ -962,7 +957,7 @@ Default is `bs--current-sort-function'." Uses function `toggle-read-only'." (interactive) (with-current-buffer (bs--current-buffer) - (call-interactively 'toggle-read-only)) + (read-only-mode 'toggle)) (bs--update-current-line)) (defun bs-clear-modified () @@ -1411,7 +1406,7 @@ for buffer selection." (select-window active-window) (bs--restore-window-config) (setq bs--window-config-coming-from (current-window-configuration)) - (when (> (window-height (selected-window)) 7) + (when (> (window-height) 7) ;; Errors would mess with the window configuration (bug#10882). (ignore-errors (select-window (split-window-below))))) (bs-show-in-buffer liste)