Re-worded skippable-bufers section.
This commit is contained in:
parent
e56a986046
commit
c6a99e30d9
10
init.el
10
init.el
|
@ -1,5 +1,5 @@
|
|||
;;; init.el --- tastytea's Emacs init file.
|
||||
;; Time-stamp: <2019-07-13T19:28:42+00:00>
|
||||
;; Time-stamp: <2019-07-14T22:25:59+00:00>
|
||||
|
||||
;;; Commentary:
|
||||
;; I am using this file with Emacs 26, but most of it will probably work with
|
||||
|
@ -137,17 +137,17 @@
|
|||
(defvar my/never-skippable-buffers '("^\\*scratch\\*$")
|
||||
"Buffer names never 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
|
||||
"Returns nil if buffer-name matches expression in `my/skippable-buffers'."
|
||||
(catch 'return
|
||||
;; Return t if buffer-name is on never-skippable list.
|
||||
(dolist (expression my/never-skippable-buffers)
|
||||
(if (string-match expression (buffer-name buffer))
|
||||
(throw 'my-catch t)
|
||||
(throw 'return t)
|
||||
))
|
||||
;; Return nil if buffer-name is on skippable list.
|
||||
(dolist (expression my/skippable-buffers)
|
||||
(if (string-match expression (buffer-name buffer))
|
||||
(throw 'my-catch nil)
|
||||
(throw 'return nil)
|
||||
))
|
||||
t))
|
||||
(set-frame-parameter nil 'buffer-predicate 'my/buffer-predicate)
|
||||
|
|
Loading…
Reference in New Issue
Block a user