Sources/OrgCore/EmacsFallback.swift

63ae15b64d76b8b7c4d413cf6a6c5434c50d402d
orgstar/Sources/OrgCore/EmacsFallback.swift

12 lines · 459 bytes

 1import Foundation
 2
 3/// Whether messages may send the user to Emacs for what orgstar can't do itself. The Mac App
 4/// Store build, which can't run Emacs, turns it off at launch.
 5public enum EmacsFallback {
 6    nonisolated(unsafe) public static var offered = true
 7
 8    /// `emacs` while Emacs is offered, else `other`.
 9    public static func wording(_ emacs: String, _ other: String, offered: Bool = offered) -> String {
10        offered ? emacs : other
11    }
12}
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form