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" -- "$@" :; exec $EMACS --script "$0" -- "$@"
:; exit 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")) (emacsdir (getenv "EMACSDIR"))
(user-emacs-directory (or emacsdir (expand-file-name "../" loaddir))) (user-emacs-directory
(load-prefer-newer t)) (abbreviate-file-name (or emacsdir (expand-file-name "../" loaddir)))))
(push (expand-file-name "core" user-emacs-directory) load-path) (push (expand-file-name "core" user-emacs-directory) load-path)
(require 'core) (require 'core)

View file

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

View file

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

View file

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

View file

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