summaryrefslogtreecommitdiffstats
path: root/usr.bin/mg/cmode.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* whitespacejasper2015-09-261-7/+7
|
* More unifdef cleanup:bcallah2015-03-191-5/+5
| | | | | | | | | | | -UDIRED_XMAPS and -UFUND_XMAPS: you can't build mg the other way. -DTIOCGWINSZ: you have this if you have term.h Remove a #define TERMCAP which isn't being used. Remove defines for NDIRED_XMAPS, NFUND_XMAPS, and IMAPEXT. They are all defined to be 0 and are only ever used in addition. We don't need to add 0. Simply lines that were using those defines. ok florian@
* Clean up the includes in mg.bcallah2015-03-191-2/+6
| | | | | | | | | | This does the following: Moves all POSIX headers from sysdef.h into the individual .c files so that each file now only includes what it needs. All headers are properly sorted. Moves the remainder of sysdef.h to other files (mostly def.h) and deletes sysdef.h now that it's no longer contains anything. Tweak a comment that references sysdef.h so that it no longer does that. ok florian@
* Change the internal name of the newline function to deconflict with abcallah2015-03-161-2/+2
| | | | | | function of the same name in term.h. This is the first step towards cleaning up mg's includes. No user-visible changes. ok florian@
* Remove a variable that's not really being used.bcallah2015-01-131-7/+1
| | | | ok deraadt@ jasper@
* Remove unused variable.lum2015-01-021-3/+1
|
* Don't save the return from getindent() if you don't need it; adjustguenther2014-11-161-4/+4
| | | | | | comments to reflect that based on a diff from Kamil Rytarowski (n54 (at) gmx.com)
* Remove a redundant assignment for slashp in findnonblank().bcallah2014-03-311-3/+1
| | | | | | Remove a redundant comment in the same place while here. Tweaks from lum@ ok florian@ lum@
* Allow no-tab-mode to compile. From James Turner.lum2012-05-181-2/+2
| | | | note: no-tab-mode needs more work done before removing the NOTABs.
* Add missing prototypes and move dired.c to "extensions" in Makefile.lum2011-01-181-1/+2
| | | | ok kjell@
* change the name displayed by the c-mode on the mode line to "c",sobrado2008-12-171-3/+3
| | | | | | | | as other modes do, for consistency and to save a few chars. written with help from kjell@ ok kjell@
* Expose the undo commands as proper mg functions.kjell2008-09-151-5/+3
| | | | | This should have no functional change on undo, but it does facilitate testing undo behavior.
* Add compile (c-C c-P) to the c-mode keymap (export from grep.c)kjell2008-06-141-6/+34
| | | | Also, attempt to make indent an atomic undo operation.
* phessler noted that c-mode ignored blinking braces.kjell2008-06-131-2/+17
| | | | | Add "c-handle-special-brace" which does a blink and indent, rather than just a selfinsert and indent
* c-mode now understands the two most common type of commentskjell2008-06-121-44/+203
| | | | | | | | | | | | | | | (with appropriate indenting): /* * comment */ and foo(); /* comment */ Whew. A lot of code for a seemingly simple idea. ok phessler@
* Introduce a basic c-mode to mg.kjell2008-06-121-0/+327
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