diff --git a/README.md b/README.md index 922cbc2..147ee5e 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ non-platform specific configuration files. | Mac OS X | Carbon Emacs | `carbon-emacs-` | carbon-emacs-applescript.el | | | Cocoa Emacs | `cocoa-emacs-` | cocoa-emacs-plist.el | | GNU/Linux | | `linux-` | linux-commands.el | +| *BSD | | `bsd-` | bsd-commands.el | | All | Non-window system | `nw-` | nw-key.el | ### Byte-compilation diff --git a/init-loader.el b/init-loader.el index 2e51aae..0fd1776 100644 --- a/init-loader.el +++ b/init-loader.el @@ -61,6 +61,8 @@ ;; ------------------------------------------------------------------------ ;; GNU/Linux linux- linux-commands.el ;; ------------------------------------------------------------------------ +;; *BSD bsd- bsd-commands.el +;; ------------------------------------------------------------------------ ;; All Non-window system nw- nw-key.el ;; ;; If `init-loader-byte-compile' is non-nil, each configuration file @@ -133,6 +135,10 @@ example, 00_foo.el, 01_bar.el ... 99_keybinds.el." "Regular expression of GNU/Linux specific configuration file names." :type 'regexp) +(defcustom init-loader-bsd-regexp "\\`bsd-" + "Regular expression of *BSD specific configuration file names." + :type 'regexp) + ;;;###autoload (defun* init-loader-load (&optional (init-dir init-loader-directory)) "Load configuration files in INIT-DIR." @@ -163,6 +169,10 @@ example, 00_foo.el, 01_bar.el ... 99_keybinds.el." (when (eq system-type 'gnu/linux) (init-loader-re-load init-loader-linux-regexp init-dir)) + ;; *BSD + (when (eq system-type 'berkeley-unix) + (init-loader-re-load init-loader-bsd-regexp init-dir)) + ;; no-window (when (not window-system) (init-loader-re-load init-loader-nw-regexp init-dir)) diff --git a/test-init-loader.el b/test-init-loader.el index 3cabbd0..916a973 100644 --- a/test-init-loader.el +++ b/test-init-loader.el @@ -47,7 +47,9 @@ "meadow-shell.el" "meadow-w32-symlinks.el" "linux-fonts.el" - "linux-commands.el")) + "linux-commands.el" + "bsd-config.el" + "bsd-migemo.el")) ;; TODO flet is obsoleted from Emacs 24.3 @@ -78,6 +80,10 @@ (expected '("linux-commands.el" "linux-fonts.el"))) (should (equal got expected))) + (let ((got (init-loader--re-load-files init-loader-bsd-regexp "" t)) + (expected '("bsd-config.el" "bsd-migemo.el"))) + (should (equal got expected))) + (let ((got (init-loader--re-load-files init-loader-nw-regexp "" t)) (expected '("nw-config.el"))) (should (equal got expected)))