summaryrefslogtreecommitdiff
path: root/usr.bin/mg
AgeCommit message (Collapse)Author
2009-06-02we were erroneously setting fill-column, even when the inputKjell Wooding
to set-fill-column was garbage. (common, since they keystroke is so close to find-file). Fix!
2009-06-02Fix up some comments to match realityKjell Wooding
2009-06-02Fix the long-standing crash when >NXNAME characters were insertedKjell Wooding
into minibuffer. Found and fixed by Martynas. Cleaned up a bit so that error messages display properly in the status line. Fixes Debian bug #414846
2009-04-26make djm less disappointedStuart Henderson
2009-04-26I am disappointed that the commit rate to this file is has slowed.Damien Miller
2008-12-23time to add a new one.Claudio Jeker
2008-12-17change the name displayed by the c-mode on the mode line to "c",Igor Sobrado
as other modes do, for consistency and to save a few chars. written with help from kjell@ ok kjell@
2008-12-17sort CFLAGS, SRCS and the list of compile-time options; while here,Igor Sobrado
add some missing full stops. ok kjell@
2008-11-15update the readme a bit by deleting most of the irrelevant info, such as msdosTed Unangst
support and who to mail for 5" floppies... ok kjell
2008-11-06add a description for the recently added c-mode.Igor Sobrado
ok jmc@
2008-09-15Expose the undo commands as proper mg functions.Kjell Wooding
This should have no functional change on undo, but it does facilitate testing undo behavior.
2008-09-15Enable dirty buffer detection in mg.Kjell Wooding
Emulate the emacs behavior: after suspend/resume, buffer switch, or at save time, warn (prompt) the user if the file has been modified on disk in the interim. This has already saved my butt numerous times. ok phessler
2008-08-27add a C-c target, so we can use it as a prefix for keybindings.Kjell Wooding
Now you can do something like: global-set-key "\^c\^c" compile in your ~/.mg
2008-07-30Replace GNU tutorial with public domain one, written from scratch byKjell Wooding
Mayukh Bose. Minor additions from me. Thanks!
2008-06-29documentation tweaks.Igor Sobrado
2008-06-18Don't free the buffer name until after you call adjustname.Kjell Wooding
Fixes a segfault that occurs when you write a file to an alternate name. Introduced by yours truly in 20060406. how did it last this long?
2008-06-16could not resist. OK ok buddy henningClaudio Jeker
2008-06-15first pass: it would be nice if mg users read over this page and sent usJason McIntyre
any fixes;
2008-06-15Typos, forgotten wordKjell Wooding
2008-06-15How about we actually document the 230-odd functions that make upKjell Wooding
mg now? Keymaps, too. I've guaranteed to have mucked up somewhere in here, but really - this man page can't really get less useful. Modes to come.
2008-06-14We do not need a whole MODE for blinking one character.Kjell Wooding
both emacsen automatically blink, so mg should too. This can be overridden in your ~/.mg by adding, e.g. global-set-key ")" self-insert-command So, I've eliminated blink mode, and renamed "blink-matching-paren-hack" to "blink-and-insert". It's not just for parens anyway. While I'm here, set up an empty (rescan) target for backtab, so I can bind something convenient to it; e.g. global-set-key "\e[Z" backward-char Finally, remove all references to Scribd. Theo doesn't hate this, though I would hesitate to call it an ok.
2008-06-14Add compile (c-C c-P) to the c-mode keymap (export from grep.c)Kjell Wooding
Also, attempt to make indent an atomic undo operation.
2008-06-14unf*ck undo.Kjell Wooding
No seriously. Reposition the cursor to the start of the redo position, like emacs. This gets us halfway to being emacs-finger-friendly. For the rest, introduce a rptcount variable to count successive invocations of the same function. This means undo will abort properly on C-g, and other such interruptions. This is a lot of diff for a simple-seeming problem. Emacs undo is hard.
2008-06-13One more "//" instead of "/" case. Hidden in a getcwd.Kjell Wooding
Noted, ok otto@
2008-06-13phessler noted that c-mode ignored blinking braces.Kjell Wooding
Add "c-handle-special-brace" which does a blink and indent, rather than just a selfinsert and indent
2008-06-13Allow selfinsert to be called with FFRAND; i.e. from anotherKjell Wooding
function. While here, tighten whitespace.
2008-06-13Remove mail-mode. It was a buggy reimplementation of auto-fill-mode.Kjell Wooding
If you use this, change your habits (and .mg) to use the following commands instead: mail-mode => auto-fill-mode mail-set-margin => set-fill-column ok henning@. Will also "fix" debian bug #460189
2008-06-13Fix debian bug #432656Kjell Wooding
'Prints root directory as "//" instead of "/" for root files.' Issue was with dirname, which strips the trailing slash, except when given "/". Wrap it in a cover function to fix. Also helps with portability to data-munging dirname glibc.
2008-06-13Fix autoexec file handling.Kjell Wooding
Two issues: *scratch* did not inherit any modes set from ~/.mg, as it was created too early. Switch to using *init* buffer until after autoexec, then kill it and inherit correct *scratch*. Second, -f should force the mode. Not toggle it. ok phessler@
2008-06-12incremental search isn't allowed in macros, so if your fingersKjell Wooding
automatically go there during a macro def, the macro recording is CANCELED. This sucks rocks. This fixes the incremental searches to automagically invoke the non-incremental varieties during macro recording and playback. ok art
2008-06-12c-mode now understands the two most common type of commentsKjell Wooding
(with appropriate indenting): /* * comment */ and foo(); /* comment */ Whew. A lot of code for a seemingly simple idea. ok phessler@
2008-06-12Make set-fill-column interactive (and scriptable in a startup file)Kjell Wooding
This replaces the ridiculous "move cursor to where you want to wrap things and invoke this comment" behavior of before. Note, this makes auto-fill-mode the moral equivalent of mail-mode. (and set-fill-column the moral equivalent of mail-set-margin)
2008-06-12WhitespaceKjell Wooding
2008-06-12Introduce a basic c-mode to mg.Kjell Wooding
The intent of this mode is NOT to copy emacs's monster cc-mode. It is intended to handle basic KNF-format C, assisting with indentation (to catch obvious typos), and strip trailing whitespace. It is NOT enabled unless you ask for it (c-mode). Basically, tab on start-of-line whitespace acts like tab. Otherwise, tab indents. Please try it out and let me know where it falls down. Feedback Reyk, phessler. "hack in tree" from henning, theo
2008-06-11Expose changemode for use by "self-contained" modesKjell Wooding
2008-06-11Add delete-leading-space, delete-trailing-space,Kjell Wooding
indent-current-line utility functions for stripping leading/trailing whitespace, and setting a fixed indent respectively.
2008-06-11Use getcolpos to compute column. doto does not account for tabsKjell Wooding
2008-06-11With Vincent's permission, the last remaining chunk of mg has beenKjell Wooding
placed in the public domain. This means mg (minus theo.c) is once again a public domain piece of code. Please try to keep it that way.
2008-06-11Let curses handle the setup of terminal instead of doing it on our ownTobias Stoeckmann
and leaving terminal in an inusable state if setupterm failed. ok kjell
2008-06-10Add a clear-mark function.Kjell Wooding
Use it to clear the region it is copied (M-w), or yanked (C-w). This matches xemacs behavior, is not horribly different from gnu emacs, and way less wrong than the current behavior. Noticed by Han Boetes. ok otto@
2008-06-10Fix obvious off-by-one in macro loop. From Marc Butler via debianKjell Wooding
2008-06-10Remove copyright notices and put these files back into the public domain.Kjell Wooding
ok art
2008-06-08moreHenning Brauer
2008-05-29add a detailed synopsis to mg(1); synchronize with usage.Igor Sobrado
tweaks by jmc@ ok jmc@
2008-05-22I really hate commiting here, but this was far too good not to.Bob Beck
ok "commit but don't you dare putting my name there" from an anonymous french developer.
2008-04-13Use arc4random_buf() when requesting more than a single word of outputDamien Miller
Use arc4random_uniform() when the desired random number upper bound is not a power of two ok deraadt@ millert@
2008-03-21Reset startrow when opening multiple files. Spotted by matthieu@Pierre-Yves Ritschard
ok, kjell@, matthieu@
2008-02-05prevent the "ttflush write failed" panic when resizing using a windowReyk Floeter
manager that that continously sends resize events. fix inspired by an older diff for vi (r1.15 of src/usr.bin/vi/cl/cl_screen.c) ok otto@ jasper@
2008-01-10kill trailing whitespace;Jason McIntyre
2008-01-10This file is in the public domain. ok deraadt@Kjell Wooding