BÁRTHÁZI András wrote:
Hi!


I've read in the archive, that somebody else has asked

for position
saving before. You told, that there's no really need for

it. I don't
think so: all the people I know using Midnight told me during our conversations, that it would be a good feature.

Max Schedriviy even proposed a patch. http://mail.gnome.org/archives/mc-devel/2001-July/msg00003.html

I've made two patches:

bracket matching
----------------
the original version highlights just the matching bracket. my version
highlights both the current and matching brackets. additionally when you
are on the next character after a closing bracket, it works like if you
are on that bracket. i think it works great, and _very_ usable. bracket
jumping (Meta/Alt-B) is working the same way: if you are after a closing
bracket, it jumps to its matching opening bracket.

file position saving
--------------------
the original version doesn't stores file position. my version, based on
Max Schedrivy's patch above, can save file positions for the last 1024
files edited. Max's version just stored file line, i improved it to
store column, too. file position saving can be turned on/off in the
editor's configuration, at the "General" options.

You can download my version from:
http://www.wish.hu/mc-2002-11-20-17-patched.zip

The version I've patched:
http://www.wish.hu/mc-2002-11-20-17.tar.gz

I'm not really tested them, I'm glad to get bug reports! I think no
problem can be with bracket matching, but position saving is more
difficult.

Warning, warning! :)) Actually it was my first adventure in the world of
C, these are my first usable lines in C, so please look my patches like
this (I'm normally programming in the wonderful Perl). Additionally I'm
not familiar in developing and distributing programs under Linux, so the
downloadable version (the zip file) is all the files I got after a "make
clean" command. Makefiles are still exists. I think I should remove the
There is magic target "dist" for make in mc's Makefiles. But make distcheck is ever better :-)

all and some other files, too, but I don't want to do it one-by-one, and
don't know the way to do it automagically.
Making patches is not too hard after reading man diff. Unified diffs are more welcomed among mc developers (diff -u). Pavel Roskin distribute usefull shell script called ldiff for making patches.
You need to backup files with some extention (say orig) before you change these ones, and after hacking you just need to run
ldiff .orig > patchname.patch
from mc source directory. There are should not be symlinks in the source tree because find -path ignores symlinked directories.

Good luck.

--
Regards,
Andrew V. Samoilov



_______________________________________________
Mc mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc

Reply via email to