Minor refactors & tweaks across the board

This commit is contained in:
Henrik Lissner 2019-08-06 14:50:42 -04:00
parent 62aea0a73a
commit 3423974234
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 9 additions and 6 deletions

View file

@ -79,8 +79,8 @@ Returns nil if not in a project."
"Return the name of the current project.
Returns '-' if not in a valid project."
(if-let* ((project-root (or (doom-project-root dir)
(if dir (expand-file-name dir)))))
(if-let (project-root (or (doom-project-root dir)
(if dir (expand-file-name dir))))
(funcall projectile-project-name-function project-root)
"-"))

View file

@ -224,7 +224,10 @@ Respects `require-final-newline'."
(defvar editorconfig-lisp-use-default-indent)
;;;###autoload
(defun doom/set-indent-width (width)
"Change the indentation size to WIDTH of the current buffer."
"Change the indentation size to WIDTH of the current buffer.
The effectiveness of this command is significantly improved if you have
editorconfig or dtrt-indent installed."
(interactive
(list (if (integerp current-prefix-arg)
current-prefix-arg

View file

@ -399,8 +399,7 @@ If RETURN-P, return the message as a string instead of displaying it."
in interactive sessions, nil otherwise (but logs a warning)."
(condition-case e
(let (command-switch-alist)
(load (if noninteractive file (file-name-sans-extension file))
'noerror 'nomessage))
(load (substring file 0 -3) 'noerror 'nomessage))
((debug error)
(if noninteractive
(message "Autoload file warning: %s -> %s" (car e) (error-message-string e))

View file

@ -56,6 +56,7 @@ called.")
"Use the correct Python executables for Flycheck."
(let ((executable python-shell-interpreter))
(save-excursion
(goto-char (point-min))
(save-match-data
(when (or (looking-at "#!/usr/bin/env \\(python[^ \n]+\\)")
(looking-at "#!\\([^ \n]+/python[^ \n]+\\)"))

View file

@ -8,7 +8,7 @@
"TODO")
(use-package! direnv
:after-call (after-find-file dired-initial-position-hook)
:after-call after-find-file dired-initial-position-hook
:config
(add-hook! 'direnv-mode-hook
(defun +direnv-init-h ()