]> code.delx.au - gnu-emacs/blobdiff - lisp/bs.el
(dired-do-create-files): On DOS/Windows, allow to
[gnu-emacs] / lisp / bs.el
index c15f3c333ca92bf6de6abf5a2a07e40d4f64152c..20fe02c363d492d634d53373e64c2cab9819eb50 100644 (file)
 
 (defgroup bs nil
   "Buffer Selection: Maintaining buffers by buffer menu."
+  :version "21.1"
   :group 'convenience)
 
 (defgroup bs-appearence nil
@@ -962,15 +963,14 @@ Default is `bs--current-sort-function'."
          bs--current-sort-function)))
     (save-excursion
       (goto-char (point-min))
-      (if (and window-system
-        (nth 2 sort-description)
-        (search-forward-regexp (nth 2 sort-description) nil t))
-   (let ((inhibit-read-only t))
-     (put-text-property (match-beginning 0)
-          (match-end 0)
-          'face
-          (or (nth 3 sort-description)
-       'region)))))))
+      (if (and (nth 2 sort-description)
+              (search-forward-regexp (nth 2 sort-description) nil t))
+         (let ((inhibit-read-only t))
+           (put-text-property (match-beginning 0)
+                              (match-end 0)
+                              'face
+                              (or (nth 3 sort-description)
+                                  'region)))))))
 
 (defun bs-toggle-show-all ()
   "Toggle show all buffers / show buffers with current configuration."
@@ -1357,7 +1357,7 @@ ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu."
 (defun bs--get-file-name (start-buffer all-buffers)
   "Return string for column 'File' in Buffer Selection Menu.
 This is the variable `buffer-file-name' of current buffer.
-If current mode is `dired-mode' or shell-mode it returns the
+If current mode is `dired-mode' or `shell-mode' it returns the
 default directory.
 START-BUFFER is the buffer where we started buffer selection.
 ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu."