* rename and pass flags to byte quoting functions:
`byte_quote` -> `strquote_byte`
* add `eb_print_style` to output data to a buffer in a given style
* add `eb_print_field` to output a field name and value using styles
* use styles in describe commands
* improve byte stats and page layout output in `describe-buffer`
* add `wall-chart` command (sorted list of bindings)
* add `describe-help` command
* parse process output for shell prompts with current directory
* parse `make -w -C` output for temporary subdirectory excursions
* handle property type and flags separately
* add `QE_PROP_MARK` to prevent offset update at range boundary
* use `QE_PROP_DUP` to optimize buffer properties with single allocation
* use mask in `eb_delete_properties` to delete tags selectively
* fix `eb_find_property` range glitch
* fix offset tracking for CWD properties
* simplify default directory selection for shell commands
* fix compiler warnings on variable shadow definitions
* optimize `next_error()`: no lookback needed anymore
* display buffer properties in `describe-buffer`
* update TODO.md
* improve color combining code for diff/patch output: preserve code
syntax coloring on red or green background.
* improve `curline_style` handling (needs more work)
* add `QETermStyle` transparent color handling in `apply_style`
* highlight trailing blanks in a single place
* transpose `qe_term_get_style()` arguments for consistency
* add `qe_term_style_string()` and `qe_styledef_string()`
* extend style string parser to accept missing foreground color
* add `filenames` specification in `ModeDef` structures
* generic mode probing can match a list of filenames
* remove unneeded mode_probe functions
* this enables diff coloring on Makefile
* `compare-windows` used to toggle all ignore flags if invoked without
an argument. This was bogus.
* when reading a variable name (eg: `eval-expression`), improve alignment
of variable descriptions in popup window
* add `eb_put_filename()` to encode buffer or file names with
non-ASCII characters according to PF_xxx flags
* add `CF_SAVE_LIST` flag for completions to store the list
of matches in `MinibufState`
* fix bufed and dired layout issues
* fix buffer and filename completion popup layout
* add commands to control display of Unicode and non printing
charcaters in buffer or file names:
- U toggles unicode display
- \ cycles through 4 possible encodings: ? ^J \x10 \010
* use `(*fp)()` syntax for indirect function calls
The behavior follows this priority order:
1. reuse an existing window already displaying the buffer,
2. if shell-command-other-window is not set, use the current
window, otherwise
3. select the largest available non-active window.
4. split a new window if no sutiable window is found.
5. fall back to the current window if splitting fails.
- `shell_buffer_read_only` controls if the shell buffer should become
read-only and use pager-mode when not interactive
- `shell_mode_auto_interactive` controls if the shell interactive mode is
switched to and from automatically based on cursor movement commands
- disable auto interactive if region is highlighted
- fix crash bug in qe_register_emulation_bindings for "emacs" emulation
* Fix `put_status`/`put_error` behavior
- use `put_error` instead of `put_status` for command errors
- prevent status message output to console during initialization
- use `put_error` for side effects in command errors
- add `&` prefix in status messages to force screen flush
- flush screen in `qe_display()`, remove redundant calls to `dpy_flush`
- fix gcc compilation errors and warnings
- remove most references to `global_screen`
- free font cache before closing the screen
- prevent mouse handling upon focus detection
* drop CI on macos-12
- rename `indent_size` window field as `indent_width` for consistency
- handle negative argval in `do_tabulate`
- fix reverse region in `indent-rigidly`
- only indent lines that start in the region, ie: lines whose beginning
offset >= start and < end
- fix `do_backspace` to delete a TAB worth of white space after TAB.
no longer use `undo` for this.
- fix `find_window` to locate window according to top-left corner of current
- add `unindent-region` on `M-C-|` to unindent current region
- add `unindent-buffer`
- redirect `S-RET` and `S-DEL` to their unshifted versions
- rename `c-indent-command` command as `c-indent-line-or-region`
* list extra commands separately (commands with matches in description only)
* colorize variable names
* fix tab-width computation to keep bindings aligned
*equivalents* are strings that should compare equal in a `compare-windows`
session. You can define such strings in a **.qerc** file in the directory of
one of the files being compared. This helps ignoring known changes such as
type of function renaming... Here is an example to help compare files between
the `bellard/quickjs` and the `quickjs-ng/quickjs` repositories:
```
define_equivalent("JS_DupValue(ctx, ", "js_dup(");
define_equivalent("JSValue", "JSValueConst");
define_equivalent("JS_NewInt32(ctx, ", "js_int32(");
define_equivalent("JS_NewInt32(ctx,\n", "js_int32(");
define_equivalent("JS_NewUint32(ctx, ", "js_uint32(");
define_equivalent("JS_NewUint32(ctx,\n", "js_uint32(");
define_equivalent("JS_NewBool(ctx, ", "js_bool(");
define_equivalent("JS_NewFloat64(ctx, ", "js_float64(");
define_equivalent("JS_EXTERN ", "");
define_equivalent("JS_EXTERN JS", "JS");
define_equivalent("JS_EXTERN JS_", "JS_");
ignore_equivalent = 1;
```
Other changes were necessary for proper utf8 skipping:
- add `utf8_prefix_len(str1, str2)` to compute the length of a common initial
prefix not falling inside UTF-8 encoded codepoints.
- add `utf8_decode_prev` to get the previous codepoint
- add `eb_match_str_utf8_reverse`
* use memcpy and other value casts to avoid strict aliasing violations.
gcc 12.2 was wrongly assuming that utf8_decode(&p) did not modify p
because *pp was never explicitly set, albeit *(const u8 **)pp = p; was
storing te updated value of p into it and the code generated for that
was produced. The code generator was miscompiling strtokey1 because
the compiler relied on bogus code analysis at the call site.
The gcc team is wasting many hours of valuable debugging time.
They should at least issue a warning about aliasing rules violations.
* fix compiler warning on missing Xvideo header
* fix compiler warning on missing fallthrough
* bump version to 5.4.1c
- add charset.h
- add tools/unitable.c to compute unicode_width.h
- add tools/unicode_gen.c to compute more unicode tables
- use Unicode 15.0.0
- add rules to compute width tables from Unicode tables and TTY
- move basic definitions from util.h to cutils.h
- use CONFIG_SESSION for session support (undefined if CONFIG_TINY)
- define CompleteFunc and CT_xxx flags for completion functions
- pass CompleteFunc to xxx_complete() functions
this allows more generic implemetation, without including qe.h
- rename fill_border() as fill_window_slack() for readability
- add QELEVEL environment variable to detect recursive invocation
- use stricter parser for load_ligatures()
- bump VERSION to 5.3.4u
- improve operator lexer: produce token and precedence on 1 step
- merge parser.c and qescript.c
Fix other bugs
- close display before freeing memory in --free-all
- free TTYState in tty_dpy_close()
- free VarDef memory in --free-all
- fix crash bug on --free-all due to duplicating ModeDef structures
Improve variable handling:
- move do_describe_variable() to variable.c
- add var_alloc and str_alloc flags in VarDef to fix `end` hack
- remove ugly kludge to detect allocated strings
- type variables retrieved from environment
- free variable data on --free-all
- bump VERSION to 5.3.4m
- add QEValue utility functions:
void qe_cfg_swap(QEValue *sp, QEValue *sp1);
void qe_cfg_move(QEValue *sp, QEValue *sp1);
- add ds->start_line to restart parsing with correct line numbers
- add ds->newline_seen to handle automatic semicolon insertion
- implement skipping in qe_cfg_expr() and qe_cfg_stmt()
- implement comma and ternary operators
- upgrade tqe parser to token based
- fix lexer for multi character operators
- add qe_set_variable_offset() to control setting point and mark
- bump VERSION to 5.3.4l
- add utility function:
char *file_load(const char *filename, int max_size, int *sizep);
- publish QEValue, selected TOK_xxx and value setters in qe.h
- add more common functions in parser.c
qe_cfg_init(), qe_cfg_release()
- add generic argument parser qe_cfg_get_args()
- add conversion functions in qescript.c:
char(v), int(v), string(v)
- add delim argument in qe_cfg_parse_string() in parse.c
- pass QEmacsDataSource pointer to has_token(), expect_token()
- bump VERSION to 5.3.4j
- add is-player global variable. Default to dired when invoked with no arguments
Set to 0 in ~/.qe/config to prevent this and show *scratch*
- merge modes/list.c into qe.c
- bumped version to 5.3.4a
improve command and bindings registration:
- simplify command and binding registration APIs
- add bindings member in ModeDef structures
- rename qe_register_cmd_table() as qe_register_commands(), change API
- add qe_register_bindings() taking mode, command-name and bindings string
- rename qe_mode_set_key() as qe_register_command_binding()
improve buffer listing:
- add BF_SHELL buffer flag for shell buffers
- show current directory of shell buffers in bufed
improve dired:
- add dired-hide-details-mode on "("
- use details_mask to control long listing
improve trace doctor:
- add EB_TRACE_DEBUG trace flag for debugging traces
- add do_set_trace_flags()
- change do_start_trace_mode() to do_toggle_trace_mode() with arg
misc:
- fix make_user_path() for pathnames without a trailing slash
- use separate commands for prefix_argument handling
- improve strstart(), strend(), pstrcpy(), pstrncpy(), get_dirname()
- add strmatchword() like strstart with check for word boundary
- bumped version to 5.3.3d
- pass description as 3rd argument to CMDx() macros
- normalize argument specifications
- 'p' means point
- 'a' means argval
- 'A' means argval premultiplied by value
- pass argval before value to do_split_window(),
do_isearch(), do_sort_span(), do_sort_region(), do_sort_buffer()
- add SF_SILENT flag to suppress messages in eb_sort_span()
- bumped version to 5.3.3
- split eb_command_print_entry from command_print_entry
- split eb_variable_print_entry from variable_print_entry
- fix eb_sort_span to handle static styles
- match description strings in apropos
- use eb_xxx_print_entry in apropos to share code and colorization
- bumped version to 5.3.2d
- add description strings to all commands in extra.c
- add ignore-case for compare-windows
- pass region to do_indent_region()
- add indent-buffer using do_indent_region()
- use standard bindings string to all CMDx() definitions
- remove CMDx() key and alt_key
- remove compact key macros: KEY_CTRLX, KEY_CTRLXRET,
KEY_CTRLH, KEY_CTRLC
- removed qe_register_binding2,
- qe_register_cmd_table() takes array length
- remove CMD_DEF_END and CmdDef chaining
- add CmdDefArray to store commands in const arrays
- strtokeys() takes end pointer
- add C-@ as name for null control key
- removed many hacks in CmdDef handling
- merge electric key commands
- fix ~ minibuffer behavior
- bumped version to 5.3.2
- made some local objects static
- fix many const cast issues
- fix comma operator warnings
- add const correct strtol_c(), strtoll_c(), strtold_c()
- add unconst(t) to override const removal warnings
- comment VLAs and flexible arrays
- use get_basename_offset() to enable const correct
get_basename() and get_basename_nc()
- use get_extension_offset() to enable const correct
get_extension() and get_extension_nc()
- always include config.h
- use size_t for some size arguments:
umemmove(), umemcpy(), umemcmp(), qe_memicmp()
- add qe-doc.info and qe-doc.pdf targets
- fix shadowing bug in buf_write: used tor return 0 instead of byte count
- bumped version to 5.3.1e
- add description placeholders to all CMDx definitions
- swap arguments to qe_split_window() and do_split_window()
- pass iteration count based on universal argument to
do_up_down(), do_left_right(), do_word_right(), do_kill_word(),
do_forward_paragraph(), do_kill_paragraph(), do_c_forward_conditional(),
do_forward_block(), do_kill_block(),
- remove do_backward_paragraph()
- add int eb_prev_paragraph(EditBuffer *b, int offset);
- dont call command on 0 universal prefix
- add command and variable description field
- add fuzzy completion on repeated TAB in minibuffer
- remove fuzzy_search variable
- add CompletionDef flags:
- CF_FILENAME to use `/` as separator
- CF_NO_FUZZY to prevent fuzzy matching on second TAB
- CF_SPACE_OK to prevent SPC from completing entry
- CF_NO_AUTO_SUBMIT to insert current match on ENTER
- fix invalid free on CommandDef structures
- improve symbol completion in eval-expression
- use symbol completion in apropos
- fix post increment and decrement evaluation
- add QE_STYLE_BLANK_HILITE style for extra blanks at end of lines
- add MODEF_NO_TRAILING_BLANKS flag to control this feature on a mode basis
- add -nc (--no-crc) command line option du disable CRC based update cache
- add disable-crc global variable for the same purpose
- fix termios c_oflag flags in raw mode
- rename and extend CompletionEntry as CompletionDef
- create xxx_completion CompletionDef structures
- rename xxx_completion() functions to xxx_complete()
- register CompletionDef structs with qe_register_completion()
- add (start, end) range in CompleteState
- use eb_puts() and eb_putc() instead of eb_printf()
- simplify eb_delete_chars()
- ignore left pane in compare-windows()
- simplify qe_list_bindings()
- improve command and variable completion popup