diff --git a/core/autoload/debug.el b/core/autoload/debug.el index 96cce63d803..de730be8571 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -186,29 +186,27 @@ ready to be pasted in a bug report on github." module))) '("n/a"))) (packages - ,@(or (condition-case e - (mapcar - #'cdr (doom--collect-forms-in - (doom-path doom-private-dir "packages.el") - "package!")) - (error (format "<%S>" e))) - '("n/a"))) - ,(when-let (unpins (condition-case e - (mapcan #'identity - (mapcar - #'cdr (doom--collect-forms-in - (doom-path doom-private-dir "packages.el") - "unpin!"))) - (error (format "<%S>" e)))) - (cons 'unpin unpins)) + ,@(condition-case e + (mapcar + #'cdr (doom--collect-forms-in + (doom-path doom-private-dir "packages.el") + "package!")) + (error (format "<%S>" e)))) + (unpin + ,@(condition-case e + (mapcan #'identity + (mapcar + #'cdr (doom--collect-forms-in + (doom-path doom-private-dir "packages.el") + "unpin!"))) + (error (list (format "<%S>" e))))) (elpa - ,@(or (condition-case e - (progn - (package-initialize) - (cl-loop for (name . _) in package-alist - collect (format "%s" name))) - (error (format "<%S>" e))) - '("n/a"))))))) + ,@(condition-case e + (progn + (package-initialize) + (cl-loop for (name . _) in package-alist + collect (format "%s" name))) + (error (format "<%S>" e)))))))) ;; @@ -247,12 +245,13 @@ copies it to your clipboard, ready to be pasted into bug reports!" (delete-region beg end) (insert sexp)))))) (dolist (spec info) - (insert! "%11s %s\n" - ((car spec) - (if (listp (cdr spec)) - (mapconcat (lambda (x) (format "%s" x)) - (cdr spec) " ") - (cdr spec)))))) + (when (cdr spec) + (insert! "%11s %s\n" + ((car spec) + (if (listp (cdr spec)) + (mapconcat (lambda (x) (format "%s" x)) + (cdr spec) " ") + (cdr spec))))))) (if (not doom-interactive-p) (print! (buffer-string)) (with-current-buffer (pop-to-buffer buffer) diff --git a/core/autoload/projects.el b/core/autoload/projects.el index 622893e4f6a..726ac6593a8 100644 --- a/core/autoload/projects.el +++ b/core/autoload/projects.el @@ -1,6 +1,6 @@ ;;; core/autoload/projects.el -*- lexical-binding: t; -*- -(defvar projectile-project-root nil) +(defvar projectile-project-root) (defvar projectile-enable-caching) (defvar projectile-require-project-root) @@ -80,7 +80,8 @@ they are absolute." (defun doom-project-root (&optional dir) "Return the project root of DIR (defaults to `default-directory'). Returns nil if not in a project." - (let ((projectile-project-root (unless dir projectile-project-root)) + (let ((projectile-project-root + (unless dir (bound-and-true-p projectile-project-root))) projectile-require-project-root) (projectile-project-root dir))) diff --git a/core/core-editor.el b/core/core-editor.el index e2f4bcd8c12..7928deaef89 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -220,17 +220,18 @@ or file path may exist now." revert-without-query (list ".")) ;; `auto-revert-mode' and `global-auto-revert-mode' would, normally, abuse the - ;; heck out of inotify handles _or_ aggresively poll your buffer list every X - ;; seconds. Too many inotify handles can grind Emacs to a halt if you preform + ;; heck out of file watchers _or_ aggressively poll your buffer list every X + ;; seconds. Too many watchers can grind Emacs to a halt if you preform ;; expensive or batch processes on files outside of Emacs (e.g. their mtime ;; changes), and polling your buffer list is terribly inefficient as your - ;; buffer list grows into the tens or hundreds. + ;; buffer list grows into the hundreds. ;; - ;; So Doom uses a different strategy: we lazily auto revert buffers when the - ;; user a) saves a file, b) switches to a buffer (or its window), or c) you - ;; focus Emacs (after using another program). This way, Emacs only ever has to - ;; operate on, at minimum, a single buffer and, at maximum, X buffers, where X - ;; is the number of open windows (which is rarely, if ever, over 10). + ;; Doom does this lazily instead. i.e. All visible buffers are reverted + ;; immediately when a) a file is saved or b) Emacs is refocused (after using + ;; another app). Meanwhile, buried buffers are reverted only when they are + ;; switched to. This way, Emacs only ever has to operate on, at minimum, a + ;; single buffer and, at maximum, ~10 buffers (after all, when do you ever + ;; have more than 10 windows in any single frame?). (defun doom-auto-revert-buffer-h () "Auto revert current buffer, if necessary." (unless (or auto-revert-mode (active-minibuffer-window)) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 84fee11381f..6354dc60548 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -567,7 +567,7 @@ directives. By default, this only recognizes C directives.") :textobj "u" #'+evil:inner-url-txtobj #'+evil:outer-url-txtobj :textobj "x" #'evil-inner-xml-attr #'evil-outer-xml-attr - ;; evil-easymotion (see `+evil/easymotion') + ;; evil-easymotion (:after evil-easymotion :m "gs" evilem-map (:map evilem-map diff --git a/modules/os/macos/config.el b/modules/os/macos/config.el index df70ef5c790..6d3dc4ebfc0 100644 --- a/modules/os/macos/config.el +++ b/modules/os/macos/config.el @@ -31,9 +31,9 @@ ;; HACK On MacOS, disabling the menu bar makes MacOS treat Emacs as a ;; non-application window -- which means it doesn't automatically capture -;; focus when it is started, among other things. We enable menu-bar-lines -;; there, but we still want it disabled in terminal frames because there it -;; activates an ugly menu bar. +;; focus when it is started, among other things, so enable the menu-bar for +;; GUI frames, but keep it disabled in terminal frames because there it +;; activates an ugly, in-frame menu bar. (add-hook! '(window-setup-hook after-make-frame-functions) (defun doom-init-menu-bar-in-gui-frames-h (&optional frame) "Re-enable menu-bar-lines in GUI frames."