From e517cd0ab812ec5903ff3dd2d53c23bf8dcb13d6 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Wed, 27 Aug 2025 02:02:46 -0700 Subject: [PATCH] Fix the last commit --- init.el | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/init.el b/init.el index e8a3477..f5a5472 100644 --- a/init.el +++ b/init.el @@ -1888,6 +1888,19 @@ otherwise, call `bibtex-find-text'." (nthcdr 1 rules)))))) ;; c-ts-mode +(defun my/find-other-file (&optional in-other-window event) + "Like `ff-find-other-file', but respect configuration variables. +IN-OTHER-WINDOW and EVENT are the same as the original command." + (interactive (list current-prefix-arg last-nonmenu-event)) + (ff-find-other-file in-other-window ff-ignore-include event)) +(defun my/find-other-file-other-window (event) + "Like `ff-find-other-file-other-window', but respect config variables. +EVENT is the same as the original command." + (interactive (list last-nonmenu-event)) + (my/find-other-file t event)) +(keymap-global-set " " #'my/find-other-file) +(keymap-global-set " " + #'my/find-other-file-other-window) (use-package c-ts-mode :after evil :hook ((c-ts-mode c++-ts-mode) . my/eglot-if-trusted) @@ -1896,14 +1909,14 @@ otherwise, call `bibtex-find-text'." (setopt ff-ignore-include t) :config (evil-define-key 'normal 'c-ts-mode-map - "go" #'ff-find-other-file - "gO" #'ff-find-other-file-other-window) + "go" #'my/find-other-file + "gO" #'my/find-other-file-other-window) (evil-define-key 'normal 'c++-ts-mode-map - "go" #'ff-find-other-file - "gO" #'ff-find-other-file-other-window) + "go" #'my/find-other-file + "gO" #'my/find-other-file-other-window) (evil-define-key 'normal 'objc-mode-map - "go" #'ff-find-other-file - "gO" #'ff-find-other-file-other-window)) + "go" #'my/find-other-file + "gO" #'my/find-other-file-other-window)) ;; GLSL (use-package glsl-mode)