Ignore some buffers when using next-buffer and previous-buffer.

This commit is contained in:
tastytea 2019-07-10 23:55:08 +02:00
parent 177bb82734
commit f4dddb621a
2 changed files with 15 additions and 2 deletions

15
init.el
View File

@ -1,5 +1,5 @@
;;; init.el --- tastytea's Emacs init file.
;; Time-stamp: <2019-07-07T12:15:33+00:00>
;; Time-stamp: <2019-07-10T21:54:59+00:00>
;;; Commentary:
;; I am using this file with Emacs 26, but most of it will probably work with
@ -131,6 +131,19 @@
(savehist-mode t) ; Save minibuffer history.
(global-auto-revert-mode t) ; Auto-revert file if changed on disk.
(defvar my/skippable-buffers '("^*Messages*" "^*Help*" "^*tramp" "^*Flycheck"
"^magit[:-]" "^*Compile" "^*package")
"Buffer names ignored by `next-buffer' and `previous-buffer'.")
(defun my/buffer-predicate (buffer)
"Returns nil if `buffer'-name matches expression in `my/skippable-buffers'."
(catch 'my-catch
(dolist (expression my/skippable-buffers)
(if (string-match expression (buffer-name buffer))
(throw 'my-catch nil)
))
t))
(set-frame-parameter nil 'buffer-predicate 'my/buffer-predicate)
:hook
(prog-mode . my/set-fill-column-80)
(conf-mode . my/set-fill-column-80)

View File

@ -1,2 +1,2 @@
127.0.0.1:51313 10629
127.0.0.1:51313 3161
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh