General minor refactor & docstring fixes

This commit is contained in:
Henrik Lissner 2018-05-14 20:55:55 +02:00
parent 67dab98859
commit bb88411cc9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
9 changed files with 27 additions and 28 deletions

View file

@ -551,7 +551,6 @@ The module is only loaded once. If RELOAD-P is non-nil, load it again."
(if (file-directory-p module-path)
`(condition-case-unless-debug ex
(let ((doom--current-module ',(cons module submodule)))
;; ,(if plist `(doom-module-set ,module ',submodule ,@plist))
(load! init ,module-path :noerror)
(load! config ,module-path :noerror))
('error
@ -566,12 +565,12 @@ The module is only loaded once. If RELOAD-P is non-nil, load it again."
"Returns t if MODULE SUBMODULE is enabled. If FLAG is provided, returns t if
MODULE SUBMODULE has FLAG enabled.
(featurep! :private default)
(featurep! :config default)
Module FLAGs are set in your config's `doom!' block, typically in
~/.emacs.d/init.el. Like so:
:private (default +flag1 -flag2)
:config (default +flag1 -flag2)
When this macro is used from inside a module, MODULE and SUBMODULE can be
omitted. eg. (featurep! +flag1)"
@ -579,7 +578,7 @@ omitted. eg. (featurep! +flag1)"
(let* ((path (or load-file-name byte-compile-current-file))
(module-pair (doom-module-from-path path)))
(unless module-pair
(error "featurep! couldn't detect what module I'm in! (in %s)" path))
(error "featurep! couldn't detect what module its in! (in %s)" path))
(setq flag module
module (car module-pair)
submodule (cdr module-pair))))

View file

@ -304,8 +304,8 @@ DEFAULT is non-nil, set the default mode-line for all buffers."
;; remove prompt if the file is opened in other clients
(defun server-remove-kill-buffer-hook ()
(remove-hook 'kill-buffer-query-functions 'server-kill-buffer-query-function))
(add-hook 'server-visit-hook 'server-remove-kill-buffer-hook)
(remove-hook 'kill-buffer-query-functions #'server-kill-buffer-query-function))
(add-hook 'server-visit-hook #'server-remove-kill-buffer-hook)
;; whitespace-mode settings
(setq whitespace-line-column nil