Skip to content

Commit 44829fa

Browse files
authored
Merge pull request #22 from mahori/add-support-for-bsd
Add support for *BSD
2 parents 5d3cea1 + 380ec71 commit 44829fa

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ non-platform specific configuration files.
6161
| Mac OS X | Carbon Emacs | `carbon-emacs-` | carbon-emacs-applescript.el |
6262
| | Cocoa Emacs | `cocoa-emacs-` | cocoa-emacs-plist.el |
6363
| GNU/Linux | | `linux-` | linux-commands.el |
64+
| *BSD | | `bsd-` | bsd-commands.el |
6465
| All | Non-window system | `nw-` | nw-key.el |
6566

6667
### Byte-compilation

init-loader.el

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
;; ------------------------------------------------------------------------
6262
;; GNU/Linux linux- linux-commands.el
6363
;; ------------------------------------------------------------------------
64+
;; *BSD bsd- bsd-commands.el
65+
;; ------------------------------------------------------------------------
6466
;; All Non-window system nw- nw-key.el
6567
;;
6668
;; 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."
133135
"Regular expression of GNU/Linux specific configuration file names."
134136
:type 'regexp)
135137

138+
(defcustom init-loader-bsd-regexp "\\`bsd-"
139+
"Regular expression of *BSD specific configuration file names."
140+
:type 'regexp)
141+
136142
;;;###autoload
137143
(defun* init-loader-load (&optional (init-dir init-loader-directory))
138144
"Load configuration files in INIT-DIR."
@@ -163,6 +169,10 @@ example, 00_foo.el, 01_bar.el ... 99_keybinds.el."
163169
(when (eq system-type 'gnu/linux)
164170
(init-loader-re-load init-loader-linux-regexp init-dir))
165171

172+
;; *BSD
173+
(when (eq system-type 'berkeley-unix)
174+
(init-loader-re-load init-loader-bsd-regexp init-dir))
175+
166176
;; no-window
167177
(when (not window-system)
168178
(init-loader-re-load init-loader-nw-regexp init-dir))

test-init-loader.el

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@
4747
"meadow-shell.el"
4848
"meadow-w32-symlinks.el"
4949
"linux-fonts.el"
50-
"linux-commands.el"))
50+
"linux-commands.el"
51+
"bsd-config.el"
52+
"bsd-migemo.el"))
5153

5254
;; TODO flet is obsoleted from Emacs 24.3
5355

@@ -78,6 +80,10 @@
7880
(expected '("linux-commands.el" "linux-fonts.el")))
7981
(should (equal got expected)))
8082

83+
(let ((got (init-loader--re-load-files init-loader-bsd-regexp "" t))
84+
(expected '("bsd-config.el" "bsd-migemo.el")))
85+
(should (equal got expected)))
86+
8187
(let ((got (init-loader--re-load-files init-loader-nw-regexp "" t))
8288
(expected '("nw-config.el")))
8389
(should (equal got expected)))

0 commit comments

Comments
 (0)