Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
c501d0f2
Commit
c501d0f2
authored
Mar 31, 2015
by
Kelvin Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add emacs plugin (even more updated)
Incorporate changes after code review of #408
parent
55a2e6d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
plugins/emacs/emacs.load
plugins/emacs/emacs.load
+9
-3
plugins/emacs/functions/__launch_emacs.fish
plugins/emacs/functions/__launch_emacs.fish
+2
-2
plugins/emacs/functions/ecd.fish
plugins/emacs/functions/ecd.fish
+0
-1
No files found.
plugins/emacs/emacs.load
View file @
c501d0f2
...
@@ -9,7 +9,9 @@ function __major_version
...
@@ -9,7 +9,9 @@ function __major_version
end
end
function __set_editor
function __set_editor
set -q EDITOR; or set -gx EDITOR emacs
if not set -q EDITOR
set -gx EDITOR emacs
end
end
end
function __add_functions_to_path
function __add_functions_to_path
...
@@ -17,8 +19,12 @@ function __add_functions_to_path
...
@@ -17,8 +19,12 @@ function __add_functions_to_path
set fish_function_path $emacs_functions $fish_function_path
set fish_function_path $emacs_functions $fish_function_path
end
end
set -q __emacs; or set __emacs (which emacs)
if not set -q __emacs
set -q __emacs_version; or set __emacs_version (__major_version $__emacs)
set __emacs (which emacs)
end
if not set -q __emacs_version
set __emacs_version (__major_version $__emacs)
end
if test "$__emacs_version" -gt 23
if test "$__emacs_version" -gt 23
__set_editor
__set_editor
...
...
plugins/emacs/functions/__launch_emacs.fish
View file @
c501d0f2
function __launch_emacs
function __launch_emacs
set -l x (emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null)
set -l x (emacsclient --alternate-editor '' --eval '(x-display-list)' 2>/dev/null)
if
begin; test -z "$x"; or test $x = nil; end
if
test -z "$x" -o "$x" = nil
emacsclient $argv --alternate-editor '' --create-frame
emacsclient $argv --alternate-editor '' --create-frame
else
else
or
emacsclient $argv --alternate-editor ''
emacsclient $argv --alternate-editor ''
end
end
end
end
plugins/emacs/functions/ecd.fish
View file @
c501d0f2
...
@@ -7,6 +7,5 @@ function ecd
...
@@ -7,6 +7,5 @@ function ecd
echo $dir
echo $dir
else
else
echo 'cannot deduce current buffer filename.' >/dev/stderr
echo 'cannot deduce current buffer filename.' >/dev/stderr
return 1
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment