]> gitweb.factorcode.org Git - factor.git/blob - basis/editors/emacs/windows/windows.factor
scryfall: add more filter/reject words, better mtga parser
[factor.git] / basis / editors / emacs / windows / windows.factor
1 ! Copyright (C) 2022 nomennescio
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: combinators.short-circuit continuations editors editors.emacs
4 io.pathnames io.standard-paths kernel make math.parser
5 namespaces sequences system windows.advapi32 windows.registry ;
6 IN: editors.emacs.windows
7
8 CONSTANT: registry-path-to-emacs "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\emacs.exe"
9
10 M: windows find-emacsclient
11     {
12         [ [ HKEY_LOCAL_MACHINE registry-path-to-emacs "" query-registry
13             parent-directory "emacsclientw.exe" append-path ] [ drop f ] recover ]
14         [ { "Emacs" } "emacsclientw.exe" find-in-applications ]
15         [ { "Emacs" } "emacsclient.exe" find-in-applications ]
16         [ "emacsclient.exe" ]
17     } 0|| ;