mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-25 20:19:18 -05:00
edit: Honor $VISUAL.
Suggested by Andreas Enge <andreas@enge.fr>. * guix/scripts/edit.scm (%editor): Honor 'VISUAL' before 'EDITOR'. (show-help): Adjust accordingly. * doc/guix.texi (Invoking guix edit): Likewise.
This commit is contained in:
parent
6d2e833495
commit
6237b9fa39
2 changed files with 6 additions and 4 deletions
|
@ -3929,8 +3929,9 @@ guix edit gcc-4.8 vim
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
launches the program specified in the @code{EDITOR} environment variable
|
launches the program specified in the @code{VISUAL} or in the
|
||||||
to edit the recipe of GCC@tie{}4.8.4 and that of Vim.
|
@code{EDITOR} environment variable to edit the recipe of GCC@tie{}4.8.4
|
||||||
|
and that of Vim.
|
||||||
|
|
||||||
If you are using Emacs, note that the Emacs user interface provides
|
If you are using Emacs, note that the Emacs user interface provides
|
||||||
similar functionality in the ``package info'' and ``package list''
|
similar functionality in the ``package info'' and ``package list''
|
||||||
|
|
|
@ -38,7 +38,7 @@ (define %options
|
||||||
|
|
||||||
(define (show-help)
|
(define (show-help)
|
||||||
(display (_ "Usage: guix edit PACKAGE...
|
(display (_ "Usage: guix edit PACKAGE...
|
||||||
Start $EDITOR to edit the definitions of PACKAGE...\n"))
|
Start $VISUAL or $EDITOR to edit the definitions of PACKAGE...\n"))
|
||||||
(newline)
|
(newline)
|
||||||
(display (_ "
|
(display (_ "
|
||||||
-h, --help display this help and exit"))
|
-h, --help display this help and exit"))
|
||||||
|
@ -48,7 +48,8 @@ (define (show-help)
|
||||||
(show-bug-report-information))
|
(show-bug-report-information))
|
||||||
|
|
||||||
(define %editor
|
(define %editor
|
||||||
(make-parameter (or (getenv "EDITOR") "emacsclient")))
|
(make-parameter (or (getenv "VISUAL") (getenv "EDITOR")
|
||||||
|
"emacsclient")))
|
||||||
|
|
||||||
(define (search-path* path file)
|
(define (search-path* path file)
|
||||||
"Like 'search-path' but exit if FILE is not found."
|
"Like 'search-path' but exit if FILE is not found."
|
||||||
|
|
Loading…
Reference in a new issue