summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-editors/nano/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-editors/nano/files')
-rw-r--r--app-editors/nano/files/awk.nanorc38
-rw-r--r--app-editors/nano/files/css.nanorc9
-rw-r--r--app-editors/nano/files/gentoo.nanorc50
-rw-r--r--app-editors/nano/files/nano-1.3.12-fix2.patch15
-rw-r--r--app-editors/nano/files/nano-1.3.12-path.patch199
-rw-r--r--app-editors/nano/files/nano-1.3.12-scroll.patch39
-rw-r--r--app-editors/nano/files/nano-2.3.1-bind-unbind-docs.patch118
-rw-r--r--app-editors/nano/files/nano-2.3.1-drop-target.patch30
-rw-r--r--app-editors/nano/files/nano-2.3.1-gentoo-nanorc.patch95
-rw-r--r--app-editors/nano/files/nano-2.3.1-ncurses-pkg-config.patch52
-rw-r--r--app-editors/nano/files/nano-2.3.1-shell-nanorc.patch44
-rw-r--r--app-editors/nano/files/nano-2.3.2-bind-unbind-docs.patch119
-rw-r--r--app-editors/nano/files/nano-2.4.0-no-speller.patch88
-rw-r--r--app-editors/nano/files/xml.nanorc9
14 files changed, 905 insertions, 0 deletions
diff --git a/app-editors/nano/files/awk.nanorc b/app-editors/nano/files/awk.nanorc
new file mode 100644
index 000000000000..696ab6ad727c
--- /dev/null
+++ b/app-editors/nano/files/awk.nanorc
@@ -0,0 +1,38 @@
+## Here is an example for awk.
+##
+syntax "awk" "\.awk$"
+## records
+icolor brightred "\$[0-9A-Z_!@#$*?-]+"
+## awk-set variables
+color red "\<(ARGC|ARGIND|ARGV|BINMODE|CONVFMT|ENVIRON|ERRNO|FIELDWIDTHS)\>"
+color red "\<(FILENAME|FNR|FS|IGNORECASE|LINT|NF|NR|OFMT|OFS|ORS)\>"
+color red "\<(PROCINFO|RS|RT|RSTART|RLENGTH|SUBSEP|TEXTDOMAIN)\>"
+## function declarations and special patterns
+color brightgreen "\<(function|extension|BEGIN|END)\>"
+## operators
+color green "(\{|\}|\(|\)|\;|\]|\[|\\|<|>|!|=|&|\+|-|\*|%|/|\?:|\^|\|)"
+## flow control
+color brightyellow "\<(for|if|while|do|else|in|delete|exit)\>"
+color brightyellow "\<(break|continue|return)\>"
+## I/O statements
+color brightgreen "\<(close|getline|next|nextfile|print|printf)\>"
+color brightgreen "\<(system|fflush)\>"
+## standard functions
+color magenta "\<(atan2|cos|exp|int|log|rand|sin|sqrt|srand)\>"
+color magenta "\<(asort|asorti|gensub|gsub|index|length|match)\>"
+color magenta "\<(split|sprintf|strtonum|sub|substr|tolower|toupper)\>"
+color magenta "\<(mktime|strftime|systime)\>"
+color magenta "\<(and|compl|lshift|or|rshift|xor)\>"
+color magenta "\<(bindtextdomain|dcgettext|dcngettext)\>"
+
+##
+## String highlighting. You will in general want your comments and
+## strings to come last, because syntax highlighting rules will be
+## applied in the order they are read in.
+color brightyellow "<[^= ]*>" ""(\\.|[^"])*""
+
+## Comment highlighting
+color brightblue "(^|[[:space:]])#.*$"
+
+## Trailing whitespace
+color ,green "[[:space:]]+$"
diff --git a/app-editors/nano/files/css.nanorc b/app-editors/nano/files/css.nanorc
new file mode 100644
index 000000000000..62126e8a7833
--- /dev/null
+++ b/app-editors/nano/files/css.nanorc
@@ -0,0 +1,9 @@
+## Here is an example for css files.
+##
+syntax "css" "\.css$"
+color brightred "."
+color brightyellow start="\{" end="\}"
+color brightwhite start=":" end="[;^\{]"
+color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before|$"
+color brightblue start="\/\*" end="\\*/"
+color green ";|:|\{|\}"
diff --git a/app-editors/nano/files/gentoo.nanorc b/app-editors/nano/files/gentoo.nanorc
new file mode 100644
index 000000000000..f08d2e9027ce
--- /dev/null
+++ b/app-editors/nano/files/gentoo.nanorc
@@ -0,0 +1,50 @@
+## Here is an example for ebuilds/eclasses
+##
+syntax "ebuild" "\.e(build|class)$"
+## All the standard portage functions
+color brightgreen "^src_(unpack|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
+## Highlight bash related syntax
+color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\>"
+color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
+color green "-(e|d|f|r|g|u|w|x|L)\>"
+color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
+## Highlight variables ... official portage ones in red, all others in bright red
+color brightred "\$\{?[a-zA-Z_0-9]+\}?"
+color red "\<(ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|FILESDIR|WORKDIR|(P|R)?DEPEND|PROVIDE|DISTDIR|RESTRICT|USERLAND)\>"
+color red "\<(S|D|T|PV|PF|P|PN|A)\>" "\<C(XX)?FLAGS\>" "\<LDFLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
+## Highlight portage commands
+color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
+color brightblue "\<e(begin|end|conf|install|make|warn|infon?|error|log|patch|new(group|user))\>"
+color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>" "\<unpack\>"
+color brightblue "\<(do|new)(ins|s?bin|doc|lib(|\.so|\.a)|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
+color brightblue "\<do(header|python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
+color brightblue "prepall(|docs|info|man|strip)" "prep(info|lib|lib\.(so|a)|man|strip)"
+color brightblue "\<(|doc|ins|exe)into\>" "\<f(owners|perms)\>" "\<(exe|ins|dir)opts\>" "\<usex\>"
+## Highlight common commands used in ebuilds
+color blue "\<make\>" "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|let|ln|mkdir|mv|rm|sed|set|tar|touch|unset)\>"
+## Highlight comments (doesnt work that well)
+color yellow "#.*$"
+## Highlight strings (doesnt work that well)
+color brightyellow ""(\\.|[^\"])*"" "'(\\.|[^'])*'"
+## Trailing space is bad!
+color ,green "[[:space:]]+$"
+
+## Here is an example for Portage control files
+##
+syntax "/etc/portage" "\.(keywords|mask|unmask|use)$"
+## Base text:
+color green "^.+$"
+## Use flags:
+color brightred "[[:space:]]+\+?[a-zA-Z0-9_-]+"
+color brightblue "[[:space:]]+-[a-zA-Z0-9_-]+"
+## Likely version numbers:
+color magenta "-[[:digit:]].*([[:space:]]|$)"
+## Accepted arches:
+color white "[~-]?\<(alpha|amd64|arm|hppa|ia64|mips|ppc|ppc64|s390|sh|sparc|x86|x86-fbsd)\>"
+color white "[[:space:]][~-]?\*"
+## Categories:
+color cyan "^[[:space:]]*.*/"
+## Masking regulators:
+color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)"
+## Comments:
+color yellow "#.*$"
diff --git a/app-editors/nano/files/nano-1.3.12-fix2.patch b/app-editors/nano/files/nano-1.3.12-fix2.patch
new file mode 100644
index 000000000000..1c6ba22f3ab3
--- /dev/null
+++ b/app-editors/nano/files/nano-1.3.12-fix2.patch
@@ -0,0 +1,15 @@
+diff -ru nano-1.3.12/src/rcfile.c nano-1.3.12-fix2/src/rcfile.c
+--- nano-1.3.12/src/rcfile.c 2006-06-07 22:50:56.000000000 -0400
++++ nano-1.3.12-fix2/src/rcfile.c 2006-07-18 19:22:30.000000000 -0400
+@@ -834,9 +834,11 @@
+ rcfile_error(N_("Unknown flag \"%s\""), option);
+ }
+
++#ifdef ENABLE_COLOR
+ if (endsyntax != NULL && endcolor == NULL)
+ rcfile_error(N_("Syntax \"%s\" has no color commands"),
+ endsyntax->desc);
++#endif
+
+ free(buf);
+ fclose(rcstream);
diff --git a/app-editors/nano/files/nano-1.3.12-path.patch b/app-editors/nano/files/nano-1.3.12-path.patch
new file mode 100644
index 000000000000..b8b2a7e11ff8
--- /dev/null
+++ b/app-editors/nano/files/nano-1.3.12-path.patch
@@ -0,0 +1,199 @@
+diff -ur nano-1.3.12/src/files.c nano-1.3.12-fixed/src/files.c
+--- nano-1.3.12/src/files.c 2006-06-14 09:19:43.000000000 -0400
++++ nano-1.3.12-fixed/src/files.c 2006-07-05 11:44:17.000000000 -0400
+@@ -902,21 +902,29 @@
+ * able to go there. */
+ char *get_full_path(const char *origpath)
+ {
+- char *d_here, *d_there = NULL;
++ struct stat fileinfo;
++ char *d_here, *d_there, *d_there_file = NULL;
++ const char *last_slash;
++ bool path_only;
+
+ if (origpath == NULL)
+ return NULL;
+
+- /* Get the current directory. */
++ /* Get the current directory. If it doesn't exist, back up and try
++ * again until we get a directory that does, and use that as the
++ * current directory. */
+ d_here = charalloc(PATH_MAX + 1);
+ d_here = getcwd(d_here, PATH_MAX + 1);
+
+- if (d_here != NULL) {
+- const char *last_slash;
+- char *d_there_file = NULL;
+- bool path_only;
+- struct stat fileinfo;
++ while (d_here == NULL) {
++ if (chdir("..") == -1)
++ break;
++
++ d_here = getcwd(d_here, PATH_MAX + 1);
++ }
+
++ /* If we succeeded, canonicalize it in d_here. */
++ if (d_here != NULL) {
+ align(&d_here);
+
+ /* If the current directory isn't "/", tack a slash onto the end
+@@ -925,89 +933,91 @@
+ d_here = charealloc(d_here, strlen(d_here) + 2);
+ strcat(d_here, "/");
+ }
++ /* Otherwise, set d_here to "". */
++ } else
++ d_here = mallocstrcpy(NULL, "");
+
+- d_there = real_dir_from_tilde(origpath);
++ d_there = real_dir_from_tilde(origpath);
+
+- assert(d_there != NULL);
++ assert(d_there != NULL);
+
+- /* Stat d_there. If stat() fails, assume that d_there refers to
+- * a new file that hasn't been saved to disk yet. Set path_only
+- * to TRUE if d_there refers to a directory, and FALSE if
+- * d_there refers to a file. */
+- path_only = !stat(d_there, &fileinfo) &&
+- S_ISDIR(fileinfo.st_mode);
+-
+- /* If path_only is TRUE, make sure d_there ends in a slash. */
+- if (path_only) {
+- size_t d_there_len = strlen(d_there);
+-
+- if (d_there[d_there_len - 1] != '/') {
+- d_there = charealloc(d_there, d_there_len + 2);
+- strcat(d_there, "/");
+- }
+- }
++ /* If stat()ing d_there fails, assume that d_there refers to a new
++ * file that hasn't been saved to disk yet. Set path_only to TRUE
++ * if d_there refers to a directory, and FALSE otherwise. */
++ path_only = stat(d_there, &fileinfo) == 0 &&
++ S_ISDIR(fileinfo.st_mode);
+
+- /* Search for the last slash in d_there. */
+- last_slash = strrchr(d_there, '/');
++ /* If path_only is TRUE, make sure d_there ends in a slash. */
++ if (path_only) {
++ size_t d_there_len = strlen(d_there);
+
+- /* If we didn't find one, then make sure the answer is in the
+- * format "d_here/d_there". */
+- if (last_slash == NULL) {
+- assert(!path_only);
++ if (d_there[d_there_len - 1] != '/') {
++ d_there = charealloc(d_there, d_there_len + 2);
++ strcat(d_there, "/");
++ }
++ }
+
+- d_there_file = d_there;
+- d_there = d_here;
+- } else {
+- /* If path_only is FALSE, then save the filename portion of
+- * the answer, everything after the last slash, in
+- * d_there_file. */
+- if (!path_only)
+- d_there_file = mallocstrcpy(NULL, last_slash + 1);
+-
+- /* And remove the filename portion of the answer from
+- * d_there. */
+- null_at(&d_there, last_slash - d_there + 1);
+-
+- /* Go to the path specified in d_there. */
+- if (chdir(d_there) == -1) {
+- free(d_there);
+- d_there = NULL;
+- } else {
+- /* Get the full path and save it in d_there. */
+- free(d_there);
++ /* Search for the last slash in d_there. */
++ last_slash = strrchr(d_there, '/');
+
+- d_there = charalloc(PATH_MAX + 1);
+- d_there = getcwd(d_there, PATH_MAX + 1);
++ /* If we didn't find one, then make sure the answer is in the format
++ * "d_here/d_there". */
++ if (last_slash == NULL) {
++ assert(!path_only);
+
+- if (d_there != NULL) {
+- align(&d_there);
++ d_there_file = d_there;
++ d_there = d_here;
++ } else {
++ /* If path_only is FALSE, then save the filename portion of the
++ * answer (everything after the last slash) in d_there_file. */
++ if (!path_only)
++ d_there_file = mallocstrcpy(NULL, last_slash + 1);
++
++ /* And remove the filename portion of the answer from
++ * d_there. */
++ null_at(&d_there, last_slash - d_there + 1);
++
++ /* Go to the path specified in d_there. */
++ if (chdir(d_there) == -1) {
++ free(d_there);
++ d_there = NULL;
++ } else {
++ free(d_there);
+
+- if (strcmp(d_there, "/") != 0) {
+- /* Make sure d_there ends in a slash. */
+- d_there = charealloc(d_there,
+- strlen(d_there) + 2);
+- strcat(d_there, "/");
+- }
+- } else
+- /* If we couldn't get the full path, set path_only
+- * to TRUE so that we clean up correctly, free all
+- * allocated memory, and return NULL. */
+- path_only = TRUE;
+-
+- /* Finally, go back to the path specified in d_here,
+- * where we were before. */
+- chdir(d_here);
+- }
++ /* Get the full path. */
++ d_there = charalloc(PATH_MAX + 1);
++ d_there = getcwd(d_there, PATH_MAX + 1);
++
++ /* If we succeeded, canonicalize it in d_there. */
++ if (d_there != NULL) {
++ align(&d_there);
++
++ /* If the current directory isn't "/", tack a slash onto
++ * the end of it. */
++ if (strcmp(d_there, "/") != 0) {
++ d_there = charealloc(d_there, strlen(d_there) + 2);
++ strcat(d_there, "/");
++ }
++ } else
++ /* Otherwise, set path_only to TRUE, so that we clean up
++ * correctly, free all allocated memory, and return
++ * NULL. */
++ path_only = TRUE;
++
++ /* Finally, go back to the path specified in d_here,
++ * where we were before. We don't check for a chdir()
++ * error, since we can do nothing then. */
++ chdir(d_here);
+
+ /* Free d_here, since we're done using it. */
+ free(d_here);
+ }
+
+- /* At this point, if path_only is FALSE and d_there exists,
++ /* At this point, if path_only is FALSE and d_there isn't NULL,
+ * d_there contains the path portion of the answer and
+ * d_there_file contains the filename portion of the answer. If
+- * this is the case, tack d_there_file onto the end of
+- * d_there, so that d_there contains the complete answer. */
++ * this is the case, tack the latter onto the end of the former.
++ * d_there will then contain the complete answer. */
+ if (!path_only && d_there != NULL) {
+ d_there = charealloc(d_there, strlen(d_there) +
+ strlen(d_there_file) + 1);
diff --git a/app-editors/nano/files/nano-1.3.12-scroll.patch b/app-editors/nano/files/nano-1.3.12-scroll.patch
new file mode 100644
index 000000000000..f5d533633224
--- /dev/null
+++ b/app-editors/nano/files/nano-1.3.12-scroll.patch
@@ -0,0 +1,39 @@
+fix from upstream
+
+diff -ur nano-1.3.12/src/move.c nano-1.3.12-fixed/src/move.c
+--- nano-1.3.12/src/move.c 2006-05-21 22:08:49.000000000 -0400
++++ nano-1.3.12-fixed/src/move.c 2006-07-06 17:01:03.000000000 -0400
+@@ -521,6 +521,16 @@
+
+ /* Scroll the edit window up one line. */
+ edit_scroll(UP, 1);
++
++ /* If we're not on the first line of the edit window, update the
++ * line we were on before and the line we're on now. The former
++ * needs to be redrawn if we're not on the first page, and the
++ * latter needs to be drawn unconditionally. */
++ if (openfile->current_y > 0) {
++ if (need_vertical_update(0))
++ update_line(openfile->current->next, 0);
++ update_line(openfile->current, openfile->current_x);
++ }
+ }
+ #endif /* !NANO_TINY */
+
+@@ -574,6 +584,16 @@
+
+ /* Scroll the edit window down one line. */
+ edit_scroll(DOWN, 1);
++
++ /* If we're not on the last line of the edit window, update the line
++ * we were on before and the line we're on now. The former needs to
++ * be redrawn if we're not on the first page, and the latter needs
++ * to be drawn unconditionally. */
++ if (openfile->current_y < editwinrows - 1) {
++ if (need_vertical_update(0))
++ update_line(openfile->current->prev, 0);
++ update_line(openfile->current, openfile->current_x);
++ }
+ }
+ #endif /* !NANO_TINY */
+
diff --git a/app-editors/nano/files/nano-2.3.1-bind-unbind-docs.patch b/app-editors/nano/files/nano-2.3.1-bind-unbind-docs.patch
new file mode 100644
index 000000000000..300ee2d24ee1
--- /dev/null
+++ b/app-editors/nano/files/nano-2.3.1-bind-unbind-docs.patch
@@ -0,0 +1,118 @@
+From 5afd6d3e9558f8295496f7c59c765947e7f19d8a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 28 Nov 2011 15:37:02 -0500
+Subject: [PATCH 1/2] nanorc(5): fix bind/unbind documentation
+
+The unbind section is listed after valid key/menu/functions, but tries
+to say those sections come after it. So reorganization the section so
+that bind/unbind comes first, and then we cover the key/menu/functions
+after both of them.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ doc/man/nanorc.5 | 32 +++++++++++++++++++-------------
+ 1 file changed, 19 insertions(+), 13 deletions(-)
+
+diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5
+index da33179..2da71ab 100644
+--- a/doc/man/nanorc.5
++++ b/doc/man/nanorc.5
+@@ -282,9 +282,19 @@ Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that
+ .SH KEY BINDINGS
+ Key bindings may be reassigned via the following commands:
+ .TP
+-.B bind \fIkey\fP \fIfunction\fP \fImenu\fP
++.B bind \fIkey\fP \fIfunction\fP \fImenu\fP
+ Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
+-context of menu \fImenu\fP. The format of \fIkey\fP should be one of:
++context of menu \fImenu\fP.
++.TP
++.B unbind \fIkey\fP \fImenu\fP
++Unbind the key \fIkey\fP from the menu named \fImenu\fP or from all
++menus by using \fIall\fP. Same key syntax as for binding.
++Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
++context of menu \fImenu\fP.
++.TP
++
++The format of \fIkey\fP should be one of:
++
+ .TP
+ .B ^
+ followed by an alpha character or the word "Space".
+@@ -298,8 +308,10 @@ Example: M-C
+ followed by a numeric value from 1 to 16.
+ Example: F10
+ .TP
+-Valid function names to be bound include:
+-.TP 3
++
++Valid \fIfunction\fP names to be bound include:
++
++.TP 2
+ .B help
+ Invoke the help menu.
+ .TP
+@@ -506,8 +518,9 @@ Toggle whether long lines will be wrapped to the next line.
+ Toggle whether the suspend sequence (normally ^Z) will suspend the editor window.
+ .TP
+
+-Valid menu sections are:
+-.TP
++Valid \fImenu\fP sections are:
++
++.TP 2
+ .B main
+ The main editor window where text is entered.
+ .TP
+@@ -549,13 +562,6 @@ The 'go to directory' menu.
+ .TP
+ .B all
+ A special name meaning: apply to all menus where this function exists.
+-
+-.TP
+-.B unbind \fIkey\fP \fImenu\fP
+-Unbind the key \fIkey\fP from the menu named \fImenu\fP or from all
+-menus by using \fIall\fP. Same key syntax as for binding.
+-Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
+-context of menu \fImenu\fP. The format of \fIkey\fP should be one of:
+ .SH FILES
+ .TP
+ .I SYSCONFDIR/nanorc
+--
+1.7.9.7
+
+From 4b3e912d4a5c3561d1cfaf944d33ba9c30a9a555 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 28 Nov 2011 15:38:26 -0500
+Subject: [PATCH 2/2] nanorc syntax: add bind/unbind commands
+
+We don't currently handle the bind/unbind commands, so adding them to
+your nanorc file with colorization enabled makes it look like they're
+not actually supported.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ doc/syntax/nanorc.nanorc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/doc/syntax/nanorc.nanorc b/doc/syntax/nanorc.nanorc
+index bda5f4f..287be56 100644
+--- a/doc/syntax/nanorc.nanorc
++++ b/doc/syntax/nanorc.nanorc
+@@ -2,10 +2,12 @@
+ ##
+ syntax "nanorc" "\.?nanorc$"
+ ## Possible errors and parameters
+-icolor brightwhite "^[[:space:]]*((un)?set|include|syntax|i?color).*$"
++icolor brightwhite "^[[:space:]]*((un)?(bind|set)|include|syntax|i?color).*$"
+ ## Keywords
+ icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|poslog|preserve|punct)\>" "^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|speller|suspend|suspendenable|tabsize|tabstospaces|tempfile|undo|view|whitespace|wordbounds)\>"
+-icolor green "^[[:space:]]*(set|unset|include|syntax|header|magic)\>"
++icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space)|F([0-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]+[[:alpha:]]+[[:space:]]*$"
++icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^|M-)([[:alpha:]]|space)|F([0-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]*$"
++icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic)\>"
+ ## Colors
+ icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
+ icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
+--
+1.7.9.7
diff --git a/app-editors/nano/files/nano-2.3.1-drop-target.patch b/app-editors/nano/files/nano-2.3.1-drop-target.patch
new file mode 100644
index 000000000000..3b5647675090
--- /dev/null
+++ b/app-editors/nano/files/nano-2.3.1-drop-target.patch
@@ -0,0 +1,30 @@
+From 0708d921211fa0f89288690593c406a682b2c826 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 14 Jun 2011 16:00:52 -0400
+Subject: [PATCH] drop --target as it makes no sense
+
+Since nano doesn't produce code, the --target option to configure
+doesn't make sense. So only support --{build,host} since those are
+what we need in order to cross-compile.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c590737..3eb61c2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -22,7 +22,7 @@
+
+ AC_INIT([GNU nano], [2.3.1], [nano-devel@gnu.org], [nano])
+ AC_CONFIG_SRCDIR([src/nano.c])
+-AC_CANONICAL_TARGET([])
++AC_CANONICAL_HOST
+ AM_INIT_AUTOMAKE
+ AC_CONFIG_HEADERS([config.h])
+
+--
+1.7.9.7
+
diff --git a/app-editors/nano/files/nano-2.3.1-gentoo-nanorc.patch b/app-editors/nano/files/nano-2.3.1-gentoo-nanorc.patch
new file mode 100644
index 000000000000..c775e2988b46
--- /dev/null
+++ b/app-editors/nano/files/nano-2.3.1-gentoo-nanorc.patch
@@ -0,0 +1,95 @@
+From 7051588fee7a20a69c67c8899b3e6c35ebf51fbf Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 25 Aug 2012 23:03:22 -0400
+Subject: [PATCH] gentoo syntax: update
+
+Update to newer EAPIs, and fold in updated shell changes too.
+Much of this is based on work by Davide.
+
+Reported-by: Davide Pesavento <pesa@gentoo.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ doc/syntax/gentoo.nanorc | 46 +++++++++++++++++++++++++++-------------------
+ 1 file changed, 27 insertions(+), 19 deletions(-)
+
+diff --git a/doc/syntax/gentoo.nanorc b/doc/syntax/gentoo.nanorc
+index 2ad1597..ad89fce 100644
+--- a/doc/syntax/gentoo.nanorc
++++ b/doc/syntax/gentoo.nanorc
+@@ -2,30 +2,38 @@
+ ##
+ syntax "ebuild" "\.e(build|class)$"
+ ## All the standard portage functions
+-color brightgreen "^src_(unpack|prepare|configure|compile|install|test)" "^pkg_(config|nofetch|setup|(pre|post)(inst|rm))"
++color brightgreen "(^|\<default_)src_(unpack|prepare|configure|compile|install|test)\>"
++color brightgreen "^pkg_(config|nofetch|pretend|setup|(pre|post)(inst|rm))\>"
++color brightgreen "\<default(_pkg_nofetch)?\>"
+ ## Highlight bash related syntax
+-color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while|continue|break)\>"
+-color green "\<(declare|eval|exec|let)\>"
+-color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
+-color green "-[edfgruwxL]\>"
+-color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
++color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>"
++color green "\<(declare|eval|exec|export|let|local)\>"
++color green "[{}():;|`$<>!=&\\]" "(\]|\[)"
++color green "-[defhnrsuwxzL]\>"
++color green "-(eq|ne|gt|lt|ge|le)\>"
+ ## Highlight variables ... official portage ones in red, all others in bright red
+-color brightred "\$\{?[a-zA-Z_0-9]+\}?"
+-color red "\<(EAPI|ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|(P|R)?DEPEND|PROVIDE|PROPERTIES|RESTRICT|USERLAND)\>"
+-color red "\<(S|D|T|PV|PF|P|PN|PR|PVR|A|CATEGORY|DISTDIR|FILESDIR|ROOT|WORKDIR)\>" "\<(AS|C(PP|XX)?|LD)FLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
+-color red "\<QA_((TEXTRELS|EXECSTACK|WX_LOAD)(_[a-zA-Z_0-9]+)?|DT_HASH|PRESTRIPPED)\>" "\<WANT_AUTO(CONF|MAKE)\>" "\<AT_M4DIR\>"
++color brightred "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*"
++color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:digit:]]|@)+\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})"
++color red "\<(EAPI|ARCH|HOMEPAGE|DESCRIPTION|IUSE|SRC_URI|LICENSE|SLOT|KEYWORDS|(P|R)?DEPEND|PROVIDE|PROPERTIES|REQUIRED_USE|RESTRICT|USERLAND)\>"
++color red "\<(S|E?D|T|PV|PF|P|PN|PR|PVR|A|CATEGORY|DISTDIR|FILESDIR|EPREFIX|E?ROOT|WORKDIR)\>"
++color red "\<(AS|C(PP|XX)?|LD)FLAGS\>" "\<C(HOST|TARGET|BUILD)\>"
++color red "\<QA_((TEXTRELS|EXECSTACK|WX_LOAD)(_[a-zA-Z_0-9]+)?|DT_HASH|PRESTRIPPED)\>"
++color red "\<(PATCHES|(HTML_)?DOCS)\>" "\<WANT_(AUTO(CONF|MAKE)|LIBTOOL)\>" "\<AT_M4DIR\>"
+ ## Highlight portage commands
+-color magenta "\<use(_(with|enable))?\> [!a-zA-Z0-9_+ -]*" "inherit.*"
+-color brightblue "\<e(begin|end|conf|install|make|qmake[34]|ant|(qa)?warn|infon?|error|log|patch|new(group|user))\>"
+-color brightblue "\<e(pause|beep|mktemp|(cvs|svn)_clean|punt_cxx)\>" "\<e(aclocal|auto(reconf|header|conf|make))\>"
+-color brightblue "\<built_with_use\>" "\<make_desktop_entry\>" "\<unpack(_(makeself|pdv))?\>"
+-color brightblue "\<die\>" "\<use(_(with|enable))?\>" "\<inherit\>" "\<has\>" "\<(has|best)_version\>"
++color magenta "\<(use(_(with|enable|if_iuse)|x)?|in_iuse)\> [!a-zA-Z0-9_+ -]*" "inherit.*"
++color brightblue "\<e(begin|end|conf|install|make|qmake4|ant|(qa)?warn|infon?|error|log|patch(_user)?|new(group|user))\>"
++color brightblue "\<e(pause|beep|mktemp|(cvs|svn)_clean|punt_cxx)\>" "\<e(aclocal|auto(reconf|header|conf|make)|libtoolize)\>"
++color brightblue "\<e(stack|shopts|umask)_(push|pop)\>" "\<version_is_at_least\>"
++color brightblue "\<make_desktop_entry\>" "\<unpack(_(makeself|pdv))?\>"
++color brightblue "\<(die|has|inherit|nonfatal)\>" "\<(use(_(with|enable|if_iuse)|x)?|in_iuse)\>" "\<(has|best)_version\>"
+ color brightblue "\<(do|new)(ins|(games)?s?bin|doc|lib(\.so|\.a)?|man|info|exe|initd|confd|envd|pam|menu|icon)\>"
+-color brightblue "\<do(python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
+-color brightblue "prepall(docs|info|man|strip)?" "prep(info|lib|lib\.(so|a)|man|strip|gamesdirs)"
++color brightblue "\<do(compress|python|sed|dir|hard|sym|html|jar|mo)\>" "\<keepdir\>"
++color brightblue "\<prepall(docs|info|man|strip)?\>" "\<prep(info|lib|lib\.(so|a)|man|strip|gamesdirs)\>"
+ color brightblue "\<(doc|ins|exe)?into\>" "\<(f|games)(owners|perms)\>" "\<(exe|ins|dir)opts\>"
++color brightblue "\<tc-get(BUILD_)?(AR|AS|CC|CPP|CXX|LD|NM|OBJCOPY|PKG_CONFIG|RANLIB)\>"
++color brightblue "\<tc-(arch(-kernel)?|export|has-(tls|openmp))\>"
+ ## Highlight common commands used in ebuilds
+-color blue "\<make\>" "\<(awk|cat|cd|chmod|chown|cp|echo|env|export|find|e?grep|ln|mkdir|mv|rm|sed|set|tar|touch|unset|xargs)\>"
++color blue "\<(awk|cat|cd|chmod|chown|cp|echo|env|find|e?grep|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|unset|xargs)\>"
+ ## Highlight comments (doesnt work that well)
+ color yellow "(^|[[:space:]])#.*$"
+ ## Highlight strings (doesnt work that well)
+@@ -35,7 +43,7 @@ color ,green "[[:space:]]+$"
+
+ ## Here is an example for Portage control files
+ ##
+-syntax "/etc/portage" "\.(keywords|mask|unmask|use)(/.+)?$"
++syntax "/etc/portage" "\.(accept_keywords|env|keywords|mask|unmask|use)(/.+)?$"
+ ## Base text:
+ color green "^.+$"
+ ## Use flags:
+--
+1.8.3.2
+
+--- a/doc/syntax/gentoo.nanorc
++++ b/doc/syntax/gentoo.nanorc
+@@ -61,3 +61,5 @@ color cyan "^[[:space:]]*.*/"
+ color brightmagenta "^[[:space:]]*(=|~|<|<=|=<|>|>=|=>)"
+ ## Comments:
+ color yellow "#.*$"
++## Trailing space is bad!
++color ,green "[[:space:]]+$"
diff --git a/app-editors/nano/files/nano-2.3.1-ncurses-pkg-config.patch b/app-editors/nano/files/nano-2.3.1-ncurses-pkg-config.patch
new file mode 100644
index 000000000000..84bd0b70ff87
--- /dev/null
+++ b/app-editors/nano/files/nano-2.3.1-ncurses-pkg-config.patch
@@ -0,0 +1,52 @@
+From c662db58448fefe86184117e6bab5799e43eccf1 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 1 Jan 2012 02:26:16 -0500
+Subject: [PATCH] search ncurses via pkg-config first
+
+Newer ncurses installs include pkg-config files which tell us the right
+-I/-L paths we need, so default to that before trying the legacy ways.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ configure.ac | 18 ++++++++++++++++++
+ 1 files changed, 18 insertions(+), 0 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1f61ae4..05308be 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -35,6 +35,7 @@ AC_PROG_CC
+ AC_PROG_LN_S
+ AC_ISC_POSIX
+ AC_SYS_LARGEFILE
++PKG_PROG_PKG_CONFIG
+
+ dnl Internationalization macros.
+
+@@ -439,6 +440,23 @@ AC_CHECK_FUNCS(getopt_long)
+ dnl Checks for libraries.
+
+ if eval "test x$CURSES_LIB_NAME = x"; then
++ if test x$enable_utf8 != xno; then
++ PKG_CHECK_MODULES([NCURSESW], [ncursesw], [
++ CURSES_LIB=$NCURSESW_LIBS
++ CPPFLAGS="$NCURSESW_CFLAGS $CPPFLAGS"
++ CURSES_LIB_NAME=ncursesw
++ CURSES_LIB_WIDE=yes
++ ], [:])
++ else
++ PKG_CHECK_MODULES([NCURSES], [ncurses], [
++ CURSES_LIB=$NCURSES_LIBS
++ CPPFLAGS="$NCURSES_CFLAGS $CPPFLAGS"
++ CURSES_LIB_NAME=ncurses
++ ], [:])
++ fi
++fi
++
++if eval "test x$CURSES_LIB_NAME = x"; then
+ AC_CHECK_HEADERS(ncurses.h)
+
+ if test x$enable_utf8 != xno; then
+--
+1.7.6.1
+
diff --git a/app-editors/nano/files/nano-2.3.1-shell-nanorc.patch b/app-editors/nano/files/nano-2.3.1-shell-nanorc.patch
new file mode 100644
index 000000000000..805130fda25c
--- /dev/null
+++ b/app-editors/nano/files/nano-2.3.1-shell-nanorc.patch
@@ -0,0 +1,44 @@
+From 5a6a9c107148162f47032b03af3f393c3888c5df Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 28 Feb 2012 11:14:33 -0500
+Subject: [PATCH] shell syntax: major updates
+
+Highlight more shell builtins and common commands.
+
+Rewrite the variable highlighting to be more exact and handle cases where
+string operations are used.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ doc/syntax/sh.nanorc | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/doc/syntax/sh.nanorc b/doc/syntax/sh.nanorc
+index f660105..a664ef6 100644
+--- a/doc/syntax/sh.nanorc
++++ b/doc/syntax/sh.nanorc
+@@ -4,12 +4,17 @@ syntax "sh" "\.sh$"
+ magic "(POSIX|Bourne.*) shell script text"
+ header "^#!.*/(ba|k|pdk)?sh[-0-9_]*"
+ icolor brightgreen "^[0-9A-Z_]+\(\)"
+-color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
+-color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
++color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>"
++color green "\<(declare|eval|exec|export|let|local)\>"
++color green "[{}():;|`$<>!=&\\]" "(\]|\[)"
+ color green "-[Ldefgruwx]\>"
+ color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
+-color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
+-icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
++color brightblue "\<(awk|cat|cd|ch(grp|mod|own)|cp|echo|env|grep|install|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|umask|unset)\>"
++# Basic variable names (no braces)
++color brightred "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*"
++# More complicated variable names; handles braces
++# and replacements and arrays
++color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:space:]]*[[:alnum:]_]+[[:space:]]*|@)\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})"
+ color cyan "(^|[[:space:]])#.*$"
+ color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
+ color ,green "[[:space:]]+$"
+--
+1.7.9.7
+
diff --git a/app-editors/nano/files/nano-2.3.2-bind-unbind-docs.patch b/app-editors/nano/files/nano-2.3.2-bind-unbind-docs.patch
new file mode 100644
index 000000000000..cd7dd343f783
--- /dev/null
+++ b/app-editors/nano/files/nano-2.3.2-bind-unbind-docs.patch
@@ -0,0 +1,119 @@
+From 17e1ba8530b9e21932935ad052ad416a0c2058a7 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 28 Nov 2011 15:37:02 -0500
+Subject: [PATCH] nanorc(5): fix bind/unbind documentation
+
+The unbind section is listed after valid key/menu/functions, but tries
+to say those sections come after it. So reorganization the section so
+that bind/unbind comes first, and then we cover the key/menu/functions
+after both of them.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ doc/man/nanorc.5 | 32 +++++++++++++++++++-------------
+ 1 file changed, 19 insertions(+), 13 deletions(-)
+
+diff --git a/doc/man/nanorc.5 b/doc/man/nanorc.5
+index b9c0a19..3fc3c5d 100644
+--- a/doc/man/nanorc.5
++++ b/doc/man/nanorc.5
+@@ -285,9 +285,19 @@ Read in self-contained color syntaxes from \fIsyntaxfile\fP. Note that
+ .SH KEY BINDINGS
+ Key bindings may be reassigned via the following commands:
+ .TP
+-.B bind \fIkey\fP \fIfunction\fP \fImenu\fP
++.B bind \fIkey\fP \fIfunction\fP \fImenu\fP
+ Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
+-context of menu \fImenu\fP. The format of \fIkey\fP should be one of:
++context of menu \fImenu\fP.
++.TP
++.B unbind \fIkey\fP \fImenu\fP
++Unbind the key \fIkey\fP from the menu named \fImenu\fP or from all
++menus by using \fIall\fP. Same key syntax as for binding.
++Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
++context of menu \fImenu\fP.
++.TP
++
++The format of \fIkey\fP should be one of:
++
+ .TP
+ .B ^
+ followed by an alpha character or the word "Space".
+@@ -301,8 +311,10 @@ Example: M-C
+ followed by a numeric value from 1 to 16.
+ Example: F10
+ .TP
+-Valid function names to be bound include:
+-.TP 3
++
++Valid \fIfunction\fP names to be bound include:
++
++.TP 2
+ .B help
+ Invoke the help menu.
+ .TP
+@@ -509,8 +521,9 @@ Toggle whether long lines will be wrapped to the next line.
+ Toggle whether the suspend sequence (normally ^Z) will suspend the editor window.
+ .TP
+
+-Valid menu sections are:
+-.TP
++Valid \fImenu\fP sections are:
++
++.TP 2
+ .B main
+ The main editor window where text is entered.
+ .TP
+@@ -552,13 +565,6 @@ The 'go to directory' menu.
+ .TP
+ .B all
+ A special name meaning: apply to all menus where this function exists.
+-
+-.TP
+-.B unbind \fIkey\fP \fImenu\fP
+-Unbind the key \fIkey\fP from the menu named \fImenu\fP or from all
+-menus by using \fIall\fP. Same key syntax as for binding.
+-Rebinds the key \fIkey\fP to a new function named \fIfunction\fP in the
+-context of menu \fImenu\fP. The format of \fIkey\fP should be one of:
+ .SH FILES
+ .TP
+ .I SYSCONFDIR/nanorc
+--
+1.8.1.2
+
+From 0d49d9f0c62013e0d86169a92a2d0f5557e7be05 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 28 Nov 2011 15:38:26 -0500
+Subject: [PATCH] nanorc syntax: add bind/unbind commands
+
+We don't currently handle the bind/unbind commands, so adding them to
+your nanorc file with colorization enabled makes it look like they're
+not actually supported.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ doc/syntax/nanorc.nanorc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/doc/syntax/nanorc.nanorc b/doc/syntax/nanorc.nanorc
+index 2c9f23a..494c2f4 100644
+--- a/doc/syntax/nanorc.nanorc
++++ b/doc/syntax/nanorc.nanorc
+@@ -2,10 +2,12 @@
+ ##
+ syntax "nanorc" "\.?nanorc$"
+ ## Possible errors and parameters
+-icolor brightwhite "^[[:space:]]*((un)?set|include|syntax|i?color).*$"
++icolor brightwhite "^[[:space:]]*((un)?(bind|set)|include|syntax|i?color).*$"
+ ## Keywords
+ icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(allow_insecure_backup|autoindent|backup|backupdir|backwards|boldtext|brackets|casesensitive|const|cut|fill|historylog|matchbrackets|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nonewlines|nowrap|operatingdir|poslog|preserve|punct)\>" "^[[:space:]]*(set|unset)[[:space:]]+(quickblank|quotestr|rebinddelete|rebindkeypad|regexp|smarthome|smooth|softwrap|speller|suspend|suspendenable|tabsize|tabstospaces|tempfile|undo|view|whitespace|wordbounds|locking)\>"
+-icolor green "^[[:space:]]*(set|unset|include|syntax|header|magic)\>"
++icolor brightgreen "^[[:space:]]*bind[[:space:]]+((\^|M-)([[:alpha:]]|space)|F([0-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]+[[:alpha:]]+[[:space:]]*$"
++icolor brightgreen "^[[:space:]]*unbind[[:space:]]+((\^|M-)([[:alpha:]]|space)|F([0-9]|1[0-6]))[[:space:]]+[[:alpha:]]+[[:space:]]*$"
++icolor green "^[[:space:]]*((un)?(bind|set)|include|syntax|header|magic)\>"
+ ## Colors
+ icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
+ icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
+--
+1.8.1.2
+
diff --git a/app-editors/nano/files/nano-2.4.0-no-speller.patch b/app-editors/nano/files/nano-2.4.0-no-speller.patch
new file mode 100644
index 000000000000..4405266bb0af
--- /dev/null
+++ b/app-editors/nano/files/nano-2.4.0-no-speller.patch
@@ -0,0 +1,88 @@
+https://bugs.gentoo.org/show_bug.cgi?id=544296
+https://savannah.gnu.org/bugs/?44607
+
+From 14a9c8aa0b124dc580c4805e848e6ff0880b43bd Mon Sep 17 00:00:00 2001
+From: Benno Schulenberg <bensberg@justemail.net>
+Date: Fri, 27 Mar 2015 16:55:49 +0000
+Subject: [PATCH] Treating the formatter like a speller, to fix compilation
+ with --disable-speller. This fixes Savannah bug #44607.
+
+git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5168 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
+---
+ ChangeLog | 2 ++
+ src/global.c | 10 ++++++++--
+ src/text.c | 3 ++-
+ 3 files changed, 12 insertions(+), 3 deletions(-)
+
+ChangeLog
+ * src/global.c, src/text.c: Treat the formatter like a speller, to fix
+ compilation with --disable-speller. Fixes Savannah bug #44607.
+
+diff --git a/src/global.c b/src/global.c
+index 4643af2..27ff938 100644
+--- a/src/global.c
++++ b/src/global.c
+@@ -639,8 +639,10 @@ void shortcut_init(void)
+ const char *nano_lint_msg = N_("Invoke the linter, if available");
+ const char *nano_prevlint_msg = N_("Go to previous linter msg");
+ const char *nano_nextlint_msg = N_("Go to next linter msg");
++#ifndef DISABLE_SPELLER
+ const char *nano_formatter_msg = N_("Invoke formatter, if available");
+ #endif
++#endif
+ #endif /* !DISABLE_HELP */
+
+ #ifndef DISABLE_HELP
+@@ -736,9 +738,11 @@ void shortcut_init(void)
+ #ifndef DISABLE_COLOR
+ add_to_funcs(do_linter, MMAIN,
+ N_("To Linter"), IFSCHELP(nano_lint_msg), TOGETHER, NOVIEW);
++#ifndef DISABLE_SPELLER
+ add_to_funcs(do_formatter, MMAIN,
+ N_("Formatter"), IFSCHELP(nano_formatter_msg), BLANKAFTER, NOVIEW);
+ #endif
++#endif
+
+ #ifndef NANO_TINY
+ add_to_funcs(case_sens_void, MWHEREIS|MREPLACE,
+@@ -1006,12 +1010,14 @@ void shortcut_init(void)
+ #ifndef DISABLE_SPELLER
+ add_to_sclist(MMAIN, "^T", do_spell, 0);
+ add_to_sclist(MMAIN, "F12", do_spell, 0);
++#ifndef DISABLE_COLOR
++ add_to_sclist(MMAIN, "^T", do_formatter, 0);
++ add_to_sclist(MMAIN, "F12", do_formatter, 0);
++#endif
+ #else
+ #ifndef DISABLE_COLOR
+ add_to_sclist(MMAIN, "^T", do_linter, 0);
+ add_to_sclist(MMAIN, "F12", do_linter, 0);
+- add_to_sclist(MMAIN, "^T", do_formatter, 0);
+- add_to_sclist(MMAIN, "F12", do_formatter, 0);
+ #endif
+ #endif
+ add_to_sclist(MMAIN, "^C", do_cursorpos_void, 0);
+diff --git a/src/text.c b/src/text.c
+index 8814b49..98b2f80 100644
+--- a/src/text.c
++++ b/src/text.c
+@@ -3223,6 +3223,7 @@ free_lints_and_return:
+ lint_cleanup();
+ }
+
++#ifndef DISABLE_SPELLER
+ /* Run a formatter for the given syntax.
+ * Expects the formatter to be non-interactive and
+ * operate on a file in-place, which we'll pass it
+@@ -3370,7 +3371,7 @@ void do_formatter(void)
+
+ statusbar(finalstatus);
+ }
+-
++#endif /* !DISABLE_SPELLER */
+ #endif /* !DISABLE_COLOR */
+
+ #ifndef NANO_TINY
+--
+2.3.3
+
diff --git a/app-editors/nano/files/xml.nanorc b/app-editors/nano/files/xml.nanorc
new file mode 100644
index 000000000000..1f68c05341ad
--- /dev/null
+++ b/app-editors/nano/files/xml.nanorc
@@ -0,0 +1,9 @@
+## Here is an example for xml files.
+##
+syntax "xml" "\.([jrs]html?|sgml?|xml|xslt?)$"
+color green start="<" end=">"
+color cyan "<[^> ]+"
+color cyan ">"
+color yellow start="<!DOCTYPE" end="[/]?>"
+color yellow start="<!--" end="-->"
+color red "&[^;]*;"