diff --git a/bin/org-capture b/bin/org-capture index f298b5b60..72dc0ac5b 100755 --- a/bin/org-capture +++ b/bin/org-capture @@ -31,7 +31,7 @@ shift $((OPTIND-1)) [ -t 0 ] && str="$*" || str=$(cat) # Fix incompatible terminals that cause odd 'not a valid terminal' errors -[ $TERM = "alacritty" ] && export TERM=xterm-256color +[ "$TERM" = "alacritty" ] && export TERM=xterm-256color if [ $daemon ]; then emacsclient -a "" \ diff --git a/core/cli/doctor.el b/core/cli/doctor.el index c8fc1d996..4cc171a5d 100644 --- a/core/cli/doctor.el +++ b/core/cli/doctor.el @@ -55,7 +55,7 @@ in." emacs-version)) ((= emacs-major-version 26) (warn! (concat "Emacs %s detected. Doom is dropping Emacs 26.x support very soon. Consider " - "upgrading to Emacs 27.x.") + "upgrading to Emacs 27.1.") emacs-version))) (print! (start "Checking for Emacs config conflicts...")) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index 608b00ed9..aa601de1f 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -28,6 +28,8 @@ and Emacs states, and for non-evil users.") (cond (IS-MAC + ;; mac-* variables are used by the special emacs-mac build of Emacs by + ;; Yamamoto Mitsuharu, while other builds use ns-*. (setq mac-command-modifier 'super ns-command-modifier 'super mac-option-modifier 'meta diff --git a/core/core.el b/core/core.el index 3b8f895ad..77b620883 100644 --- a/core/core.el +++ b/core/core.el @@ -420,7 +420,7 @@ intervals." (let ((req (pop packages))) (unless (featurep req) (doom-log "Incrementally loading %s" req) - (condition-case e + (condition-case-unless-debug e (or (while-no-input ;; If `default-directory' is a directory that doesn't exist ;; or is unreadable, Emacs throws up file-missing errors, so diff --git a/modules/app/everywhere/config.el b/modules/app/everywhere/config.el index 4ac6e915e..50e6638e1 100644 --- a/modules/app/everywhere/config.el +++ b/modules/app/everywhere/config.el @@ -24,12 +24,12 @@ (doom-modeline-def-modeline 'emacs-everywhere '(bar modals emacs-everywhere buffer-position word-count parrot selection-info) '(input-method major-mode checker)) - (defun emacs-everywhere-set-modeline () - (doom-modeline-set-modeline 'emacs-everywhere)) - (add-hook 'emacs-everywhere-init-hooks #'emacs-everywhere-set-modeline)) - (when (featurep! :ui workspaces) - (defun emacs-everywhere-clear-persp-info () - (setq persp-emacsclient-init-frame-behaviour-override nil)) - (add-hook 'emacs-everywhere-init-hooks #'emacs-everywhere-clear-persp-info)) + (add-hook! 'emacs-everywhere-init-hooks + (defun +everywhere-set-modeline () + (doom-modeline-set-modeline 'emacs-everywhere)))) + (add-hook! 'emacs-everywhere-init-hooks + (defun +everywhere-clear-persp-info-h () + (when (bound-and-true-p persp-mode) + (setq persp-emacsclient-init-frame-behaviour-override nil)))) (after! solaire-mode (add-hook 'emacs-everywhere-init-hooks #'solaire-mode))) diff --git a/modules/completion/company/autoload.el b/modules/completion/company/autoload.el index 55f770750..f9c0fc0d4 100644 --- a/modules/completion/company/autoload.el +++ b/modules/completion/company/autoload.el @@ -81,8 +81,10 @@ Examples: ;;;###autoload (defun +company-has-completion-p () "Return non-nil if a completion candidate exists at point." - (and (company-manual-begin) - (= company-candidates-length 1))) + (when company-mode + (unless company-candidates-length + (company-manual-begin)) + (= company-candidates-length 1))) ;;;###autoload (defun +company/toggle-auto-completion () diff --git a/modules/completion/company/config.el b/modules/completion/company/config.el index ca706804e..709568ef1 100644 --- a/modules/completion/company/config.el +++ b/modules/completion/company/config.el @@ -73,6 +73,7 @@ (after! eldoc (eldoc-add-command 'company-complete-selection 'company-complete-common + 'company-capf 'company-abort))) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index ae0af11e5..9c06f3986 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -118,8 +118,8 @@ ;;; :completion (map! (:when (featurep! :completion company) - :i "C-@" (cmds! (not (minibufferp)) #'+company/complete) - :i "C-SPC" (cmds! (not (minibufferp)) #'+company/complete) + :i "C-@" (cmds! (not (minibufferp)) #'company-complete-common) + :i "C-SPC" (cmds! (not (minibufferp)) #'company-complete-common) (:after company (:map company-active-map "C-w" nil ; don't interfere with `evil-delete-backward-word' diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 2f29f5940..026cd17ef 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -100,7 +100,11 @@ (dolist (brace '("(" "{" "[")) (sp-pair brace nil :post-handlers '(("||\n[i]" "RET") ("| " "SPC")) - ;; I likely don't want a new pair if adjacent to a word or opening brace + ;; Don't autopair opening braces if before a word character or + ;; other opening brace. The rationale: it interferes with manual + ;; balancing of braces, and is odd form to have s-exps with no + ;; whitespace in between, e.g. ()()(). Insert whitespace if + ;; genuinely want to start a new form in the middle of a word. :unless '(sp-point-before-word-p sp-point-before-same-p))) ;; In lisps ( should open a new form if before another parenthesis