Benno Schulenberg
e753cd1c38
Adjusting some indentation.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5741 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-17 19:30:29 +00:00
Benno Schulenberg
7098dd0cd0
Pruning two #ifdefs, like elsewhere, to reduce the clutter.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5740 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-17 18:51:46 +00:00
Benno Schulenberg
988274bb70
Removing two redundant returns, and condensing six comments.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5739 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-17 10:06:15 +00:00
Benno Schulenberg
19bc63db28
Using the Search key bindings also during a Re-search, to enable cancelling.
...
This fixes Savannah bug #47159 .
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5738 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-17 09:12:30 +00:00
Benno Schulenberg
8866f728a2
Rearranging some things to reduce the indentation level by four steps,
...
so we can unwrap a dozen lines.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5737 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-14 17:14:35 +00:00
Benno Schulenberg
7070812004
Making an error message equal to others, to reduce the msgid count.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5736 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-14 16:09:52 +00:00
Benno Schulenberg
43040220bf
Avoiding to dereference a possible NULL.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5735 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-14 16:01:44 +00:00
Benno Schulenberg
8fea3472a9
Giving a central variable a ringing name --
...
tmp* is something for 5 lines, not for 300.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5734 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-13 20:13:16 +00:00
Benno Schulenberg
8fbb922868
Renaming a variable, from 'endcolor' to 'lastcolor', to fully avoid
...
the idea that it might have something to do with 'end_regex'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5733 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-13 20:05:36 +00:00
Benno Schulenberg
6ed6462154
Combining the regular-expression flags at compile time instead of at run time.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5732 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-13 19:37:21 +00:00
Benno Schulenberg
57c50baa61
Allowing the use of word boundary markers \< and \> in search strings on
...
non-GNU systems. This is a partial fix for Savannah bug #47325 .
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5731 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-13 19:19:12 +00:00
Benno Schulenberg
4712fc0615
Mentioning SVN instead of CVS, in the docs and in a comment.
...
Patch by Thomas Rosenau.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5730 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-13 19:09:28 +00:00
Benno Schulenberg
63d59656d3
Refinding the tail of the colors list only when extending,
...
not for every added color, thus saving some 15 microseconds.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5729 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-12 11:15:12 +00:00
Benno Schulenberg
f72e16502e
Renaming a variable.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5728 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-12 10:21:02 +00:00
Benno Schulenberg
fa82824a59
Reducing the indentation by short-circuiting a loop.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5727 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-12 09:52:16 +00:00
Benno Schulenberg
3cb80ff7ea
Renaming two functions, to be more distinguishable --
...
a leading underscore as the only difference is not enough.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5726 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-12 09:43:10 +00:00
Benno Schulenberg
af40fb65ae
Tweaking the Changelog a bit, and the NEWS file (double spacing version jumps).
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5725 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-12 09:37:48 +00:00
Benno Schulenberg
4e8d2d6223
Unnesting two ifs -- to put filenames, headerlines, and magic strings
...
on equal footing.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5724 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-12 09:18:50 +00:00
Benno Schulenberg
c5fedaa043
Setting the syntax and regex pointers just once, in a single place.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5723 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-12 08:46:18 +00:00
Benno Schulenberg
1786484486
Fixing compilation when configured with --enable-tiny plus --enable-nanorc.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5722 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-11 17:14:30 +00:00
Benno Schulenberg
d08d72a05d
Checking for an open syntax first, before checking it is named "default".
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5721 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-11 16:51:15 +00:00
Benno Schulenberg
6e37723fbe
Eliding a variable.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5720 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-11 16:45:00 +00:00
Benno Schulenberg
b8aae4d872
Tweaking some comments and reshuffling/reindenting some lines.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5719 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-11 16:39:27 +00:00
Benno Schulenberg
fb7f7011ec
Fixing compilation when configured with --enable-tiny plus --enable-browser.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5718 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-11 16:30:29 +00:00
Benno Schulenberg
8a5ae2130b
Renaming a variable to better fit its new role.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5717 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-10 20:36:12 +00:00
Benno Schulenberg
04262f09a4
Turning the linked list of syntaxes upside-down, so that the last-defined one
...
comes first, so that a search can stop at the first match instead of always
having to run through the entire list.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5716 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-10 20:06:01 +00:00
Benno Schulenberg
ed296525f4
Eliding the functions parse_header_exp() and parse_magic_exp(),
...
and reshuffling the parameters in grab_and_store().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5715 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-10 11:00:59 +00:00
Benno Schulenberg
837b4e66e2
Folding the parsing of a linter and formatter command into a single routine.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5714 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-10 10:36:49 +00:00
Benno Schulenberg
2994ea9d02
Not accepting 'header" and 'magic' commands for the default syntax.
...
This fixes Savannah bug #47323 .
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5713 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-10 09:46:21 +00:00
Benno Schulenberg
2f63e8dfc1
Using the grab_and_store() function also for gathering up extension regexes.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5712 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-09 21:00:42 +00:00
Benno Schulenberg
b0bdfbb0f7
Producing an adequate error message when the syntax name is improperly quoted.
...
This fixes Savannah bug #47324 .
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5711 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-09 20:28:50 +00:00
Benno Schulenberg
6a4d3aad80
Tweaking a few things and renaming a variable.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5710 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-04 20:50:38 +00:00
Benno Schulenberg
8a244c607a
Renaming three variables.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5709 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-04 20:22:27 +00:00
Benno Schulenberg
90f1ccf9ac
Eliding the now too tiny function free_list_item().
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5708 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-04 18:28:03 +00:00
Benno Schulenberg
c02c182bd7
Deleting a now-unused struct member.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5707 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-04 17:04:56 +00:00
Benno Schulenberg
2070d3a26f
Not bothering to keep the compiled regular expression when it matched.
...
Stopping instead to call malloc() pointlessly.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5706 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-04 14:53:45 +00:00
Benno Schulenberg
ce32cb0f6b
Allowing to select an empty syntax. And selecting the last
...
instead of the first syntax that matches a certain magic string
(forgotten in the previous commit).
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5705 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-01 11:21:05 +00:00
Benno Schulenberg
3df1a3f0f4
Not bothering to discard a duplicate syntax -- selecting simply the
...
last-defined one. This addresses Savannah bug #47303 .
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5704 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-01 11:06:00 +00:00
Benno Schulenberg
83975027e5
Not dereferencing symlinks, so that the syntax will be derived from the
...
name given on the command line, not from the name of the target file.
This fixes Savannah bug #47307 .
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5703 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-29 16:56:54 +00:00
Benno Schulenberg
e39423b49d
Fixing breakage of r5695 -- I confused nregcomp() with regcomp(). :(
...
Hhrr... Names that don't seem to differ...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5702 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-29 15:40:13 +00:00
Benno Schulenberg
04669b5635
Renaming a variable and reshuffling a few lines.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5701 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-29 12:17:53 +00:00
Benno Schulenberg
85e166b0f2
"Closing" an extended syntax again, to prevent sneakily extending
...
the last-defined syntax.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5700 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-29 12:04:22 +00:00
Benno Schulenberg
773fc447df
Arranging some things more orderly.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5699 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-29 10:54:48 +00:00
Benno Schulenberg
717e697e0b
Not allocating a struct for the "none" syntax -- it doesn't need any.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5698 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-29 10:29:52 +00:00
Benno Schulenberg
a24aee417d
Renaming a struct member.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5697 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-29 09:17:03 +00:00
Benno Schulenberg
275e9f0092
Disallowing the addition of further things to a syntax when
...
an rcfile ends or when an invalid syntax command is found.
This fixes Savannah bug #47207
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5696 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-28 20:38:14 +00:00
Benno Schulenberg
68d94a0c74
Rearranging a few things in my style.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5695 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-28 17:16:39 +00:00
Benno Schulenberg
07f71e6c1a
Not dropping regexes that were gathered earlier.
...
This fixes Savannah bug #47285 .
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5694 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-28 16:36:23 +00:00
Benno Schulenberg
c2148cc902
Renaming a variable and fusing an increment.
...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5693 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-28 15:47:37 +00:00
Benno Schulenberg
1fba31e7b5
Using the now correct parsing of header regexes also for parsing magic regexes.
...
This fixes Savannah bug #47292 .
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5692 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-28 15:16:27 +00:00