Fix typo.
[bpt/emacs.git] / lisp / bs.el
index f17609f..357852d 100644 (file)
@@ -187,7 +187,7 @@ return a string representing the column's value."
       (setq ele (cdr ele)))
     (concat res "$\\)")))
 
-;;; Font-Lock-Settings
+;; Font-Lock-Settings
 (defvar bs-mode-font-lock-keywords
   (list ;; header in font-lock-type-face
    (list (bs--make-header-match-string)
@@ -924,8 +924,9 @@ WHAT is a value of nil, `never', or `always'."
   (interactive)
   (let ((current (bs--current-buffer))
        (inhibit-read-only t))
+    (unless (kill-buffer current)
+      (error "Buffer was not deleted"))
     (setq bs-current-list (delq current bs-current-list))
-    (kill-buffer current)
     (beginning-of-line)
     (delete-region (point) (save-excursion
                             (end-of-line)
@@ -1339,7 +1340,12 @@ for mouse highlighting.
 START-BUFFER is the buffer where we started buffer selection.
 ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu."
   (let ((name (copy-sequence (buffer-name))))
-    (put-text-property 0 (length name) 'mouse-face 'highlight name)
+    (add-text-properties
+     0 (length name)
+     '(mouse-face highlight
+       help-echo
+       "mouse-2: select this buffer, mouse-3: select in other frame")
+     name)
     (if (< (length name) bs--name-entry-length)
        (concat name
                (make-string (- bs--name-entry-length (length name)) ? ))
@@ -1362,7 +1368,11 @@ ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu."
                                           '(shell-mode dired-mode))
                                   default-directory
                                 (or buffer-file-name "")))))
-    (put-text-property 0 (length string) 'mouse-face 'highlight string)
+    (add-text-properties
+     0 (length string)
+     '(mouse-face highlight
+       help-echo "mouse-2: select this buffer, mouse-3: select in other frame")
+     string)
     string))
 
 (defun bs--insert-one-entry (buffer)
@@ -1502,7 +1512,7 @@ name of buffer configuration."
   (setq bs--marked-buffers nil)
   (bs--show-with-configuration (bs--configuration-name-for-prefix-arg arg)))
 
-;;; Now provide feature bs
+;; Now provide feature bs
 (provide 'bs)
 
 ;;; bs.el ends here