Author:         Trent W. Buck <trentbuck@gmail.com>
Forwarded:      not-needed
Bug-Debian:     http://www.debian.org/doc/debian-policy/ch-customized-programs.html#s11.4
Description:    use editor(1) and pager(1) instead of specific editors/pagers.
 Follow Debian Policy §11.4 - honour VISUAL, EDITOR and PAGER, but fall back on
 editor and pager respectively.  This allows the sysadmin to define site-local
 editor/pager defaults.  It also means things work when less and vi/emacs/nano
 aren't installed -- which is the case on a new Debian installation if you
 uncheck the "standard" tasksel task.
 .
 Not forwarded because editor(1) and pager(1) are Debian-specific.
Index: darcs-2.4.3/src/Darcs/Utils.hs
===================================================================
--- darcs-2.4.3.orig/src/Darcs/Utils.hs	2010-05-09 23:23:32.000000000 +1000
+++ darcs-2.4.3/src/Darcs/Utils.hs	2010-05-10 16:48:18.722449241 +1000
@@ -209,18 +209,12 @@
 run_editor f = do
   ed <- get_editor
   exec_interactive ed f
-       `ortryrunning` exec_interactive "emacs" f
-       `ortryrunning` exec_interactive "emacs -nw" f
-       `ortryrunning` exec_interactive "nano" f
-#ifdef WIN32
-       `ortryrunning` exec_interactive "edit" f
-#endif
 
 get_editor :: IO String
 get_editor = getEnv "DARCS_EDITOR" `catchall`
              getEnv "DARCSEDITOR" `catchall`
              getEnv "VISUAL" `catchall`
-             getEnv "EDITOR" `catchall` return "vi"
+             getEnv "EDITOR" `catchall` return "editor"
 
 environmentHelpEditor :: ([String], [String])
 environmentHelpEditor = (["DARCS_EDITOR", "DARCSEDITOR", "VISUAL", "EDITOR"],[
@@ -233,7 +227,7 @@
 
 get_viewer :: IO String
 get_viewer = getEnv "DARCS_PAGER" `catchall`
-             getEnv "PAGER" `catchall` return "less"
+             getEnv "PAGER" `catchall` return "pager"
 
 environmentHelpPager :: ([String], [String])
 environmentHelpPager = (["DARCS_PAGER", "PAGER"],[
