summaryrefslogtreecommitdiff
path: root/usr.bin/mg
AgeCommit message (Collapse)Author
2021-04-22Add a non-interactive version of query-replace-regexp function calledMark Lumsden
replace-regexp. Unfortunately query-replace-regexp can't be used in a startup file.
2021-04-21Use the plenteous BUFSIZE found in mg in lieu of 128.Mark Lumsden
2021-04-20Indicate if an mg function is unsuitable for a startup file (requiresMark Lumsden
user interaction).
2021-04-20Allow more than one block of code to exist on a single line. Also,Mark Lumsden
move the code which expands variables to be ran when variables are discovered instead of in multiarg() just before execution. This means a variable who's value is included in anothers', won't change the others value if its own is changed. I have also included code, which is commented out at the moment, which implements a function map specific to interpreter. Not sure if I can ultimately avoid using it though.
2021-04-20Add 'dired-jump' from Philip K. <philip@warpmail.net> sent to tech@Mark Lumsden
over a year ago. Comments and testing from gkoehler@. Thanks to both. Also, some modifications from me.
2021-03-26Invert the 'R' indicator which seems rather unintuitive at the moment,Mark Lumsden
currently a '*' next to a file's name indicates it is writable. With this diff it now means it is read-only. Also make the active buffer indicator more visible:'.'->'>'.
2021-03-26Add 'get-environment-variable', in a fashion:Mark Lumsden
(define curdir(get-environment-variable CURDIR)) (insert curdir) Should now print the value of the environment variable CURDIR's value, or error if it is not set.
2021-03-26Change the regex for define names. Make more characters available.Mark Lumsden
Keep the same regex for mg function names. Though perhaps for user-defined functions other characters could be ok....
2021-03-26Change two more bool counters to pointer NULL checks.Mark Lumsden
2021-03-25Move the expression list create item code into a single function.Mark Lumsden
2021-03-25Add an (exit) method.Mark Lumsden
2021-03-25User a pointer's value (!NULL) instead of a boolean to indicate someMark Lumsden
kind of data being found.
2021-03-25Use length of line to indicate end of characters to process inMark Lumsden
foundparen(). No intended functional change. regress tests ok and they all use excline().
2021-03-23Use a pointer called bufp to point to a buffer called bufnMark Lumsden
consistantly.
2021-03-23Correct how many arguments some functions take for interpreter.c.Mark Lumsden
2021-03-23Make a parameter to an mg function not throw an error justMark Lumsden
because it is numerical.
2021-03-22Start the move to TAILQ for expressions instead of an SLIST.Mark Lumsden
2021-03-21Add quoted strings capability in list values, no special charsMark Lumsden
detection in between them though. Add limitation to characters allowed in symbol names, equivalent to mg function names (A-Za-z-), quite restrictive but can grow of course. If value is not quoted and is not a variable, give an error.
2021-03-20Looking at loading all expressions initially, working towards multiMark Lumsden
line. Next to look at "values" (quotes around values). Current regress tests pass.
2021-03-20Add a 'batch' mode to mg via the '-b' command line option which willMark Lumsden
initialise a pty, run the specified file of mg commands and then exit. This is to facilitate mg fitting into the OpenBSD regress test framework and be able to run via a cron job.
2021-03-18From Joachim Wiberg's version of mg.Mark Lumsden
"This patch makes sure to clear the status/echo line after killing and switching buffers by name. Otherwise the kill/switch prompt lingers"
2021-03-08Start looking at parsing text to find separators.Mark Lumsden
2021-03-08Put regex tests into a function.Mark Lumsden
2021-03-05If there is a problem with opening a directory via M-x dired, let theMark Lumsden
user know. EACCESS is currently accounted for, but nothing else.
2021-03-02It is now possible to define single value variables in the startup file:Mark Lumsden
(define myfile d.txt) And use them like: (find-file myfile)
2021-03-02This diff soaks up the user input while the the maximum characterMark Lumsden
length boundary is crossed in the minbuffer and allows the user to see the error message and respond accordingly. The goto named "null" changed to "skipkey" as per Emil Engler's suggestion on tech@.
2021-03-02Update logging with comments made by florian@ some time ago (i've notMark Lumsden
updated logging to $HOME, but will do so). Also include mglog_misc() which takes formatted input from Joachim Wiberg's mg. Thankyou both.
2021-03-01Put the hardcoded '\n' character which is found throughout mg into aMark Lumsden
buffer specific variable. The diff should not produce any behavourial changes in mg.
2021-02-28Add dobeep functions that take messages to buffer.c and cscope.cMark Lumsden
No functional change intended.
2021-02-27Add dobeep functions that take messages to basic.c.Mark Lumsden
No functional change intended.
2021-02-26Some more improvements from Joachim Wiberg's version of mg.Mark Lumsden
check before using variable in list remove unnecessary variable declaration check value of adjustname() add a '< 0' return value of snprintf
2021-02-26Some improvements from Joachim Wiberg's version of mg.Mark Lumsden
check value of adjustname() use int for return value of snprintf
2021-02-24Various fixes from emails Joachim Nilsson sent to tech@ many moonsMark Lumsden
ago. Sorry for the delay. - Make sure we don't deref NULL ptr in skipwhite() - Only deref vendp if not NULL - Strings must be at least 2 chars for terminating NUL character
2021-02-24snprintf() does indeed return an int. From an email Joachim NilssonMark Lumsden
sent to tech@ many moons ago. Sorry for the delay.
2021-02-23Move -u to alphabetically correct place in options. As spotted by jmc@Mark Lumsden
2021-02-23Allow the user to specify a path to the mg startup file on the command line.Mark Lumsden
2020-07-22Avoid running out of memory with query-replace-regex ^Theo Buehler
Choosing ! (replace rest) never advances beyond the current line and keeps inserting the replacement test, and mg eventually runs out of memory. Patch from Mark Willson with minor stylistic tweaks. Looks good to Hiltjo Posthuma who would have preferred making forward replacing on empty lines work. Mark argued that this makes it behave consistently with the current behaviour when searching for ^ and the point at the beginning of a non-empty line in which case the cursor does not move either. Also tested by krw
2020-07-22Prevent mg segfault with query-replace-regex replacing ^Theo Buehler
Patch from Mark Willson with a minor tweak
2020-07-09Avoid NULL deref in regexec when searching for empty lines.Theo Buehler
Report & tweak from Hiltjo Posthuma
2020-02-09Do not define variables in def.h since this will lead to duplicate definitionsFlorian Obser
in every source file that includes def.h Found by gcc10 in portable in gentoo and fedora. Patch from Ulrich Mueller (ulm AT gentoo.org) via Han Boetes, thanks! Ok tb
2019-11-08Add that make-backup-files variable is enabled by defaultsolene
make-backup-files toggles backup, so when you add it in your ~/.mg this disables backup. ok benno@
2019-07-20Missed a free.Mark Lumsden
2019-07-20Move a bit of code to where it is called only if needed.Mark Lumsden
2019-07-19Previously I left the ')' on the end of a list to indicate the end.Mark Lumsden
Just to get things working. Best get rid of that nonsense sooner rather than later.
2019-07-18The 'list' diff I committed this morning, was missing a couple ofMark Lumsden
calls to a clean-up variable function.
2019-07-18Make indentation consistent. This has been bugging me for a while now.Mark Lumsden
2019-07-18Add logging to interpreter.cMark Lumsden
2019-07-18Add some more basic interpreter functionality to mg. Needs a lot moreMark Lumsden
work, including a proper parser.
2019-07-17Add BUFSIZE define.Mark Lumsden
2019-07-17Add two dobeep functions to make calls to the system bell requireMark Lumsden
fewer lines. While working in extend.c change relevant calls to dobeep.