General, minor refactors

This commit is contained in:
Henrik Lissner 2019-12-30 18:23:56 -05:00
parent 3271cd3a54
commit 960d756b47
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 16 additions and 15 deletions

View file

@ -9,10 +9,11 @@
:; exec $EMACS --script "$0" -- "$@"
:; exit 0
(let* ((loaddir (file-name-directory (file-truename load-file-name)))
(let* ((load-prefer-newer t)
(loaddir (file-name-directory (file-truename load-file-name)))
(emacsdir (getenv "EMACSDIR"))
(user-emacs-directory (or emacsdir (expand-file-name "../" loaddir)))
(load-prefer-newer t))
(user-emacs-directory
(abbreviate-file-name (or emacsdir (expand-file-name "../" loaddir)))))
(push (expand-file-name "core" user-emacs-directory) load-path)
(require 'core)

View file

@ -212,8 +212,9 @@ into faces or ANSI codes depending on the type of sesssion we're in."
;;;###autoload
(defmacro print! (message &rest args)
"Uses `message' in interactive sessions and `princ' otherwise (prints to
standard out).
"Prints MESSAGE, formatted with ARGS, to stdout.
Always returns non-nil.
Can be colored using (color ...) blocks:

View file

@ -131,8 +131,7 @@
(setq doom-autosave-session nil)
(doom/quicksave-session)
(restart-emacs
(delq
nil (append (if debug (list "--debug-init"))
(append (if debug (list "--debug-init"))
(when (boundp 'chemacs-current-emacs-profile)
(list "--with-profile" chemacs-current-emacs-profile))
(list "--restore")))))
(list "--restore"))))

View file

@ -69,9 +69,9 @@
:unless (featurep! +lsp)
:hook (rustic-mode . racer-mode)
:init
;; Fix #2132: `racer' depends on `rust-mode', which tries to modify
;; `auto-mode-alist'. We make extra sure that doesn't stick, especially when a
;; buffer is reverted, as it is after rustfmt is done wiht it.
;; HACK Fix #2132: `racer' depends on `rust-mode', which tries to modify
;; `auto-mode-alist'. We make extra sure that doesn't stick, especially
;; when a buffer is reverted, as it is after rustfmt is done wiht it.
(after! rust-mode
(setq auto-mode-alist (delete '("\\.rs\\'" . rust-mode) auto-mode-alist)))
:config

View file

@ -37,8 +37,8 @@ to this commmand."
(let ((orig-buffer (current-buffer)))
(quit-window)
(when (and (eq orig-buffer (current-buffer))
(+popup-window-p))
(+popup/close))))
(+popup-buffer-p))
(+popup/close nil 'force))))
(global-set-key [remap quit-window] #'+popup/quit-window)