Commit Graph

210 Commits (79ff393dc24b2e8844e939a84bb5bf5de781343e)

Author SHA1 Message Date
Benno Schulenberg 79ff393dc2 Fixing the rebinding of toggles.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5134 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-08 15:42:52 +00:00
Chris Allegretta 184cf609c0 2015-02-25 Chris Allegretta <chrisa@asty.org>
* src/rcfile.c (parse_binding): Add exception for do_toggle as
        rebinding toggles broke with r5022.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5124 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-02-25 19:04:53 +00:00
Chris Allegretta 4b3f2771b5 2015-01-03 Chris Allegretta <chrisa@asty.org>
* New formatter code to support syntaxes like
        go which have tools to automatically lint and reformat the text for
        you (gofmt), which is lovely.  rcfile option formatter, function
        text.c:do_formatter() and some other calls.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5100 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-01-03 07:24:17 +00:00
Benno Schulenberg 6f28d35eef Fixing compilation with --enable-tiny --enable-nanorc.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5035 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-29 09:33:51 +00:00
Benno Schulenberg 4651f49fca Allowing only those menus where the bound function is actually present,
when rebinding keys.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5022 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-27 16:14:52 +00:00
Benno Schulenberg 492e9f605b Miscellaneous whitespace adjustments and comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4995 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 10:48:26 +00:00
Benno Schulenberg b341f29cbd Transform many DISABLE_NANORC #ifdefs to the new DISABLE_HISTORIES.
This completes the fix for Savannah bug #42539.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4989 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-19 20:05:24 +00:00
Benno Schulenberg 336d1b8902 Renaming 'function_type' to 'key_type', for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4983 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 20:43:05 +00:00
Benno Schulenberg 736fbf2e3f Removing the --undo option, having the undo functions always enabled.
If wished, the user can unbind them.  This fixes Savannah bug #42456.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4964 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-13 15:20:26 +00:00
Benno Schulenberg 7d5f42ca08 Using the right type to avoid a compiler warning.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4955 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-10 19:50:44 +00:00
Benno Schulenberg ed0086bde5 Eliding four function calls by not comparing with an
empty string but checking for the terminating '\0'.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4949 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 14:33:00 +00:00
Benno Schulenberg 044e4d2ae0 A few more comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4878 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-13 21:11:59 +00:00
Benno Schulenberg 71c9a5245a Several random whitespace and comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-13 20:14:01 +00:00
Benno Schulenberg 111071af05 Improving another error message.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4868 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-13 08:34:29 +00:00
Benno Schulenberg d2f3f2194e Moving parse_magic_exp() next to its sister.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4865 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-12 19:57:12 +00:00
Benno Schulenberg 1d5134d93e Renaming the struct type 'exttype' to 'regexlisttype', and upon exit
also freeing the regexes for libmagic results and headerlines.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4862 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-12 14:31:54 +00:00
Benno Schulenberg cf4f80da9a Renaming and symmetrifying two functions, and improving some comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4861 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-12 13:52:50 +00:00
Benno Schulenberg 8e01293b34 Handling the libmagic and headerline regexes in the same manner.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4860 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-12 12:57:00 +00:00
Benno Schulenberg 07f14de995 Improving some comments, and removing some mispasted or superfluous ones.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4858 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-12 12:11:24 +00:00
Chris Allegretta 61523be8d2 2014-05-10 Chris Allegretta <chrisa@asty.org>
* src/rcfile.c (parse_color_names): Redefine false and true to
          their appropriate macro names so --with-slang works (slangv2 anyway).
        * src/text.c (do_linter): Care about whether user cancelled the file
          save (cancel the operation) versus justy said no (continue but don't
          save the file).  Also doupdate() after statusbar message that
          linter is being invoked and blank the shortcuts to draw the eye.
          Also allow user to cancel at the "open in a new buffer" prompt.
          New function lint_cleanup().  Fixes Savannah bug 42203.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4855 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-11 03:09:00 +00:00
Benno Schulenberg 1663994e42 Adding the ability to colour four elements of nano's interface differently.
Idea and original patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4827 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-03 18:24:45 +00:00
Benno Schulenberg 7a9f4a456e Update the years in the copyright notices.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4826 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-30 20:18:26 +00:00
Benno Schulenberg 20011f4d41 Plugging two tiny memory leaks. Patch essentially by Mark Majeres.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4819 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-27 11:29:50 +00:00
Benno Schulenberg e15abc9c1e Improving two error messages, and complaining about
wrong menu names after wrong function names.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4799 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-21 18:12:29 +00:00
Benno Schulenberg 94b1d01bb4 Allowing the codes from Ins and Del keys to be rebound.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4798 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-21 18:05:11 +00:00
Benno Schulenberg ac9973658a Remove recognition of K-keys.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4797 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-21 17:47:16 +00:00
Benno Schulenberg 27a52a8def Avoiding three compiler warnings with --enable-debug.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4794 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-21 13:07:18 +00:00
Benno Schulenberg 8f6151198a Whitespace adjustments, plus a few comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4769 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 09:57:06 +00:00
Benno Schulenberg eea0908236 Converting #ifdef ENABLE_NANORC to #ifndef DISABLE_NANORC.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4765 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-13 20:50:20 +00:00
Benno Schulenberg 1f934e3a8b Removing unused parameter 'menu' from strtosc().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4758 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-13 11:56:08 +00:00
Benno Schulenberg d19be5aafa More editing of comment blocks and trimming of blank lines.
Patch by David Lawrence Ramsey, slightly tweaked.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4753 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-08 18:38:45 +00:00
Benno Schulenberg de597bce92 Correcting two comments, and tweaking two others.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4751 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-08 13:27:32 +00:00
Benno Schulenberg f7c5eeed2d Uppercasing only the first two or three characters of a key name,
in order to preserve ^Space and M-Space, so these can be unbound.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4747 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-08 11:43:50 +00:00
Benno Schulenberg 2cdaaacb19 Melting the binding and unbinding code into a single function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4746 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-08 11:22:41 +00:00
Benno Schulenberg 7f40bdfc15 Improve the layout of the fatal error message.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4745 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-07 20:47:26 +00:00
Benno Schulenberg 2f00c9da83 Do not speak of "flags", but only of "options".
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4744 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-07 20:38:29 +00:00
Benno Schulenberg a2dcd6edce Dropping the obsolete argument of shortcut_init(),
and removing two unneeded calls of this function.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4740 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-07 09:24:10 +00:00
Benno Schulenberg 00389928d4 Converting #ifdef ENABLE_COLOR to #ifndef DISABLE_COLOR.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4719 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 11:59:03 +00:00
Benno Schulenberg 7a254dd1fe Making sure the user sees a fatal-error message.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4717 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 08:38:20 +00:00
Benno Schulenberg 0636d7b797 Converting #ifdef ENABLE_MULTIBUFFER to #ifndef DISABLE_MULTIBUFFER.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4712 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-03 20:23:07 +00:00
Benno Schulenberg 38142830c7 Supporting globs in include paths. Patch by Mike Frysinger.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4696 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-30 20:37:40 +00:00
Benno Schulenberg a997aa6d58 Allowing binding and unbinding of keys when colour is disabled.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4685 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-26 19:25:38 +00:00
Benno Schulenberg a166f702a0 Fixing compilation with --disable-color.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4684 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-26 19:20:41 +00:00
Benno Schulenberg 18c252d5e7 Printing menu numbers for debugging in hex.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4675 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-24 20:35:17 +00:00
Benno Schulenberg 52402756b0 Improving a debugging message, fixing a translator comment, and tweaking others.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4667 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-23 20:49:59 +00:00
Benno Schulenberg a65ef4244c Removing stray spaces before tabs.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-17 21:36:37 +00:00
Chris Allegretta e52eac51f5 2014-03-01 Chris Allegretta <chrisa@asty.org>
* global.c (shortcut_init) - fix an issue with the split
          do_research() setup when using --enable-tiny
        * rcfile.c (parse_linter) - Allow linter to be unset using ""
        * rcfile.c - Allow syntaxes to be extended via "extendsyntax"
          directive.  Color, header, magic and linter should all be
          able to be extended.  Man page updates for nanorc(5).
        * doc/nanorc.sample.in - Document 'set quiet'



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4630 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-02 05:27:56 +00:00
Benno Schulenberg fe267f61d9 Not just marking but actually translating a helpful message.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4626 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-28 19:47:48 +00:00
Chris Allegretta 5575bfad2c 2014-02-24 Chris Allegretta <chrisa@asty.org>
* new linter functionality.  rcfile option "linter"
        * src/global.c (shortcut_init) - Actually free the sclist
          if it was allocated before.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4600 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-24 10:18:15 +00:00
Chris Allegretta 22c83ec7af 2013-03-17 Chris Allegretta <chrisa@asty.org>
* Revert r4547 as we should have a new release and the overlap code is not yet
          ready for public consumption.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4569 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-03-17 22:09:38 +00:00