From 7f175ab6d9a0648eac5c8b404f3005eeda829a4d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 29 Aug 2024 15:19:18 -0400 Subject: [PATCH 1/6] fix(cli): inconsistent system hash between sessions sxhash doesn't guarantee hashes are consistent across Emacs sessions, so use md5 instead. Also simplifies what's getting hashed; `system-configuration` is a sufficient substitute for both `system-type` and what I wanted to glean from changes in `system-configuration-features`. Amend: 80e9263b85c2 Close: #8030 Ref: #8024 Co-authored-by: yaaama --- lisp/cli/sync.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/cli/sync.el b/lisp/cli/sync.el index 29be2b278..02f68a87f 100644 --- a/lisp/cli/sync.el +++ b/lisp/cli/sync.el @@ -79,7 +79,7 @@ OPTIONS: (when (and old-version (not (equal old-version emacs-version))) (print! (warn "Emacs version has changed since last sync (from %s to %s)") old-version emacs-version) (setq to-rebuild t)) - (when (and (integerp hash) + (when (and (stringp hash) (not (equal hash (doom-sync--system-hash)))) (print! (warn "Your system has changed since last sync")) (setq to-rebuild t)) @@ -113,7 +113,8 @@ OPTIONS: ;;; Helpers (defun doom-sync--system-hash () - (sxhash (list doom-local-dir system-type system-configuration-features))) + (secure-hash + 'md5 (mapconcat #'identity (list doom-local-dir system-configuration)))) (defun doom-sync--abort-warning-h () (print! (warn "Script was abruptly aborted, leaving Doom in an incomplete state!")) From bf9e619533eff0cfd44a3d23c0a2e25ea9bee23d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 30 Aug 2024 01:02:33 -0400 Subject: [PATCH 2/6] refactor: remove redundant projectile-track-known-projects hook With the `doom-switch-buffer-hook` hook in 83fedf1, this hook isn't needed anymore. Amend: 83fedf1fffcf --- lisp/doom-projects.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/lisp/doom-projects.el b/lisp/doom-projects.el index 51736a196..a9aa8edd6 100644 --- a/lisp/doom-projects.el +++ b/lisp/doom-projects.el @@ -121,9 +121,6 @@ Is nil if no executable is found in your PATH during startup.") (put 'projectile-ripgrep 'disabled "Use +default/search-project instead") (put 'projectile-grep 'disabled "Use +default/search-project instead") - ;; Treat current directory in dired as a "file in a project" and track it - (add-hook 'dired-before-readin-hook #'projectile-track-known-projects-find-file-hook) - ;; Accidentally indexing big directories like $HOME or / will massively bloat ;; projectile's cache (into the hundreds of MBs). This purges those entries ;; when exiting Emacs to prevent slowdowns/freezing when cache files are From 6671adc6879d3a2b77d49b288d8272963f9b1095 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 30 Aug 2024 01:56:03 -0400 Subject: [PATCH 3/6] refactor!: move helpful from :core to :lang emacs-lisp BREAKING CHANGE: This moves helpful.el out of core into :lang emacs-lisp. Since most (all) people have this module enabled, this shouldn't make a difference for most people, but if you're one of the few that don't have :lang emacs-lisp enabled, Doom will revert to using Emacs' built-in help.el and describe-* commands. Others can also disable helpful with (package! helpful :disable t) if they prefer Emacs' built-in help system, which wasn't possible before, because it was a core package. This was done as part of an ongoing effort to slim down Doom's core in preparation for v3. --- lisp/doom-editor.el | 55 ------------------ lisp/lib/help.el | 56 ++++++++++++------ lisp/packages.el | 1 - modules/completion/helm/config.el | 6 +- modules/completion/ivy/config.el | 5 -- modules/config/default/+emacs-bindings.el | 3 - modules/config/default/+evil-bindings.el | 2 - modules/editor/evil/autoload/ex.el | 8 +-- modules/editor/evil/config.el | 12 ---- modules/lang/emacs-lisp/autoload.el | 10 +++- modules/lang/emacs-lisp/config.el | 71 +++++++++++++++++++++++ modules/lang/emacs-lisp/packages.el | 1 + modules/lang/org/config.el | 13 ++--- 13 files changed, 127 insertions(+), 116 deletions(-) diff --git a/lisp/doom-editor.el b/lisp/doom-editor.el index 7c2af2a71..b1ee5eb56 100644 --- a/lisp/doom-editor.el +++ b/lisp/doom-editor.el @@ -545,61 +545,6 @@ files, so this replace calls to `pp' with the much faster `prin1'." (message ""))))) ; warn silently (funcall fn arg))))) -(use-package! helpful - ;; a better *help* buffer - :commands helpful--read-symbol - :hook (helpful-mode . visual-line-mode) - :init - ;; Make `apropos' et co search more extensively. They're more useful this way. - (setq apropos-do-all t) - - (global-set-key [remap describe-function] #'helpful-callable) - (global-set-key [remap describe-command] #'helpful-command) - (global-set-key [remap describe-variable] #'helpful-variable) - (global-set-key [remap describe-key] #'helpful-key) - (global-set-key [remap describe-symbol] #'helpful-symbol) - - (defun doom-use-helpful-a (fn &rest args) - "Force FN to use helpful instead of the old describe-* commands." - (letf! ((#'describe-function #'helpful-function) - (#'describe-variable #'helpful-variable)) - (apply fn args))) - - (after! apropos - ;; patch apropos buttons to call helpful instead of help - (dolist (fun-bt '(apropos-function apropos-macro apropos-command)) - (button-type-put - fun-bt 'action - (lambda (button) - (helpful-callable (button-get button 'apropos-symbol))))) - (dolist (var-bt '(apropos-variable apropos-user-option)) - (button-type-put - var-bt 'action - (lambda (button) - (helpful-variable (button-get button 'apropos-symbol)))))) - - ;; DEPRECATED: Remove when support for 29 is dropped. - (when (= emacs-major-version 29) - (defadvice! doom--find-function-search-for-symbol-save-excursion-a (fn &rest args) - "Suppress cursor movement by `find-function-search-for-symbol'. - -Addresses an unwanted side-effect in `find-function-search-for-symbol' on Emacs -29 where the cursor is moved to a variable's definition if it's defined in the -current buffer." - :around #'find-function-search-for-symbol - (let (buf pos) - (letf! (defun find-library-name (library) - (let ((filename (funcall find-library-name library))) - (with-current-buffer (find-file-noselect filename) - (setq buf (current-buffer) - pos (point))) - filename)) - (prog1 (apply fn args) - (when (buffer-live-p buf) - (with-current-buffer buf (goto-char pos)))))))) - :config - (setq helpful-set-variable-function #'setq!)) - (use-package! smartparens ;; Auto-close delimiters and blocks as you type. It's more powerful than that, diff --git a/lisp/lib/help.el b/lisp/lib/help.el index c514577bc..f94504fd7 100644 --- a/lisp/lib/help.el +++ b/lisp/lib/help.el @@ -97,10 +97,10 @@ selection of all minor-modes, active or not." (let ((symbol (cond ((stringp mode) (intern mode)) ((symbolp mode) mode) - ((error "Expected a symbol/string, got a %s" (type-of mode)))))) - (if (fboundp symbol) - (helpful-function symbol) - (helpful-variable symbol)))) + ((error "Expected a symbol/string, got a %s" (type-of mode))))) + (fn (if (fboundp symbol) #'describe-function #'describe-variable))) + (funcall (or (command-remapping fn) fn) + symbol))) ;; @@ -414,26 +414,44 @@ current file is in, or d) the module associated with the current major mode (see (doom-project-browse (file-name-directory path))) ((user-error "Aborted module lookup"))))) +(defun doom--help-variable-p (sym) + "TODO" + (or (get sym 'variable-documentation) + (and (boundp sym) + (not (keywordp sym)) + (not (memq sym '(t nil)))))) + ;;;###autoload (defun doom/help-custom-variable (var) "Look up documentation for a custom variable. -Unlike `helpful-variable', which casts a wider net that includes internal -variables, this only lists variables that exist to be customized (defined with -`defcustom')." +Unlike `describe-variable' or `helpful-variable', which casts a wider net that +includes internal variables, this only lists variables that exist to be +customized (defined with `defcustom')." (interactive - (list (helpful--read-symbol - "Custom variable: " - (helpful--variable-at-point) - (lambda (sym) - (and (helpful--variable-p sym) - (custom-variable-p sym) - ;; Exclude minor mode state variables, which aren't meant to be - ;; modified directly, but through their associated function. - (not (or (and (string-suffix-p "-mode" (symbol-name sym)) - (fboundp sym)) - (eq (get sym 'custom-set) 'custom-set-minor-mode)))))))) - (helpful-variable var)) + (list + (intern (completing-read + "Custom variable: " obarray + (lambda (sym) + (and (doom--help-variable-p sym) + (custom-variable-p sym) + ;; Exclude minor mode state variables, which aren't meant to + ;; be modified directly, but through their associated + ;; function. + (not (or (and (string-suffix-p "-mode" (symbol-name sym)) + (fboundp sym)) + (eq (get sym 'custom-set) 'custom-set-minor-mode))))) + t nil nil (let ((var (variable-at-point))) + ;; `variable-at-point' uses 0 rather than nil to + ;; signify no symbol at point (presumably because 'nil + ;; is a symbol). + (unless (symbolp var) + (setq var nil)) + (when (doom--help-variable-p var) + var)))))) + (funcall (or (command-remapping #'describe-variable) + #'describe-variable) + var)) ;; diff --git a/lisp/packages.el b/lisp/packages.el index 402df59df..a08509976 100644 --- a/lisp/packages.el +++ b/lisp/packages.el @@ -30,7 +30,6 @@ ;; doom-editor.el (package! better-jumper :pin "47622213783ece37d5337dc28d33b530540fc319") (package! dtrt-indent :pin "a8aa356684804c52f26602d4e315f1306c6f3e59") -(package! helpful :pin "4ba24cac9fb14d5fdc32582cd947572040e82b2c") (package! smartparens :pin "c7519a1b69f196050a13e2230b7532893b077086") (package! ws-butler :pin "e3a38d93e01014cd47bf5af4924459bd145fd7c4") diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index 7dedabbf1..c83dc7b0f 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -102,11 +102,7 @@ Can be negative.") (set-popup-rule! "^\\*helm" :vslot -100 :size 0.22 :ttl nil) ;; Hide minibuffer if `helm-echo-input-in-header-line' - (add-hook 'helm-minibuffer-set-up-hook #'helm-hide-minibuffer-maybe) - - ;; Use helpful instead of describe-* to display documentation - (dolist (fn '(helm-describe-variable helm-describe-function)) - (advice-add fn :around #'doom-use-helpful-a))) + (add-hook 'helm-minibuffer-set-up-hook #'helm-hide-minibuffer-maybe)) (use-package! helm-posframe diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 6a013e65c..e1ff701c3 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -226,11 +226,6 @@ workable results ripgrep produces, despite the error." (if (= code 2) 0 code))) (apply fn args))) - ;; Integrate with `helpful' - (setq counsel-describe-function-function #'helpful-callable - counsel-describe-variable-function #'helpful-variable - counsel-descbinds-function #'helpful-callable) - ;; Decorate `doom/help-custom-variable' results the same way as ;; `counsel-describe-variable' (adds value and docstring columns). (ivy-configure 'doom/help-custom-variable :parent 'counsel-describe-variable) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index b40c0d3e0..43b26f200 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -553,9 +553,6 @@ "<" #'help-go-back "n" #'forward-button "p" #'backward-button) - (:after helpful - :map helpful-mode-map - "o" #'link-hint-open-link) (:after apropos :map apropos-mode-map "o" #'link-hint-open-link diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 01a9e196d..7d89c873b 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -102,8 +102,6 @@ (:after help :map help-mode-map :n "o" #'link-hint-open-link) - (:after helpful :map helpful-mode-map - :n "o" #'link-hint-open-link) (:after info :map Info-mode-map :n "o" #'link-hint-open-link) (:after apropos :map apropos-mode-map diff --git a/modules/editor/evil/autoload/ex.el b/modules/editor/evil/autoload/ex.el index 6ffce48c3..6610248a4 100644 --- a/modules/editor/evil/autoload/ex.el +++ b/modules/editor/evil/autoload/ex.el @@ -165,8 +165,7 @@ buffers." "Look up documentation for QUERY. If QUERY is in the format of an ex command, it will map it to the underlying -function and open its documentation with `helpful-function'. Otherwise, it will -search for it with `apropos'. +function and open its documentation. If QUERY is empty, this runs the equivalent of 'M-x apropos'. If BANG is non-nil, a search is preformed against Doom's manual (with @@ -180,8 +179,9 @@ non-nil, a search is preformed against Doom's manual (with (or (command-remapping #'apropos) #'apropos))) ((string-match "^ *:\\([^ ]+\\)$" query) - (helpful-function - (evil-ex-completed-binding (match-string 1 query)))) + (funcall (or (command-remapping #'describe-function) + #'describe-function) + (evil-ex-completed-binding (match-string 1 query)))) ((message "Searching for %S, this may take a while..." query) (apropos query t)))))) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 21aa9dd5c..ad9f3a51c 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -150,15 +150,6 @@ directives. By default, this only recognizes C directives.") :after-until #'evil-global-marker-p (and (>= char ?2) (<= char ?9))) - ;; HACK Invoking helpful from evil-ex throws a "No recursive edit is in - ;; progress" error because, between evil-ex and helpful, - ;; `abort-recursive-edit' gets called one time too many. - (defadvice! +evil--fix-helpful-key-in-evil-ex-a (key-sequence) - :before #'helpful-key - (when (evil-ex-p) - (run-at-time 0.1 nil #'helpful-key key-sequence) - (abort-recursive-edit))) - ;; Make J (evil-join) remove comment delimiters when joining lines. (advice-add #'evil-join :around #'+evil-join-a) @@ -464,9 +455,6 @@ directives. By default, this only recognizes C directives.") :v "gR" #'+eval:replace-region ;; Restore these keybinds, since the blacklisted/overwritten gr/gR will ;; undo them: - (:after helpful - :map helpful-mode-map - :n "gr" #'helpful-update) (:after compile :map (compilation-mode-map compilation-minor-mode-map) :n "gr" #'recompile) diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 2fcd75a23..24e4388f8 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -116,8 +116,14 @@ if it's callable, `apropos' otherwise." '(outline org-fold-outline)) (org-show-hidden-entry)))) 'deferred)) - (thing (helpful-symbol (intern thing))) - ((call-interactively #'helpful-at-point)))) + (thing + (funcall (or (command-remapping #'describe-symbol) + #'describe-symbol) + (intern thing))) + ((call-interactively + (if (fboundp #'helpful-at-point) + #'helpful-at-point + #'describe-symbol))))) ;; DEPRECATED Remove when 28 support is dropped. (unless (fboundp 'lisp--local-defform-body-p) diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index 8627d2e01..565296720 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -261,6 +261,77 @@ See `+emacs-lisp-non-package-mode' for details.") "s" #'buttercup-run-at-point)) +(use-package! helpful + ;; a better *help* buffer + :commands helpful--read-symbol + :hook (helpful-mode . visual-line-mode) + :init + ;; Make `apropos' et co search more extensively. They're more useful this way. + (setq apropos-do-all t) + + (global-set-key [remap describe-function] #'helpful-callable) + (global-set-key [remap describe-command] #'helpful-command) + (global-set-key [remap describe-variable] #'helpful-variable) + (global-set-key [remap describe-key] #'helpful-key) + (global-set-key [remap describe-symbol] #'helpful-symbol) + + (defun doom-use-helpful-a (fn &rest args) + "Force FN to use helpful instead of the old describe-* commands." + (letf! ((#'describe-function #'helpful-function) + (#'describe-variable #'helpful-variable)) + (apply fn args))) + + (after! apropos + ;; patch apropos buttons to call helpful instead of help + (dolist (fun-bt '(apropos-function apropos-macro apropos-command)) + (button-type-put + fun-bt 'action + (lambda (button) + (helpful-callable (button-get button 'apropos-symbol))))) + (dolist (var-bt '(apropos-variable apropos-user-option)) + (button-type-put + var-bt 'action + (lambda (button) + (helpful-variable (button-get button 'apropos-symbol)))))) + + ;; DEPRECATED: Remove when support for 29 is dropped. + (when (= emacs-major-version 29) + (defadvice! doom--find-function-search-for-symbol-save-excursion-a (fn &rest args) + "Suppress cursor movement by `find-function-search-for-symbol'. + +Addresses an unwanted side-effect in `find-function-search-for-symbol' on Emacs +29 where the cursor is moved to a variable's definition if it's defined in the +current buffer." + :around #'find-function-search-for-symbol + (let (buf pos) + (letf! (defun find-library-name (library) + (let ((filename (funcall find-library-name library))) + (with-current-buffer (find-file-noselect filename) + (setq buf (current-buffer) + pos (point))) + filename)) + (prog1 (apply fn args) + (when (buffer-live-p buf) + (with-current-buffer buf (goto-char pos)))))))) + :config + (setq helpful-set-variable-function #'setq!) + + (cond ((modulep! :completion ivy) + (setq counsel-describe-function-function #'helpful-callable + counsel-describe-variable-function #'helpful-variable + counsel-descbinds-function #'helpful-callable)) + ((modulep! :completion helm) + (dolist (fn '(helm-describe-variable helm-describe-function)) + (advice-add fn :around #'doom-use-helpful-a)))) + + ;; Open help:* links with helpful-* instead of describe-* + (advice-add #'org-link--open-help :around #'doom-use-helpful-a) + + (map! :map helpful-mode-map + :ng "o" #'link-hint-open-link + :n "gr" #'helpful-update)) + + ;; ;;; Project modes diff --git a/modules/lang/emacs-lisp/packages.el b/modules/lang/emacs-lisp/packages.el index 95a3e3e6a..7a64ffe52 100644 --- a/modules/lang/emacs-lisp/packages.el +++ b/modules/lang/emacs-lisp/packages.el @@ -7,6 +7,7 @@ (package! highlight-quoted :pin "24103478158cd19fbcfb4339a3f1fa1f054f1469") ;; Tools +(package! helpful :pin "4ba24cac9fb14d5fdc32582cd947572040e82b2c") (package! macrostep :pin "4939d88779761e8b5461b4cf73f86600172987db") (package! overseer :pin "7fdcf1a6fba6b1569a09c1666b4e51bcde266ed9") (package! elisp-def :pin "1ad4baccbf3d0d13e7607d332ae6bc60a5dd7360") diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 65eb023cc..9581d3ed6 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -540,9 +540,9 @@ relative to `org-directory', unless it is an absolute path." ;; documentation -- especially Doom's! (letf! ((defun -call-interactively (fn) (lambda (path _prefixarg) - (funcall - fn (or (intern-soft path) - (user-error "Can't find documentation for %S" path)))))) + (funcall (or (command-remapping fn) fn) + (or (intern-soft path) + (user-error "Can't find documentation for %S" path)))))) (org-link-set-parameters "kbd" :follow (lambda (ev) @@ -553,12 +553,12 @@ relative to `org-directory', unless it is an absolute path." :face 'help-key-binding) (org-link-set-parameters "var" - :follow (-call-interactively #'helpful-variable) + :follow (-call-interactively #'describe-variable) :activate-func #'+org-link--var-link-activate-fn :face '(font-lock-variable-name-face underline)) (org-link-set-parameters "fn" - :follow (-call-interactively #'helpful-callable) + :follow (-call-interactively #'describe-function) :activate-func #'+org-link--fn-link-activate-fn :face '(font-lock-function-name-face underline)) (org-link-set-parameters @@ -739,9 +739,6 @@ mutating hooks on exported output, like formatters." (add-to-list 'org-file-apps '(directory . emacs)) (add-to-list 'org-file-apps '(remote . emacs)) - ;; Open help:* links with helpful-* instead of describe-* - (advice-add #'org-link--open-help :around #'doom-use-helpful-a) - ;; Some uses of `org-fix-tags-on-the-fly' occur without a check on ;; `org-auto-align-tags', such as in `org-self-insert-command' and ;; `org-delete-backward-char'. From 7197ee65c7cd1a8291266a3514583406e1ab1f18 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 30 Aug 2024 02:24:11 -0400 Subject: [PATCH 4/6] fix: help(ful) reporting symbol's source as init.*.el Fix: #7958 --- lisp/doom-start.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/doom-start.el b/lisp/doom-start.el index 35a4f2e9e..8e06d729d 100644 --- a/lisp/doom-start.el +++ b/lisp/doom-start.el @@ -394,7 +394,15 @@ If RETURN-P, return the message as a string instead of displaying it." ;; the next file it loads into `user-init-file'. (setq user-init-file t) (when init-file-name - (load init-file-name 'noerror 'nomessage 'nosuffix)) + (load init-file-name 'noerror 'nomessage 'nosuffix) + ;; HACK: if `init-file-name' happens to be higher in + ;; `load-history' than a symbol's actual definition, + ;; `symbol-file' (and help/helpful buffers) will report the + ;; source of a symbol as `init-file-name', rather than it's + ;; true source. By removing this file from `load-history', no + ;; one will make that mistake. + (setq load-history (delete (assoc init-file-name load-history) + load-history))) ;; If it's still `t', then it failed to load the profile initfile. ;; This likely means the user has forgotten to run `doom sync'! (when (eq user-init-file t) From 8c4d871f7c14d62042f2ea0954cda2bb39846763 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 30 Aug 2024 03:15:43 -0400 Subject: [PATCH 5/6] fix(evil): respect evil-disable-insert-state-bindings --- modules/editor/evil/config.el | 43 ++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index ad9f3a51c..c7fb7c24f 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -559,24 +559,25 @@ directives. By default, this only recognizes C directives.") :v "gL" #'evil-lion-right ;; Emulation of Vim's omni-completion keybinds - (:prefix "C-x" - (:when (modulep! :completion company) - :i "C-l" #'+company/whole-lines - :i "C-k" #'+company/dict-or-keywords - :i "C-f" #'company-files - :i "C-]" #'company-etags - :i "s" #'company-ispell - :i "C-s" #'company-yasnippet - :i "C-o" #'company-capf - :i "C-n" #'+company/dabbrev - :i "C-p" #'+company/dabbrev-code-previous) - (:when (modulep! :completion corfu) - :i "C-l" #'cape-line - :i "C-k" #'cape-keyword - :i "C-f" #'cape-file - :i "C-]" #'complete-tag - :i "s" #'cape-dict - :i "C-s" #'yasnippet-capf - :i "C-o" #'completion-at-point - :i "C-n" #'cape-dabbrev - :i "C-p" #'+corfu/dabbrev-this-buffer))) + (:unless evil-disable-insert-state-bindings + (:prefix "C-x" + (:when (modulep! :completion company) + :i "C-l" #'+company/whole-lines + :i "C-k" #'+company/dict-or-keywords + :i "C-f" #'company-files + :i "C-]" #'company-etags + :i "s" #'company-ispell + :i "C-s" #'company-yasnippet + :i "C-o" #'company-capf + :i "C-n" #'+company/dabbrev + :i "C-p" #'+company/dabbrev-code-previous) + (:when (modulep! :completion corfu) + :i "C-l" #'cape-line + :i "C-k" #'cape-keyword + :i "C-f" #'cape-file + :i "C-]" #'complete-tag + :i "s" #'cape-dict + :i "C-s" #'yasnippet-capf + :i "C-o" #'completion-at-point + :i "C-n" #'cape-dabbrev + :i "C-p" #'+corfu/dabbrev-this-buffer)))) From 79910fba42d8ec45c2960d855377af0f7a8d09d9 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 30 Aug 2024 04:38:25 -0400 Subject: [PATCH 6/6] fix(cli): wrong-number-of-args error from mapconcat On Emacs <=28.2, mapconcat's third argument isn't optional. Amend: 7f175ab6d9a0 Ref: #8024 --- lisp/cli/sync.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lisp/cli/sync.el b/lisp/cli/sync.el index 02f68a87f..e6ed820b2 100644 --- a/lisp/cli/sync.el +++ b/lisp/cli/sync.el @@ -114,7 +114,18 @@ OPTIONS: (defun doom-sync--system-hash () (secure-hash - 'md5 (mapconcat #'identity (list doom-local-dir system-configuration)))) + 'md5 (mapconcat + #'identity + (list + ;; Changes to this path could indicate a change to the username and/or + ;; the location of Straight's build artifacts; both warrant a rebuild + ;; of your packages. + doom-local-dir + ;; Changes to this indicate the user's system/OS has changed (e.g. if + ;; the user copied their config to another system, on another OS) or + ;; Emacs' compiled features have (even if the major version hasn't). + system-configuration) + ""))) (defun doom-sync--abort-warning-h () (print! (warn "Script was abruptly aborted, leaving Doom in an incomplete state!"))