From bb3665f37e7a7f9a101ff88c7820ec5d37d8c8cb Mon Sep 17 00:00:00 2001 From: Erik Charlebois Date: Sun, 21 Feb 2010 03:27:16 -0800 Subject: [PATCH] FUEL: Flip the default behavior of visit-other-file so that it does not try to create -docs or -tests files if they do not exist by default. This is the more common case when spelunking in code and in general you want to scaffold those files anyway. --- misc/fuel/factor-mode.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/fuel/factor-mode.el b/misc/fuel/factor-mode.el index bef6e4c774..c26abab997 100644 --- a/misc/fuel/factor-mode.el +++ b/misc/fuel/factor-mode.el @@ -245,11 +245,11 @@ code in the buffer." (defsubst factor-mode--in-tests (&optional file) (factor-mode--code-file "tests")) -(defun factor-mode-visit-other-file (&optional skip) +(defun factor-mode-visit-other-file (&optional create) "Cycle between code, tests and docs factor files. -With prefix, non-existing files will be skipped." +With prefix, non-existing files will be created." (interactive "P") - (let ((file (factor-mode--cycle-next (buffer-file-name) skip))) + (let ((file (factor-mode--cycle-next (buffer-file-name) (not create)))) (unless file (error "No other file found")) (find-file file) (unless (file-exists-p file)