General cleanup
This commit is contained in:
parent
a18e8f0104
commit
9bd8c6cc21
6 changed files with 14 additions and 33 deletions
2
Makefile
2
Makefile
|
@ -38,6 +38,6 @@ test:
|
|||
@$(EMACS) -l test/init.el -f 'doom!run-tests'
|
||||
|
||||
init.el:
|
||||
@[ -f init.el ] || $(error No init.el file, please create one or copy init.example.el)
|
||||
@[ -f init.el ] || $(error No init.el file; create one or copy init.example.el)
|
||||
|
||||
.PHONY: all test
|
||||
|
|
|
@ -3,12 +3,13 @@
|
|||
|
||||
(defvar-local doom-buffer--narrowed-origin nil)
|
||||
|
||||
;;;###autoload
|
||||
(defvar doom-fallback-buffer "*scratch*"
|
||||
"The name of the buffer to fall back to if no other buffers exist (will create
|
||||
it if it doesn't exist).")
|
||||
|
||||
(defvar doom-buffers-unreal-alist
|
||||
'("^ ?\\*.+" image-mode dired-mode reb-mode messages-buffer-mode
|
||||
(defvar doom-buffers-unreal
|
||||
'("^ ?\\*" image-mode dired-mode reb-mode messages-buffer-mode
|
||||
tabulated-list-mode comint-mode magit-mode)
|
||||
"A list of regexps or modes whose buffers are considered unreal, and will be
|
||||
ignored when using `doom:next-real-buffer' and `doom:previous-real-buffer' (or
|
||||
|
@ -125,7 +126,7 @@ See `doom-real-buffer-p' for what 'real' means."
|
|||
(catch 'goto
|
||||
(if (or (not buffers)
|
||||
(= (length buffers) 1))
|
||||
(progn (message "No other buffers in workgroup")
|
||||
(progn (message "No other buffers in workspace")
|
||||
(throw 'goto fail-buffer))
|
||||
(funcall move-func)
|
||||
(while (not (memq (current-buffer) buffers))
|
||||
|
|
|
@ -4,9 +4,6 @@
|
|||
(require 's)
|
||||
(require 'f)
|
||||
|
||||
(defvar +evil-leader)
|
||||
(defvar +evil-localleader)
|
||||
|
||||
(defvar __DIR__ nil "The directory of the currently loaded file (set by `load!')")
|
||||
(defvar __FILE__ nil "The full path of the currently loaded file (set by `load!')")
|
||||
|
||||
|
@ -50,7 +47,7 @@
|
|||
;;
|
||||
|
||||
(defmacro λ! (&rest body)
|
||||
"A shortcut for inline keybind lambdas."
|
||||
"A shortcut for inline interactive lambdas."
|
||||
(declare (doc-string 1))
|
||||
`(lambda () (interactive) ,@body))
|
||||
|
||||
|
@ -154,7 +151,6 @@ Examples:
|
|||
(put ':leader 'lisp-indent-function 'defun)
|
||||
(put ':localleader 'lisp-indent-function 'defun)
|
||||
|
||||
;;;###autoload
|
||||
(defmacro map! (&rest rest)
|
||||
"A nightmare of a key-binding macro that will use `evil-define-key*',
|
||||
`define-key', `local-set-key' and `global-set-key' depending on context and
|
||||
|
@ -293,20 +289,5 @@ Example
|
|||
(t (user-error "Invalid key %s" key))))
|
||||
(macroexp-progn (reverse forms)))))
|
||||
|
||||
(defun doom-os ()
|
||||
"Returns the OS: arch, debian, macos, general linux, cygwin or windows."
|
||||
(let ((gnu-linux-p (eq system-type 'gnu/linux)))
|
||||
(cond ((and gnu-linux-p (f-exists-p "/etc/arch-release"))
|
||||
'arch)
|
||||
((and gnu-linux-p (f-exists-p "/etc/debian_version"))
|
||||
'debian)
|
||||
(gnu-linux-p
|
||||
'linux)
|
||||
((eq system-type 'darwin)
|
||||
'macos)
|
||||
((memq system-type '(windows-nt cygwin))
|
||||
'windows)
|
||||
(t (error "Unknown OS: %s" system-type)))))
|
||||
|
||||
(provide 'core-lib)
|
||||
;;; core-lib.el ends here
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
;; I want Emacs to be nominally aware of the projects. `projectile' provides
|
||||
;; tools for digging through project files and exposing an API I can use to make
|
||||
;; other plugins/features project-aware.
|
||||
|
||||
(package! projectile :demand t
|
||||
:init
|
||||
(setq projectile-cache-file (concat doom-cache-dir "/projectile.cache")
|
||||
|
|
12
core/core.el
12
core/core.el
|
@ -9,10 +9,11 @@
|
|||
;; doom|... A hook
|
||||
;; doom*... An advising function
|
||||
;; ...! Macro, shortcut alias or defsubst
|
||||
;; @... lambda macro for keybinds
|
||||
;; @... A generator macro for keybinds
|
||||
;; +... Any of the above, but part of a module, e.g. +emacs-lisp|init-hook
|
||||
;;
|
||||
;;; Autoloaded functions are in {core,modules}/defuns/defuns-*.el
|
||||
;; Autoloaded functions are in core/autoload/*.el and modules/*/*/autoload.el or
|
||||
;; modules/*/*/autoload/*.el.
|
||||
|
||||
(when (version< emacs-version "25.1")
|
||||
(error "DOOM Emacs no longer supports Emacs <25.1! Time to upgrade!"))
|
||||
|
@ -132,15 +133,12 @@ enable multiple minor modes for the same regexp.")
|
|||
|
||||
;;; Let 'er rip
|
||||
(require 'core-lib)
|
||||
(doom-initialize-autoloads)
|
||||
(unless noninteractive
|
||||
(require 'core-ui) ; draw me like one of your French editors
|
||||
(require 'core-popups) ; taming sudden yet inevitable windows
|
||||
(require 'core-editor) ; baseline configuration for text editing
|
||||
(require 'core-projects)) ; making Emacs project-aware
|
||||
|
||||
;; We do this last to promise that core files will not use autoloaded files.
|
||||
;; If they did, those functions shouldn't be autoloaded!
|
||||
(doom-initialize-autoloads))
|
||||
(require 'core-projects))) ; making Emacs project-aware
|
||||
|
||||
(provide 'core)
|
||||
;;; core.el ends here
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
(hash (gethash project-path npm-conf))
|
||||
(package-file (expand-file-name "package.json" project-path))
|
||||
deps)
|
||||
(when-let (json (and (not hash) (f-exists? package-file)
|
||||
(ignore-errors (json-read-file package-file))))
|
||||
(-when-let (json (and (not hash) (f-exists? package-file)
|
||||
(ignore-errors (json-read-file package-file))))
|
||||
(puthash project-path json npm-conf))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue